Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/icyflame/blog

Blog-aware site using Jekyll
https://github.com/icyflame/blog

blog hyde-theme jekyll

Last synced: 2 months ago
JSON representation

Blog-aware site using Jekyll

Awesome Lists containing this project

README

        

* Blog
:PROPERTIES:
:CUSTOM_ID: blog
:END:

#+begin_quote
A blog-aware site, using Jekyll, hosted on GitHub Pages.
#+end_quote

** Deployment
:PROPERTIES:
:CUSTOM_ID: deployment
:END:

This is a blog-aware site that is built using the static site generator Jekyll.

The initial configuration of this site put the list of tags in the link of each blog post. The link
structure was =/tag1/tag2/.../tagN/YYYY/MM/DD/post-stub/=. These links are long. More importantly,
they prevent recategorization of posts as that would break the link of the posts. So, I switched to
the concise link structure =/YYYY/MM/DD/post-stub/=.

However, the blog had already been online for several years when I made this switch. So, the current
deployment supports both the initial link structure and the new link structure for *all* posts. This
is done by a CI workflow which generates the website using both link structures and merges the two
folders together using =rsync=.

*** Current configuration
:PROPERTIES:
:CUSTOM_ID: current-configuration
:END:

- Branch with the posts: =master=
- Branch with built site: =published=
- Path of the site inside the =published= branch: =docs/=
- CI workflows are run on GitHub Actions
- Local development is using Docker

** Development
:PROPERTIES:
:CUSTOM_ID: development
:END:

Last updated: /2023-07-22/

Ruby version: *3.2.2*

*** Setting up

The current setup of this blog does not require installation of anything locally *except* Docker and Make.

Once =docker= is installed and the systemd unit =docker.service= is active, you can build the Docker
image required to run a local version of the blog using =make docker-build-image=. This will build
the =blog:latest= image.

Then, you can run a local development server using =make docker-serve-dev=.

Although *not recommended*, you can run a development server locally if you have the correct Ruby
version and all the required versions locally using =make serve-dev BINDTO=127.0.0.1=.

** Scripts
:PROPERTIES:
:CUSTOM_ID: scripts
:END:

*** Publish an org file inside the =posts-org= directory
:PROPERTIES:
:CUSTOM_ID: publish-an-org-file-inside-the-posts-org-directory
:END:

#+begin_src sh
make publish-single FILENAME=posts-org/post.org
#+end_src