Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing some documentation formatting bugs. #218

Merged
merged 1 commit into from Apr 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 25 additions & 25 deletions v7/hierarchical_pages/README.md
@@ -1,46 +1,46 @@
This plugin allows to translate paths by specifying paths in a hierarchy.

Assume you have the following hierarchy of posts (default language English):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That didn’t work — you need a newline before a list. I’ll fix this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Markdown’s spec issues are sometimes annoying. Hopefully, a sensible GFM-cmark library for Python will be out one day.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I thought it would work, though, since I used it in another plugin and thought it works. Now I notice that no, it didn't work either in the other one...

- `about.rst`
- `about/company.rst`
- `about/team.rst`
- `about/team/nikola-tesla.rst`
- `about/team/roberto-alsina.rst`
- `about.rst`
- `about/company.rst`
- `about/team.rst`
- `about/team/nikola-tesla.rst`
- `about/team/roberto-alsina.rst`

Assuming you have set `PRETTY_URLS` to `True` and `SITE_URL` to `https://example.com`,
you can access the pages with the following URLs:
- `https://example.com/about/`
- `https://example.com/about/company/`
- `https://example.com/about/team/`
- `https://example.com/about/team/nikola-tesla/`
- `https://example.com/about/team/roberto-alsina/`
- `https://example.com/about/`
- `https://example.com/about/company/`
- `https://example.com/about/team/`
- `https://example.com/about/team/nikola-tesla/`
- `https://example.com/about/team/roberto-alsina/`

Now assume you want to make your homepage available in more languages, say
also in German. You want the URLs for the translated posts to be:
- `https://example.com/de/ueber/`
- `https://example.com/de/ueber/firma/`
- `https://example.com/de/ueber/mitarbeiter/`
- `https://example.com/de/ueber/mitarbeiter/nikola-tesla/`
- `https://example.com/de/ueber/mitarbeiter/roberto-alsina/`
- `https://example.com/de/ueber/`
- `https://example.com/de/ueber/firma/`
- `https://example.com/de/ueber/mitarbeiter/`
- `https://example.com/de/ueber/mitarbeiter/nikola-tesla/`
- `https://example.com/de/ueber/mitarbeiter/roberto-alsina/`

This can be achieved with the `hierarchical_pages` plugin. If you create
translations:
- `about.de.rst`
- `about/company.de.rst`
- `about/team.de.rst`
- `about/team/nikola-tesla.de.rst`
- `about/team/roberto-alsina.de.rst`
- `about.de.rst`
- `about/company.de.rst`
- `about/team.de.rst`
- `about/team/nikola-tesla.de.rst`
- `about/team/roberto-alsina.de.rst`

and use the `slug` meta data (`.. slug: xxx`) to specify the German slug,
Nikola will place the German output files so that the translations are
available under the desired URLs!

If you use plain Nikola instead, the URLs would be:
- `https://example.com/de/ueber/`
- `https://example.com/de/about/firma/`
- `https://example.com/de/about/mitarbeiter/`
- `https://example.com/de/about/team/nikola-tesla/`
- `https://example.com/de/about/team/roberto-alsina/`
- `https://example.com/de/ueber/`
- `https://example.com/de/about/firma/`
- `https://example.com/de/about/mitarbeiter/`
- `https://example.com/de/about/team/nikola-tesla/`
- `https://example.com/de/about/team/roberto-alsina/`

Note that this plugin requires Nikola 7.8.2. In case version 7.8.2 wasn't
released yet, please use the current master. This plugin requires
Expand Down
10 changes: 5 additions & 5 deletions v7/wordpress_compiler/README.md
Expand Up @@ -21,10 +21,10 @@ PAGES = (
)

COMPILERS = {
"rest": ('.txt', '.rst'),
"wordpress": ('.wp', '.wordpress'),
"markdown": ('.md', '.mdown', '.markdown'),
"html": ('.html', '.htm')
}
"rest": ('.txt', '.rst'),
"wordpress": ('.wp', '.wordpress'),
"markdown": ('.md', '.mdown', '.markdown'),
"html": ('.html', '.htm')
}
```
Then all posts whose content is in files ending with `.wp` or `.wordpress` will be processed by the WordPress compiler plugin.