Support Files Generator

Menu

This page documents the support files required to build this website, such as the navigation bar and the list of publications. These files change seldom and, therefore can be invoked on a need-basis, rather than being executed each time.

For this reason, they are defined in external scripts which are better run from the command line: if set here, in fact, they would run every time this page is exported to HTML.

Headers and Assets

The HTML headers of this website are defined in a set of files which are then included by all pages. The files, named _html-head-lN.org, include assets using relative links, at different hierarchical levels:

  • L0 assumes the page to be at the same level of the website root
  • L1 assumes the page to be one level down with respect to the website root

Relative links simplify provisioning of the website on a local server, since all links are valid by definition.

The script also takes care of fingerprinting and bundling assets. The script has to be run any time headers or assets change.

Navigation

The navigation bar of this website is defined in a set of files which are then included by all pages. The files, named _navigation-lN.org, define the navigation bar using relative links, at different hierarchical levels:

  • L0 assumes the page to be at the same level of the website root
  • L1 assumes the page to be one level down with respect to the website root

Relative links simplify provisioning of the website on a local server, since all links are valid by definition.

Bookstream

The Bookstream script takes care of reading my Calibre library and generate a YAML file with the specification of the books I read.

The YAML file is, in turn, used as input for the books section of my homepage.

The use of a YAML file decouples reading from Calibre from website building, yielding better performances and more robust code: website building does not depend upon reading data from Calibre.

The script has to be launched when I finish a book like this:

ruby ../_script/generate-bookstream.rb

Publication List

The publication list script takes care of reading the list of publications from a BiBTex file and generates a YAML file.

The YAML file is, in turn, used as input for the publications list in my homepage.

The use of a YAML file decouples reading from Calibre from website building, yielding better performances and more robust code: website building does not depend upon reading data from Calibre.

The script has to be launched when I publish a new paper.

Manual Generation

The following snippets allow to re-generate the portions of the website impacted by the manual publication of a post:

(org-publish-file "../notes/chronological.org")
(org-publish-file "../notes/categories.org")
(org-publish-file "../notes/index.org")

(org-publish-file "generate-xml-sitemap.org")
(copy-file "../sitemap.xml" "../_site/sitemap.xml" t)

(org-publish-file "generate-atom.org")
(copy-file "../site.atom" "../_site/sitem.atom" t)