Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Commit

Permalink
Version 0.9
Browse files Browse the repository at this point in the history
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
mythmon committed Feb 19, 2012
2 parents faca0b4 + ff59819 commit ffad8f0
Show file tree
Hide file tree
Showing 50 changed files with 740 additions and 190 deletions.
80 changes: 33 additions & 47 deletions README.mkd
Expand Up @@ -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.

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
-------------
Expand All @@ -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/).
4 changes: 2 additions & 2 deletions docs/README
@@ -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.
24 changes: 16 additions & 8 deletions docs/content/community.mkd
Expand Up @@ -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
------------
Expand All @@ -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)
Expand All @@ -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
22 changes: 8 additions & 14 deletions docs/content/docs.mkd
Expand Up @@ -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
Expand Down

0 comments on commit ffad8f0

Please sign in to comment.