-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs into the repo #756
Open
jtojnar
wants to merge
14
commits into
simplepie:master
Choose a base branch
from
jtojnar:static-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+29,864
−8
Commits on May 21, 2023
-
editorconfig: Use tabs for HTML again
This was changed in simplepie#745 but without any rationale. The only HTML file is in tests and that should not be manually edited at all.
Configuration menu - View commit details
-
Copy full SHA for a26ac22 - Browse repository at this point
Copy the full SHA a26ac22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d230c7 - Browse repository at this point
Copy the full SHA 4d230c7View commit details -
Ran the following within `nix-shell -I 'nixpkgs=channel:nixos-unstable' -p zola` to create the website tree: zola init docs Filled in the website URL and disabled everything for now. Then created templates based on the successive commits.
Configuration menu - View commit details
-
Copy full SHA for 30f38bb - Browse repository at this point
Copy the full SHA 30f38bbView commit details -
editorconfig: Fix indentation for markdown
There are only two markdown files and both use 2 spaces.
Configuration menu - View commit details
-
Copy full SHA for c6394b7 - Browse repository at this point
Copy the full SHA c6394b7View commit details -
docs: Convert website into a static site
Ran the following within `nix-shell -I 'nixpkgs=channel:nixos-unstable' -p wget2 yq-go dos2unix 'python3.withPackages (ps: with ps; [ beautifulsoup4 pypandoc ])' nodePackages.prettier` ```sh # Download the website contents from the web, and the pages that fail with error 500 from Internet Archive. wget2 --user-agent 'Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0' --mirror --force-directories --no-robots --retry-on-http-error=403 --http2-request-window=1 --random-wait --exclude-directories=/wiki/lib/exe/ http://simplepie.org rm simplepie.org/blog/2006/03/06/forums-powered-by-punbb/index.html wget2 https://web.archive.org/web/20190404091911/simplepie.org/blog/2006/03/06/forums-powered-by-punbb/ --directory-prefix=simplepie.org/blog/2006/03/06/forums-powered-by-punbb rm simplepie.org/blog/2012/10/30/simplepie-1-3-1-is-now-available/index.html sed -i 's/\xbb//' docs/content/blog/2006-03-06-forums-powered-by-punbb.html # fix encoding wget2 https://web.archive.org/web/20210812123158/https://simplepie.org/blog/2012/10/30/simplepie-1-3-1-is-now-available/ --directory-prefix=simplepie.org/blog/2012/10/30/simplepie-1-3-1-is-now-available # Copy the downloaded contents into the website tree. cp -r simplepie.org/* docs/content mkdir -p docs/static mv docs/content/{scripts,favicon.ico,images,css,robots.txt} docs/static # Standardize line endings. dos2unix docs/** # Drop API docs, we will generate them later. rm -r docs/content/api # Drop mint (analytics), it is abandoned. rm -r docs/content/mint # Drop dynamically generated demo pages. rm -r docs/content/demo/newsblocks # Drop downloads – we will just link GitHub. rm docs/content/downloads/*\?* docs/content/downloads/*.zip # Drop ancient scripts, no more font replacement using flash, or tricks to make PNGs transparent in IE (Sleight). rm -r docs/static/css/sIFR-* docs/static/scripts/ # Download headers explicitly since they are currently rotated by PHP # and wget was not able to find them. rm docs/static/images/headers/rotate-old.php wget http://simplepie.org/images/headers/rotate-xspf.xml --directory-prefix docs/static/images/headers/ cat docs/static/images/headers/rotate-xspf.xml | yq -p=xml '"http://simplepie.org" + .playlist.trackList.track[].location' | xargs wget --directory-prefix docs/static/images/headers/ # Drop Wordpress plug-in clutter. rm -r docs/content/blog/wp-{content,includes,json} # Drop feeds. rm docs/content/blog/**/feed/index.html rmdir docs/content/blog/**/feed # Drop wiki noise. rm docs/content/wiki/lib/exe/css.php?* mv docs/content/wiki/lib/tpl/simplepie/wikistyles.css docs/static/css/ mv docs/content/wiki/lib/images/smileys/icon_exclaim.gif docs/static/images/ rm -r docs/content/wiki/lib rm docs/content/wiki/feed.php* rm -r docs/content/wiki/{_detail,_export} find docs/content/wiki/ -name '*\?idx=*' -exec rm '{}' \; find docs/content/wiki/ -name '*\?do=*' -exec rm '{}' \; rm docs/content/wiki/_media/wiki/dokuwiki-128.png docs/content/wiki/wiki/dokuwiki rmdir docs/content/wiki/wiki mv 'docs/content/wiki/_media/tutorial/update_simplepie_cache.jpg?cache=' 'docs/content/wiki/_media/tutorial/update_simplepie_cache.jpg' rm docs/content/wiki/_media/tutorial/update_simplepie_cache.jpg\?* # Add extension to wiki pages. find docs/content/wiki -type f ! -name '*.jpg' ! -name '*.html' -print0 | xargs -0 -I '{}' mv '{}' '{}.html' # Remove duplicate wiki page rm docs/content/wiki/faq/Supported_Character_Encodings.html echo /wiki/faq/Supported_Character_Encodings /wiki/faq/supported_character_encodings >> docs/static/_redirects rm docs/content/wiki/plugins/wordpress/simplepie_plugin_for_wordpress.1.html # Rename start files (used as directory index in DokuWiki) to _index.html used by Zola. find docs/content/wiki/ -name start.html | sed -E 's#(docs/content/(.*))/start.html#mv "\0" "\1/_index.html"; echo "/\2/start /\2/" >> docs/static/_redirects#g' | sh - # Simplify blog structure. rm -r docs/content/blog/page docs/content/blog/index.html find docs/content/blog/2* -name index.html | sed -E 's#docs/content/blog/(....)/(..)/(..)/(.*)/index.html#mv "\0" "docs/content/blog/\1-\2-\3-\4.html"#g' | sh - rmdir docs/content/blog/*/*/*/* rmdir docs/content/blog/*/*/* rmdir docs/content/blog/*/* rmdir docs/content/blog/???? ls docs/content/blog/*.html | sed -E 's#docs/content/blog/(....)-(..)-(..)-(.+)\.html#/blog/\1/\2/\3/\4/ /blog/\4/#g' >> docs/static/_redirects # Prepare redirects for Apache sed -i 's/^/Redirect 302 /' docs/static/_redirects mv docs/static/{_redirects,.htaccess} # Manually extracted main template into templates/. ```
Configuration menu - View commit details
-
Copy full SHA for 9365a15 - Browse repository at this point
Copy the full SHA 9365a15View commit details -
Configuration menu - View commit details
-
Copy full SHA for b23f28b - Browse repository at this point
Copy the full SHA b23f28bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b53ef5 - Browse repository at this point
Copy the full SHA 8b53ef5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e373f7 - Browse repository at this point
Copy the full SHA 8e373f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2724ff - Browse repository at this point
Copy the full SHA d2724ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f9ad46 - Browse repository at this point
Copy the full SHA 2f9ad46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15cca4a - Browse repository at this point
Copy the full SHA 15cca4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb1df1f - Browse repository at this point
Copy the full SHA bb1df1fView commit details
Commits on May 22, 2023
-
So that Zola does not complain about being broken once we remove the wiki.
Configuration menu - View commit details
-
Copy full SHA for d9090bb - Browse repository at this point
Copy the full SHA d9090bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e134c9f - Browse repository at this point
Copy the full SHA e134c9fView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.