Permalink
Browse files

Merge branch 'release_0.9' into stable

Conflicts:
	docs/content/docs/urls.mkd
	docs/templates/base.html
	sample/content/tests/dates.mkd
	sample/content/tests/dates1.mkd
	wok/__init__.py
  • Loading branch information...
2 parents faca0b4 + 594b51f commit 05160b5df03c243836a4b1913a0682877753f1c7 @mythmon committed Feb 19, 2012
Showing with 734 additions and 192 deletions.
  1. +33 −47 README.mkd
  2. +2 −2 docs/README
  3. +16 −8 docs/content/community.mkd
  4. +8 −14 docs/content/docs.mkd
  5. +168 −0 docs/content/docs/hooks.mkd
  6. +16 −6 docs/content/docs/urls.mkd
  7. +48 −0 docs/content/download.mkd
  8. +16 −17 docs/content/home.mkd
  9. +5 −0 docs/hooks/__hooks__.py
  10. 0 docs/hooks/__init__.py
  11. +20 −0 docs/media/css/base.css
  12. +6 −2 docs/templates/base.html
  13. +24 −10 setup.py
  14. +1 −1 {sample → test_site}/config
  15. +1 −0 {sample → test_site}/content/pagination-bits/a.mkd
  16. +1 −0 {sample → test_site}/content/pagination-bits/b.mkd
  17. +1 −0 {sample → test_site}/content/pagination-bits/c.mkd
  18. +1 −0 {sample → test_site}/content/pagination-bits/d.mkd
  19. +1 −0 {sample → test_site}/content/pagination-bits/e.mkd
  20. +1 −0 {sample → test_site}/content/pagination-bits/f.mkd
  21. +1 −0 {sample → test_site}/content/pagination-bits/g.mkd
  22. +1 −0 {sample → test_site}/content/pagination-bits/h.mkd
  23. +1 −0 {sample → test_site}/content/pagination-bits/i.mkd
  24. +1 −0 {sample → test_site}/content/pagination-bits/j.mkd
  25. +1 −0 {sample → test_site}/content/pagination-bits/k.mkd
  26. 0 {sample → test_site}/content/pagination-test.mkd
  27. +1 −1 {sample → test_site}/content/tests.mkd
  28. +5 −0 test_site/content/tests/dates.mkd
  29. +6 −0 test_site/content/tests/dates1.mkd
  30. 0 {sample → test_site}/content/tests/dates2.mkd
  31. 0 {sample → test_site}/content/tests/dates3.mkd
  32. 0 {sample → test_site}/content/tests/markdown.mkd
  33. 0 {sample → test_site}/content/tests/plain.txt
  34. 0 {sample → test_site}/content/tests/rest_titles.rst
  35. 0 {sample → test_site}/content/tests/restructuredtext.rst
  36. 0 {sample → test_site}/content/tests/unpublished.txt
  37. +26 −0 test_site/hooks/__hooks__.py
  38. 0 {sample → test_site}/media/friendly.css
  39. +1 −1 {sample → test_site}/templates/base.html
  40. +1 −0 {sample → test_site}/templates/default.html
  41. 0 {sample → test_site}/templates/index.html
  42. 0 {sample → test_site}/templates/pagination.html
  43. +1 −1 wok/__init__.py
  44. 0 wok/contrib/__init__.py
  45. +55 −0 wok/contrib/hooks.py
  46. +77 −19 wok/engine.py
  47. +2 −0 wok/exceptions.py
  48. +156 −56 wok/page.py
  49. +14 −6 wok/tests/test_util.py
  50. +15 −1 wok/util.py
View
@@ -16,12 +16,12 @@ I wanted to do with my website. So I am writing my own. Funnily, the
mythical website that inspired wok still hasn't been written.
[jekyll]: https://github.com/mojombo/jekyll
-[hyde]: https://github.com/lakshmivyas/hyde
-[static]: http://static.newqdev.com/
+[hyde]: https://github.com/lakshmivyas/hyde
+[static]: http://static.newqdev.com/
Sample Sites
------------
-A bare bones site is included in the wok git repo, in the `sample` directory.
+A bare bones site is included in the wok git repo, in the `test` directory.
It is really just a playground for devs to test new features, and not a good
learning tool.
@@ -38,12 +38,20 @@ For some real world examples check out these sites.
- [uberj.com](http://www.uberj.com)
([source](https://github.com/uberj/wbsite)) - Personal website of Jacques
Uber
+- [ngokevin.com](http://ngokevin.com)
+ ([source](https://github.com/ngokevin/ngokevin)) - Personal website of
+ Kevin Ngo
+- [corbinsimpson.com](http://corbinsimpson.com)
+ ([source](https://github.com/mostawesomedude/website)) - Personal website
+ of Corbin Simpson
- Your site here! If you are using wok to generate sites, and don't mind
serving as an example, let me know and I will add a link to your site
here.
-For some tutorials, the [wok github wiki][wiki] has some good pointers.
+For some more documentation, checkout [the doc site][docs]. To learn and share
+with other users, you can check out [the wiki][wiki].
+[docs]: http://wok.mythmon.com
[wiki]: https://github.com/mythmon/wok/wiki
Installation
@@ -66,7 +74,9 @@ dependencies by hand in this case.
###Dependencies
All dependencies are available from pip. Although optional, you really should
-install either markdown or docutils.
+install either markdown or docutils, and if you install from pip, they will be
+installed for you. Pygments is used for syntax highlighting, and will also be
+installed from pip.
####Required
@@ -75,17 +85,16 @@ install either markdown or docutils.
####Optional
-- `markdown` - for rendering markdown documents.
+- `Markdown` - for rendering markdown documents.
- `docutils` - for rendering reStructuredText documents.
-- `pygments` - for syntax highlighting.
+- `Pygments` - for syntax highlighting.
Usage
-----
-To use wok, go to the directory where your site files are located, and
-run the command `wok`. For now, no output will be given unless something
-goes wrong. If it returns without error, you should have a shiny new
-output folder containing some HTML, and your media that represents your
-shiny new site.
+To use wok, go to the directory where your site files are located, and run the
+command `wok`. No output will be given unless something goes wrong. If it
+returns without error, you should have a shiny new output folder containing
+some HTML, and your media that represents your shiny new site.
To aid in testing links on the site, wok includes a development server.
You can run it with the command `wok --server`, which will generate the
@@ -117,49 +126,17 @@ syntax highlighting and media copying make things even easier.
[mkd]: http://daringfireball.net/projects/markdown/
[rst]: http://docutils.sourceforge.net/rst.html
-[More info][more_content]
-
-[more_content]: https://github.com/mythmon/wok/wiki/Content
+[More info](http://wok.mythmon.com/docs/content/)
### Templates ###
Pulled from `templates` by default. Wok uses [Jinja2][jinja] templates,
with various variables exposed to build pages. This is a very flexible
templating environment with control flow, filters, and other ways to
slice and dice the data that wok gives you.
-[More info][more_templates]
-
-[more_templates]: https://github.com/mythmon/wok/wiki/Templates
[jinja]: http://jinja.pocoo.org/
-### Pagination ###
-Pagination requires teamwork from both the templates and the content of a page.
-In the content, place a new item, `pagination`, with sub-items `limit` and
-`list`. Optionally you can also include `sort_key` and `sort_reverse`.
-
-Example
-
- title: Pagination Test
- pagination:
- list: page.subpages
- limit: 3
- sort_key: slug
- sort_reverse: True
- ---
- Let's test pagination.
-
-Then the template for this page will get a new variable `pagination` with
-useful things like `pagination.page_items` and `pagination.next_page`.
-
-[More info][more_pagination]
-
-[more_pagination]: https://github.com/mythmon/wok/wiki/Pagination
-
-### Media ###
-Media is pretty simple. It is intended to be used for things like site wide
-images, style sheets and JavaScript. Wok will copy everything from the media
-directory straight to the output directory before generating anything. This
-means that generated content can overwrite media.
+[More info](http://wok.mythmon.com/docs/templates/)
Configuration
-------------
@@ -179,9 +156,18 @@ Possible configuration options (and their defaults) are
place the output files. The default produces URLs like
`/category/subcategory/foo.html`. To get "wordpress style" urls, you could
use `/{category}/{slug}/index.html`.
-- `url_use_index` (Yes) - If true, keep `index.*` in urls.
Available variables:
- `{category}` - The category of the site, slash seperated.
- `{slug}` - The slug of the page.
+ - `{page}` - The current page.
+ - `{ext}` - The extension that the page should used.
+ - `{date}`, `{datetime}`, and `{time}` - The date/time from the metadata
+ of the page
+
+- `url_use_index` (Yes) - If true, keep `index.*` in urls.
+
+More info:
+[config](http://wok.mythmon.com/docs/config/),
+[urls](http://wok.mythmon.com/docs/urls/).
View
@@ -1,2 +1,2 @@
-This is a wok site. To see it as rendered HTML, run wok and look in the output
-directory.
+This is a wok site. To see it as rendered HTML, run wok and look in the
+generated 'output' directory.
View
@@ -4,19 +4,27 @@ nav_sort: 3
---
In the wild
-----------
-Wok powers an ever growing list of sites.
+Wok powers an ever-growing list of sites. If you want to see the power
+of what wok can do, or how to do something, these websites are a good
+resource:
-- This site ([source](https://github.com/mythmon/tree/master/docs))
+- This site ([source](https://github.com/mythmon/wok/tree/master/docs))
- [Oregon State University LUG](http://lug.oregonstate.edu)
([source](https://github.com/OSULUG/OSULUG-Website))
-- [robmd.net](http://robmd.net)
- ([source](https://github.com/robatron/robmd.net)) - Personal site of Rob
- McGuire-Dale.
- [Bravo Server](http://bravoserver.org)
([source](https://github.com/MostAwesomeDude/bravo/tree/master/website)) -
A custom Minecraft server written in Python.
+- [robmd.net](http://robmd.net)
+ ([source](https://github.com/robatron/robmd.net)) - Personal web site of
+ Rob McGuire-Dale.
- [uberj.com](http://uberj.com) ([source](https://github.com/uberj/wbsite)) -
- Personal website of Jacques Uber.
+ Personal web site of Jacques Uber.
+- [ngokevin.com](http://ngokevin.com)
+ ([source](https://github.com/ngokevin/ngokevin)) - Personal web site of
+ Kevin Ngo.
+- [corbinsimpson.com](http://corbinsimpson.com)
+ ([source](https://github.com/MostAwesomeDude/website)) - Personal web site
+ of Corbin Simpson.
Contributors
------------
@@ -27,7 +35,7 @@ Without these early adopters, wok would have lacked direction, definition, and
a purpose. Each of them helped me work through figuring out what wok could do,
needed do to, where it was broken, and what it should become.
-- Rob Mcguire-Dale (robatron)
+- Rob McGuire-Dale (robatron)
- Kevin Ngo (ngoke)
- Corbin Simpson (MostAwesomeDude)
- Jacque Uber (uberj)
@@ -37,7 +45,7 @@ Support
If there are bugs or feature requests for wok, please send them to [the issue
tracker][gh-issues].
-For real time support, you can check out the irc channel `#wok` on
+For real-time support, you can check out the irc channel `#wok` on
irc.freenode.net.
[gh-issues]: https://github.com/mythmon/wok/issues
View
@@ -6,30 +6,24 @@ type: index-links-recurse
Install
-------
-If you just want to use wok, then you should install it from the [Python Package
-Index][pypi]. A good way to do that is with `pip`:
+If you just want to use wok, then you should install it from the
+[Python Package Index][pypi]. A good way to do that is with `pip`:
::console
- sudo pip install wok
+ $ sudo pip install wok
-Which will install wok and the required dependencies. You should also install at least one of Markdown, or reStructuredText, for content markup.
-
- ::console
- sudo pip install Markdown
- sudo pip install docutils
-
-If you want Pygments syntax highlighting, you also need Pygments.
-
- ::console
- sudo pip install Pygments
+This will install wok and the required dependencies. It will also install some optional dependencies: the two rendering libraries, [Markdown][mkd], and [reStructuredTest][rst]. It will also install a syntax highlighting library, [Pygments][pymnts].
[pypi]: http://pypi.python.org/pypi
+[mkd]: http://daringfireball.net/projects/markdown/
+[rst]: http://docutils.sourceforge.net/rst.html
+[pgmnts]: http://pygments.org/
Contribute
----------
You can find wok's source code on [Github][gh]. If you find any issues,
please post them to [the issue tracker][gh-issues]. If you want to help
-code, feel free, patches and pull requests are welcome.
+code, feel free. Patches and pull requests are welcome.
[gh]: https://github.com/mythmon/wok
[gh-issues]: https://github.com/mythmon/wok/issues
Oops, something went wrong.

0 comments on commit 05160b5

Please sign in to comment.