Skip to content
Permalink
Browse files

Merge pull request #218 from getnikola/fixing-formatting-bugs

Fixing some documentation formatting bugs.
  • Loading branch information
felixfontein committed Apr 2, 2017
2 parents 074be63 + 8fa6d8c commit 8c2c74d2d6a516ba4afd40a35ad6ea960efa90fc
Showing with 30 additions and 30 deletions.
  1. +25 −25 v7/hierarchical_pages/README.md
  2. +5 −5 v7/wordpress_compiler/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):
- `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
@@ -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.

0 comments on commit 8c2c74d

Please sign in to comment.
You can’t perform that action at this time.