This repository contains my web site and everything I use to build it, aside from third-party dependencies (Docker, Docker Compose, fish, pandoc...). It was designed to support authoring pages as Markdown in Obsidian, then convert them to HTML. Taken together with the infrastructure components (docker, nginx, cron), the site can be deployed as a container that auto-updates itself periodically, rebuilding any changes that are committed to this Git remote.
- Fork this repository, and clone your fork
- Empty out
src/
- [optional] Create your own Obsidian vault in
src/
- Grep through everything and change anything that says "juh" to whatever you want it to say instead, I guess
- Update
docker-compose.yml
to point to your repo/branch, configure update frequency, etc. - Deploy the docker-compose setup somewhere
- Ping me when you find that this process doesn't work
- Create a markdown file somewhere under
src/
- Commit and push
- Confirm that changes are reflected in your live deployment the next time your cronjob is scheduled to run (whatever you set it to in the docker-compose)
- The index file name is
index.md
. - Paths are rendered with the
.md
extension in the browser. This is kinda mostly so that we don't have to rewrite links when converting from MD to HTML. I wanted the fun features of Obsidian to work as intended, while not requiring any weird tricks from the author. Just write your markdown as markdown, write links to other pages as/path/to/file.md
, and they should work out fine in Obsidian and on the web.- Come to think of it, this necessitates some additional server setup, which is done in
nginx.conf
. Thehttp > server > types
block tells nginx what MIME type to hand out for certain file extensions, which is required so that the browser doesn't just give up and dump the source or try to download every page.
- Come to think of it, this necessitates some additional server setup, which is done in
- You can have a file and a directory with the same name (minus the extension): essays/ and essays.md may coexist in the same directory. A notice will be added to the top of
essays.md
allowing users to explore the tree with the same name.- I haven't tried creating a directory named
something.md
. Please don't.
- I haven't tried creating a directory named
- Stuff added in
js/
andcss/
andfiles/
are placed into top-level directories in the web server (/js/
,/css/
,/files/
). You can configure which dirs get this treatment by changing $resources near the top ofbuild/build.fish
.
- The navbar hasn't been designed to support drop-downs that are mobile-friendly yet. I'm probably not going to work on that problem, either.
- If you wanted to write a raw HTML page alongside your markdown, off the top of my head, I don't remember how that would turn out. I might work on that someday.