On 3 January 2018 at 16:31, Miki <
mesh...@gmail.com> wrote:
> Thank you lots for the prompt answer Chris.
>
> However, it's more complicated than I thought. I found and tried to install
> this plugin sidebar, but my site refuses to build with it (perhaps because
> my site has only single language). And actually I'm not sure if the sidebar
> does what I need (show posts tree sorted by categories).
I think you could write a template that would do it. The plugin
requires a custom messages file by default, although you can just
replace the template tags with raw text.
> Then I looked how to create a reST page which would display all
> categories/tags and their posts. I see there is the post-list command which
> can print all posts for given category/tag. But what I can't find is how to
> cycle trough all categories to run the post-list command for each category.
> Is there any way how to get lists of categories/tags in a reST page?
> Alternatively, is there any template which exposes posts and their
> categories, if I wanted to have only one single page for my site navigation
> (instead of including it in all pages)? I see there is this archiveindex
> template which prints all posts, but is it possible to get category of each
> post, so i could reorganize the posts data in jinja-python code?
For the other two ideas,I’m afraid there isn’t anything built-in.
I can think of three solutions:
1. try to get `sidebar` to work (iterate over category list or something?)
2. use post-list, create some functions (conf.py → GLOBAL_CONTEXT)
that figure out list of categories in them and then produce (category,
posts) pairs or whatever
3. write a custom plugin
(All three would still work best with server-side includes/JS)
PGP: 5EAAEA16