@@ -15,31 +15,25 @@ more details).
1515Development
1616~~~~~~~~~~~
1717
18- This site uses wok _. To install wok and other dependencies, run
19- ``pip install -r requirements.txt ``. wok currently only works with Python 2.7.
18+ This site uses django-amber _. To install django-amber and other dependencies,
19+ run ``pip install -r requirements.txt ``. django-amber is only known to work
20+ with Python 3.5.
2021
21- wok builds the site by assembling several components:
22+ django-amber builds the site by assembling several components:
2223
23- * Pages are found in ``content/ ``. Pages may be HTML, Markdown _ or reStrcturedText _, and contain some YAML metadata.
24- * Statuc files are found in ``media/ ``.
25- * The various jinja2 _ templates for pages can be found in ``templates/ ``.
24+ * Pages are found in ``pythonineducation/data/page/[language]-[slug].md ``.
25+ Pages consist of some YAML metadata (currently just a page title), and some
26+ Markdown _ content. Pages will be served at /[language]/[slug]/. For
27+ instance, en-microbit.md will be served at /en/microbit/.
28+ * Static files are found in ``pythonineducation/static/ ``.
29+ * The various Django templates for pages can be found in
30+ ``pythonineducation/templates/ ``.
2631
27- To build the site, run ``make build ``. This pulls together all the components
28- into a set of HTML files in ``output/ ``.
32+ To build the site, run ``python manage.py buildsite ``. This pulls together all
33+ the components into a set of HTML files in ``output/ ``.
2934
30- Windows users: you need to run the (extensionless) ``wok `` script in
31- ``c:\pythonxx\scripts ``. e.g. ``py -2 c:\python27\scripts\wok ``.
32-
33- Alternatively, if you run ``make serve ``, wok will build the site, serve the
34- built site on port 8000, and watch for changes.
35-
36- Windows users: you ned to run the (extensionless) ``work `` script with the
37- ``--serve `` parameter in ``c:\pythonxx\scripts ``. e.g.
38- ``py -2 c:\python27\scripts\wok --serve ``.
39-
40- You can test that the site contains no broken links and that various common
41- mis-spellings are caught correctly (hint, it's a "BBC micro:bit" for example)
42- by running ``make test ``.
35+ Alternatively, if you run ``python manage.py serve 8000 ``, django-amber will
36+ build the site, serve the built site on port 8000, and watch for changes.
4337
4438Travis will test branches, and branches won't get merged without review and
4539passing tests, so dive in!
@@ -61,19 +55,18 @@ works:
6155 `ISO 639-1 <https://en.wikipedia.org/wiki/ISO_639-1 >`_ language code. For
6256 example, the English version is found under the ``/en `` path whereas the
6357 German version is under the ``/de `` path.
64- * In the ``template/ `` directory of this repository as the page templates for
65- different languages. All inherit from the ``base.html `` template. They are
66- named ``page_XX.html `` where XX is the appropriate ISO 639-1 code for the
67- language for which the template is used. For example, English content uses
68- the ``page_en.html `` template whereas the German template is
69- ``page_de.html ``. These pages should contain the localised header and footer.
70- * In the ``content/ `` directory of this repository are directories named after
71- the ISO 639-1 language code. They contain the content for this website in
72- the langauge referenced by the language code in the name of the directory.
73- For example, the English content is found in the ``content/en/ `` directory
74- whereas the German content is in ``content/de/ ``. You must make sure that
75- the ``type `` field in the YAML header for the content is set to the correct
76- page template for the language.
58+ * In the ``pythonineducation/templates/ `` directory of this repository as the
59+ page templates for different languages. All inherit from the ``base.html ``
60+ template. They are named ``page_XX.html `` where XX is the appropriate ISO
61+ 639-1 code for the language for which the template is used. For example,
62+ English content uses the ``page_en.html `` template whereas the German
63+ template is ``page_de.html ``. These pages should contain the localised header
64+ and footer.
65+ * In the ``pythonineducation/data/page/ `` directory of this repository are
66+ files named after the ISO 639-1 language code. They contain the content
67+ for this website in the langauge referenced by the language code in filename.
68+ For example, the English content for the micro:bit page is found in the file
69+ called ``en-microbit.md ``,whereas the German content is in ``de-microbit.md ``.
7770* If in doubt, just look at what happens in the English version of the site and
7871 adapt to the desired language.
7972
@@ -99,9 +92,7 @@ for the project.
9992Note: this is tied to a single user on GitHub, however any other GitHub user
10093with valid permissions can replace the key on Travis.
10194
102- .. _ wok : http ://wok.mythmon. com/
95+ .. _ django-amber : https ://github. com/inglesp/django-amber
10396.. _Markdown : https://pythonhosted.org/Markdown/
104- .. _reStructuredText : http://docutils.sourceforge.net/rst.html
105- .. _jinja2 : http://jinja.pocoo.org/
10697.. _issue : https://github.com/python/pythonineducation.org/issues
10798.. _CONTRIBUTING.rst : ./CONTRIBUTING.rst
0 commit comments