1
0
Fork 0
A fun project to see if someone could generate a blog from org files using nothing but emacs. Turns out, you can!
Go to file
Seth Doty 915569525b
Rename build-publish.yml to build-publish.yml.DISABLED
2021-08-15 20:35:33 -05:00
.github/workflows Rename build-publish.yml to build-publish.yml.DISABLED 2021-08-15 20:35:33 -05:00
css Initial commit of org-only blog 2021-01-01 22:00:40 -06:00
posts/2021-01-01-first-post Initial commit of org-only blog 2021-01-01 22:00:40 -06:00
snippets Update preamble.html 2021-05-12 22:34:34 -05:00
.gitignore Initial commit of org-only blog 2021-01-01 22:00:40 -06:00
CNAME.ORIG Rename CNAME to CNAME.ORIG 2021-08-15 20:32:53 -05:00
LICENSE Initial commit of org-only blog 2021-01-01 22:00:40 -06:00
Makefile Initial commit of org-only blog 2021-01-01 22:00:40 -06:00
README.org Update README.org 2021-01-04 10:59:00 -06:00
build.sh Initial commit of org-only blog 2021-01-01 22:00:40 -06:00
index.org fix typo 2021-01-01 23:14:12 -06:00
publish.el remove unused functions 2021-01-02 19:49:14 -06:00
setup.org Initial commit of org-only blog 2021-01-01 22:00:40 -06:00

README.org

My homepage with org-mode

https://github.com/sethmdoty/sethmdoty.github.io/workflows/Build%20and%20publish%20to%20pages/badge.svg

Introduction

This setup based on org-mode and heavily based on ideas from https://github.com/dmacvicar/site.org.

Implementation

For details about the implementation see the Github Source.

Usage

  • Posts go into posts/ Preferably in their own subdirectory together with all their assets (self-contained)

To generate:

$ make

The output site will be rendered in public/.

RSS Feeds

This part is complicated and easy to forget how it works everytime something breaks.

  • Each export block in the project translates the full site, file by file, to another format (taking into account excludes, includes)
  • Sitemaps allow to generate a map of all converted files in a single org file. Eg. a sitemap in posts, will generate an org file with a list of links to all posts. This is particularly useful for the rss exporter.
  • We have an export entry in the project that goes over _posts/, takes a dummy export function, but generates a sitemap. This allows us to end with a rss.org file without really exporting anything.
  • Then we use another entry in the project, that uses the RSS exporter, including only rss.org in order to generate rss.xml
  • Now, the default sitemap function generates something like:

      * Entries
        - [[One entry][http://link]]
        - [[Second entry][http://link]]

    Those will not be exported correctly to a list of links. Only the headline will be exported in the RSS file.

      * [[One entry][http://link]]
      * [[Second entry][http://link]]
  • By default, the link will reference the file where the link appears. Something like

    <link>http://rss.org#section</link>

    To change this we use org-rss-use-entry-url-as-guid and set the RSS_PERMALINK property of the headline when generating the sitemap. The RSS exporter will then use the property for the <link> tag content.

  • The custom entry formatter adds a headline to a temp buffer and then uses org-set-property to set the custom properties.
  • The sitemap function uses org-list-to-generic to create a list of headlines without adding a star, as it will be added by the entry function.

Features

Drafts

To hide a post from the list of recent posts or the full archive, use:

#+DRAFT t

Note that the post will still be published, but you will need to access it by its URL directly.

License

The code used for generating the site is licensed under the MIT license.

The content of the site, Copyright (©) 2021 Seth Doty.