├── docs ├── hooks │ ├── __init__.py │ └── __hooks__.py ├── media │ ├── favicon.ico │ └── css │ │ ├── base.css │ │ └── pygments.css ├── README ├── config ├── templates │ ├── index-links.html │ ├── default.html │ ├── index-links-recurse.html │ └── base.html └── content │ ├── footer.mkd │ ├── docs │ ├── devserver.mkd │ ├── glossary.mkd │ ├── content │ │ ├── tagging.mkd │ │ └── categories.mkd │ ├── config.mkd │ ├── urls.mkd │ ├── templates.mkd │ ├── content.mkd │ ├── pagination.mkd │ ├── renderers.mkd │ └── hooks.mkd │ ├── docs.mkd │ ├── home.mkd │ ├── download.mkd │ ├── community.mkd │ └── tutorial.mkd ├── wok ├── contrib │ ├── __init__.py │ └── hooks.py ├── tests │ ├── __init__.py │ ├── test_page.py │ ├── test_engine.py │ └── test_util.py ├── __init__.py ├── exceptions.py ├── util.py ├── jinja.py ├── rst_pygments.py ├── renderers.py ├── dev_server.py ├── engine.py └── page.py ├── requirements.txt ├── scripts └── wok ├── test_site ├── content │ ├── 404.mkd │ ├── pagination-bits │ │ ├── a.mkd │ │ ├── b.mkd │ │ ├── c.mkd │ │ ├── d.mkd │ │ ├── e.mkd │ │ ├── f.mkd │ │ ├── g.mkd │ │ ├── h.mkd │ │ ├── i.mkd │ │ ├── j.mkd │ │ └── k.mkd │ ├── tests │ │ ├── unpublished.txt │ │ ├── dates.mkd │ │ ├── plain.txt │ │ ├── dates2.mkd │ │ ├── chinese.mkd │ │ ├── dates1.mkd │ │ ├── dates3.mkd │ │ ├── rest_titles.rst │ │ ├── markdown.mkd │ │ ├── restructuredtext.rst │ │ └── html_renderer.html │ ├── tests.mkd │ ├── pagination-test.mkd │ └── tests.mkd_ignore ├── templates │ ├── 404.html │ ├── base.html │ ├── default.html │ ├── index.html │ ├── default.html_ignore │ └── pagination.html ├── config ├── wok_expected_output-test_site ├── renderers │ └── __renderers__.py ├── hooks │ └── __hooks__.py └── media │ └── friendly.scss ├── .gitignore ├── bin ├── python-tests └── site-tests ├── .travis.yml ├── LICENSE ├── setup.py ├── CHANGELOG.mkd └── README.mkd /docs/hooks/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wok/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wok/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | -e . 2 | -------------------------------------------------------------------------------- /wok/__init__.py: -------------------------------------------------------------------------------- 1 | version = u'1.1.1' 2 | -------------------------------------------------------------------------------- /wok/exceptions.py: -------------------------------------------------------------------------------- 1 | class DependencyException(Exception): 2 | pass 3 | -------------------------------------------------------------------------------- /docs/media/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythmon/wok/HEAD/docs/media/favicon.ico -------------------------------------------------------------------------------- /scripts/wok: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from wok.engine import Engine 3 | 4 | Engine() 5 | -------------------------------------------------------------------------------- /test_site/content/404.mkd: -------------------------------------------------------------------------------- 1 | title: 404 2 | type: 404 3 | --- 4 | This means it wasn't found. 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | *.pyc 3 | /build 4 | /MANIFEST 5 | */output 6 | /venv/ 7 | /wok.egg-info/ 8 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/a.mkd: -------------------------------------------------------------------------------- 1 | title: A 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page A 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/b.mkd: -------------------------------------------------------------------------------- 1 | title: B 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page B 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/c.mkd: -------------------------------------------------------------------------------- 1 | title: C 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page C 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/d.mkd: -------------------------------------------------------------------------------- 1 | title: D 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page D 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/e.mkd: -------------------------------------------------------------------------------- 1 | title: E 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page E 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/f.mkd: -------------------------------------------------------------------------------- 1 | title: F 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page F 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/g.mkd: -------------------------------------------------------------------------------- 1 | title: G 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page G 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/h.mkd: -------------------------------------------------------------------------------- 1 | title: H 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page H 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/i.mkd: -------------------------------------------------------------------------------- 1 | title: I 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page I 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/j.mkd: -------------------------------------------------------------------------------- 1 | title: J 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page J 6 | -------------------------------------------------------------------------------- /test_site/content/pagination-bits/k.mkd: -------------------------------------------------------------------------------- 1 | title: K 2 | category: pagination 3 | tags: tiny 4 | --- 5 | Page K 6 | -------------------------------------------------------------------------------- /bin/python-tests: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $PYTHON_TESTS == "false" ]]; then 4 | exit 0 5 | fi 6 | 7 | py.test wok 8 | -------------------------------------------------------------------------------- /docs/README: -------------------------------------------------------------------------------- 1 | This is a wok site. To see it as rendered HTML, run wok and look in the 2 | generated 'output' directory. 3 | -------------------------------------------------------------------------------- /docs/config: -------------------------------------------------------------------------------- 1 | site_title: Wok 2 | url_include_index: no 3 | url_pattern: "/{category}/{slug}/{page}/index.html" 4 | slug_from_filename: True 5 | -------------------------------------------------------------------------------- /docs/hooks/__hooks__.py: -------------------------------------------------------------------------------- 1 | from wok.contrib.hooks import HeadingAnchors 2 | 3 | hooks = { 4 | 'page.template.post': [ HeadingAnchors() ], 5 | } 6 | -------------------------------------------------------------------------------- /test_site/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | This is a 404 5 | 6 | {{ page.content }} 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /test_site/content/tests/unpublished.txt: -------------------------------------------------------------------------------- 1 | title: unpublished 2 | category: tests 3 | published: false 4 | --- 5 | This page should not appear in indexes, or rendered to a file. 6 | -------------------------------------------------------------------------------- /test_site/config: -------------------------------------------------------------------------------- 1 | site_title: Wok Scratch Site 2 | author: Default 3 | url_pattern: "/{category}/{slug}{page}/index.{ext}" 4 | url_include_index: no 5 | ignore_files: [ '*_ignore', '*~' ] 6 | -------------------------------------------------------------------------------- /test_site/content/tests/dates.mkd: -------------------------------------------------------------------------------- 1 | title: Dates 2 | type: index 3 | category: tests 4 | date: 2014-04-29 5 | url: "/{category}/{slug}{page}/{date.year}/{date.month}/{date.day}/index.{ext}" 6 | --- 7 | -------------------------------------------------------------------------------- /test_site/content/tests.mkd: -------------------------------------------------------------------------------- 1 | title: Tests Main 2 | slug: tests 3 | type: index 4 | url: /index{page}.html 5 | --- 6 | These are the tests 7 | 8 | The pagination test is [here](/pagination/index.html). 9 | -------------------------------------------------------------------------------- /test_site/content/tests/plain.txt: -------------------------------------------------------------------------------- 1 | title: Plaintext Test Page 2 | slug: plain 3 | category: tests 4 | tags: [plain, sample] 5 | --- 6 | This should be plain text 7 | With *none* of that "mark up" crap 8 | And look like haiku 9 | -------------------------------------------------------------------------------- /test_site/content/tests/dates2.mkd: -------------------------------------------------------------------------------- 1 | title: Date and time 2 | date: 2011-10-12 3 | time: 12:20:00 4 | category: tests/dates 5 | url: "/{category}/{slug}{page}/{date.year}/{date.month}/{date.day}/index.{ext}" 6 | --- 7 | This a date and time 8 | -------------------------------------------------------------------------------- /test_site/content/tests/chinese.mkd: -------------------------------------------------------------------------------- 1 | title: Chinese Test Page 中華民族 2 | slug: chinese 3 | category: tests 4 | tags: [chinese, sample, unicode] 5 | --- 6 | This is a test page for Chinese characters. 7 | ------------------------------ 8 | 9 | 中華民族 10 | -------------------------------------------------------------------------------- /test_site/content/tests/dates1.mkd: -------------------------------------------------------------------------------- 1 | title: Datetime only 2 | datetime: 2011-10-12 12:20:00 3 | category: tests/dates 4 | url: "/{category}/{slug}{page}/{date.year}-{date.month}-{date.day}-{time.hour}-{datetime.minute}/index.{ext}" 5 | --- 6 | This only has a datetime 7 | -------------------------------------------------------------------------------- /docs/templates/index-links.html: -------------------------------------------------------------------------------- 1 | {%- extends "base.html" %} 2 | {%- block content %} 3 | {{ super() }} 4 |