Using "nikola" for static HTML generation
I'm keeping notes. Maybe later they'll be useful to someone else? I'm trying to use the nikola tag to collect musings, as well.
Wishlist
A thing that I'd like to automate are the commands
$ nikola new_post -d -e -f markdown $ nikola new_page -e -f markdown
I also have this nice sort of cobbled-together build script that seems
to more aligned with my ideas about rebuilding than does nikola auto
:
$ nikola build && while sleep 1 ; do echo -n -e \\r $(date +"%F %T :") ""; if find . -type f -newer .doit.db.dat | grep -v '(cache|output)' ; then nikola build ; fi ; done
I'd like to have a "watched tags" sort of a feature where I can include some little code snippet to produce an index of blog posts with that tag on a page. That might make it easier to collate ideas in one place.
Solved problems
Videos
For video, there isn't a Markdown syntax the way there is for images.
Youtube videos will give you an embed link
(example).
For videos that I've actually downloaded, the HTML <video>
tag is
available (example).
Static landing page
By default the landing page is an index of recent posts. Changing
that took a couple of tries. In conf.py
:
- Put the blog index somewhere other than
/index.html
:
INDEX_PATH = 'posts'
- Put
index.md
in/pages
, where it will get processed ... but tellnikola
to relocate it to the top-level directory.
PAGES = ( ("pages/index.md", "", "page.tmpl"), ("pages/*.md", "pages", "page.tmpl"), ... )
Note that index.tmpl
is the wrong template to make a page.