1- ## fedoralovespython.org
1+ ## [ fedoralovespython.org]
22
33A little webpage that shows why Fedora is a good operating system for
44programmers, analysts, teachers, learners, and other people using Python.
55
66It contains some talking points, each with a link to more information.
77
88
9- ## How it's deployed
9+ ## Who made it
10+
11+ Made by people who maintain (or are interested in) Python in Fedora.
12+ If you want to join, just send a pull request, or look at the
13+ [ Fedora Python SIG] page for more info.
14+
15+
16+ ## How it works
17+
18+ The website is powered by [ Elsa] . That means it is a Flask website that
19+ produces static HTML pages. Those pages are pushed to [ GitHub Pages] .
20+ [ Cloudflare] is used for [ Let's Encrypt HTTPS] .
21+
22+ When you push some changes, the Flask website is frozen by Elsa on [ Travis CI] .
23+ When the commit is from the ` master ` branch, the frozen HTML site is pushed to
24+ the ` gh-pages ` branch and the cache is purged on Cloudflare.
25+ Feel free to explore ` .travis.yml ` to see how it's done.
26+
27+ The content if mainly in the ` points.yml ` file (as in talking points).
28+ It's a YAML file with Markdown. ` fedoralovespython.py ` defines what's done with
29+ the content and files in ` templates ` and ` static ` define the form.
30+
31+ ## Hacking
1032
1133For local development, you have two options:
1234
@@ -20,14 +42,39 @@ For local development, you have two options:
2042 sudo dnf install -y python3-flask python3-markdown python3-PyYAML
2143 FLASK_APP=fedoralovespython.py python3 -m flask run
2244
23- The deployment at fedoralovespython.org uses [ Elsa] to publish to GitHub Pages.
45+ The above commands will serve the website locally;
46+ in case you want to test freezing, use the virtual environment option and run:
2447
48+ python fedoralovespython.py freeze --serve
2549
26- ## Who made it
50+ That command will freeze the site and then serve it locally from the static
51+ files.
2752
28- Made by people who maintain (or are interested in) Python in Fedora.
29- If you want to join, just send a pull request, or look at the
30- [ Fedora Python SIG] page for more info.
53+ When doing pull requests it is very helpful to show us the result online.
54+ Especially if you are chnaging anything but content.
55+ You can do it by deploying your changes to your fork's GitHub Pages:
56+
57+ python fedoralovespython.py deploy --no-push --no-cname
58+
59+ The above command will freeze the site, and commit it frozen to your ` gh-pages `
60+ branch (be careful though because it will rewrite the branch's history).
61+ Then you can push the branch to your fork on GitHub as you would push the
62+ branch with your changes.
63+
64+ * If you happen to have push permissions to the original ` fedora-python `
65+ repository, never deploy the site from your computer, let the automatic
66+ machinery do it instead.*
67+
68+ The ` --no-cname ` option makes sure your deployed site won't redirect back to
69+ [ fedoralovespython.org] .
70+
71+ Once pushed, your website should live online on the following URL,
72+ where ` <github-username> ` is a placeholder for your GitHub username:
73+
74+ http://<github-username>.github.io/fedoralovespython.org
75+
76+ Please add this link to the Pull Request description so we can fast-check what
77+ you've changed.
3178
3279
3380## License
@@ -50,6 +97,11 @@ respective owners.
5097[ virtual environment ] : https://docs.python.org/3/library/venv.html
5198[ Fedora Python SIG ] : https://fedoraproject.org/wiki/SIGs/Python
5299[ Elsa ] : https://github.com/pyvec/elsa
100+ [ GitHub Pages ] : https://pages.github.com/
101+ [ Cloudflare ] : https://www.cloudflare.com/
102+ [ Let's Encrypt HTTPS ] : https://letsencrypt.org/
103+ [ Travis CI ] : https://travis-ci.org/
104+ [ fedoralovespython.org ] : https://fedoralovespython.org/
53105[ CC BY-SA ] : https://creativecommons.org/licenses/by-sa/4.0/legalcode
54106[ Fedora Python SIG ] : https://fedoraproject.org/wiki/SIGs/Python
55107[ MIT ] : https://github.com/lancaster-university/microbit-docs/blob/master/LICENSE
0 commit comments