Open benjaminweb opened 7 years ago
Multiple post directives in a single document are handled as Posting Sections, but I think it's a little different from how you laid it out. This is the source to Posting and Listing page where Posting Sections was posted later.
Each post directive will look for a title in it's parent. I think that's the main difference from how you described. I am not sure now what happens when title is not found, but I will try it soon.
Firstly, I would like to emphasise I did not consider multiple post directives possible. I wrote my issue with that in mind. The behaviour shown below confirmed that pre-conception, which seems to be wrong as per the documentation you referenced.
Remarkably, it seems already to be closer to what I desire than I initially thought.
The following content will lead to a hang-up at `loading sources... [ 66%] first-post
.
Do I use the correct syntax? If not, what's the right way to do it?
.. post:: Mar 07, 2017
:tags: atag
:author: Benjamin Franklin
first
=====
World, hello again! This is the very first paragraph.
.. post:: Mar 07, 2017
:tags: atag
:author: Benjamin Franklin
second
======
This is the second paragraph.
If a title is not provided, the following exception is raised:
File "/usr/local/lib/python3.6/site-packages/ablog/post.py", line 174, in _get_section_title
return title.astext()
UnboundLocalError: local variable 'title' referenced before assignment
As of now ablog seems to come very near to what I desire as a blog tool for my requirements.
We think the more we can configure each blog entry, the better we can blog. However, we end up configuring and not blogging!
For me there are two subtle obstacles of getting content into the blog:
Translating this into requirements for a content first principle:
.. post:: Month DD, year
without title requirement: no second (!) redundant typing of the titleYou can instantly start writing on a piece of paper. That is not true for a new blog entry per se: You would have to define a new file name (if not, still a temporary one which you don't want to move later on, so your attention gets completely distracted from the content). Then the content will only be visible.
Vision: Type
new-post
. Type your content. Finis. That will append the content to the single file with default date and meta-data.The single file would look like:
That would be similar to the
.. code-block:: python
directive that can be used multiple times in a document. However, the code that follows is indented. For.. post::
it isn't, I feel because there's only one allowed per file. Considering multiple.. post::
directives for a single file, the indents would be another, new obstacle. Could one get rid of that, so allowing the above example to just work?Any change, in particular those with the best intent, may damage the overall package at the bottom line.
=> Would the ability for multiple post directives conflict ablog's current mechanics?