Once again, thank you for structuring a plan of action with these stories! :D Really appreciate your interest and help, dear @guilhermecomum! 🙇
This issue is a great opportunity to document how each Org-Mode document becomes an HTML file.
When blorg-cli is called with an:input-pattern that yields a list of Org-Mode files, each file will be parsed and a variable post will be created and exposed within the template. E.g.:
Let's say you have a structure similar to the one I described in #1. And let's say you have an Org-Mode file with the following contents:
The Org-Mode file
#+TITLE: My first little post
#+DATE: <2020-04-26>
#+FILETAGS: :blogging:org-mode:
This is the content of my cool post. We can use *bold* or /italics/ or ~pre-formatted~ or really any other
features, eve code blocks:
#+BEGIN_SRC emacs-lisp
(message "%s" (emacs-version))
#+END_SRC
Processing
During the parsing of the above document, all the file level properties (in this case, title, date and filetags) are collected and made available to the template via the post variable. There are currently three other properties that get inserted in the post object: 1. file name, 2. html with the rendered HTML and 3. slug which is a string that identifies the post and can be used as part of the post URL and is derived from either the post's title or from its file name. In the end of the day, all these variables are made available to the template and can be used in the following way:
It's worth also noting that the :output parameter of the blog-cli function has access to all the post variables. And that's probably where the slug property of the post becomes useful in the first place.
Once again, thank you for structuring a plan of action with these stories! :D Really appreciate your interest and help, dear @guilhermecomum! 🙇
This issue is a great opportunity to document how each Org-Mode document becomes an HTML file.
When
blorg-cli
is called with an:input-pattern
that yields a list of Org-Mode files, each file will be parsed and a variablepost
will be created and exposed within the template. E.g.:Let's say you have a structure similar to the one I described in #1. And let's say you have an Org-Mode file with the following contents:
The Org-Mode file
Processing
During the parsing of the above document, all the file level properties (in this case, title, date and filetags) are collected and made available to the template via the
post
variable. There are currently three other properties that get inserted in thepost
object: 1. file name, 2.html
with the rendered HTML and 3.slug
which is a string that identifies the post and can be used as part of the post URL and is derived from either the post's title or from its file name. In the end of the day, all these variables are made available to the template and can be used in the following way:The template
It's worth also noting that the
:output
parameter of theblog-cli
function has access to all the post variables. And that's probably where theslug
property of the post becomes useful in the first place.