abakan-zz / ablog

ABlog for blogging with Sphinx
ablog.readthedocs.org
Other
122 stars 34 forks source link

which title when there is only one post #8

Closed lsaffre closed 10 years ago

lsaffre commented 10 years ago

We have the rule that "the title of a post is the title of the section where the post directive occured, except if there is only one post in a document". This exception is probably necessary to be backward compatible with existing posts. But it disturbs me in new blogs. Can we make this exception optional? That is, a new configuration option which I suggest to name "always_post_with_section_header" which defaults to False.

Why I want this: I usually create one file per day, with the date as main header. In the morning I don't know how many blog entries I will write. Example of a day with only one entry: http://luc.saffre-rumma.net/_sources/blog/2014/0223.txt And now every reference to this page uses the document title, for example: http://luc.saffre-rumma.net/ab/tag/lino/ which -in my case- is not what i wanted.

abakan-zz commented 10 years ago

I can do that, it's an easy change. I will use post_use_section_title = False so that all post related config options start with post. I think I can do this before the weekend.

lsaffre commented 10 years ago

Cool. Thank you. No need to hurry. Luc

On 31/07/14 19:11, Ahmet Bakan wrote:

I can do that, it's an easy change. I will use |post_use_section_title = False| so that all post related config options start with |post|. I think I can do this before the weekend.

— Reply to this email directly or view it on GitHub https://github.com/abakan/ablog/issues/8#issuecomment-50780922.

abakan-zz commented 10 years ago

I ended up naming the option as post_always_section, since not only header but also excerpt is going to be taken from the section. With this option on, any post directive will be treated as if it is in a page with multiple posts. Can you let me know how it works for you when you try it out? Also, does the option name sound good? Can it be more suggestive? Thanks!

lsaffre commented 10 years ago

I tried it and it works for me. Thanks! Marking this as closed.