website stack

Signpost11 Signposts
Sapling5 Saplings
Chest5 Chests
Seedling3 Seedlings
Tree2 Trees
Withered1 Withered
Stone1 Stone
You behold the origin...

How I built this website

There are two truths behind this website:

  1. I wanted to revive my old website, pgabriel.gitlab.io , over a single weekend.
  2. I love Obsidian but don't want to pay for Obsidian Publish ($8 per month).

Here's how I did it for free (except for the custom domain name).

Requirements

Setup

To be honest, I just followed the steps in the getting started page of the Obsidian Digital Garden plugin. It was very straight-forward.

Security

Warning

This domain DOES NOT send out emails. If you get an email from this domain, it is not from me.

Wisdump.work provided a guide for adding email security. The Vercel setup already adds an SPF policy, but the additional recommendation for DMARC policy worked out-of-box.

Publishing

My routine is simple:

  1. Create a new note; optional - use template to populate properties
  2. Write
  3. Set df-publish: true
  4. Use Digital Garden Publication Center to publish

Maps

Creating "Index" page

Since the digital swamp is completely flat, I wanted a view where anyone could see all the published pages in a single, sorted table.

So I used dataform to create Everything.

To get the in-line counts, just at "$=" to the beginning of these two lines:

To generate the tables, set these code blocks to dataview

Map templates

A more focused "index" is called a "Map", sometimes called a map of content.

Tags map

These maps are usually just for specific tags. To build a map for a specific tag, you can just paste the following template into an empty markdown file:

Customization

Obsidian vault setup

My vault is very flat, it looks like:

_static/ - for unchanging files like images
	template/ - for obsidian note templates
Maps/ - contains maps of content to navigate swamp
Swamp/ - flat layout of pages
about.md
contact.md
exit.md
home.md

Make an Obsidian note template for new pages

The properties are kind of hard to find, here is the full set for convenience

---
dg-publish: false
dg-home: false
dg-home-link: false
dg-show-backlinks: false
dg-show-local-graph: false
dg-show-inline-title: false
dg-show-file-tree: false
dg-enable-search: false
dg-show-toc: false
dg-permalink: "mynote"
dg-path: "Advanced/Features.md"
dg-pinned: true
dg-hide: true
dg-hide-in-graph: true
dg-note-icon: 1
---
Attention

I tried using dg-path but it messed with Transclusion

More information about default and advanced properties.

Custom domain from Vercel

Buying a domain from Vercel was very easy, you just have to start here. By keeping the public web parts all on Vercel, it was trivial to add the custom domain to the web app.

Custom avatar

Confession, I did not draw my avatar. Instead, I used ChatGPT Image Generation to turn my LinkedIn profile picture.

My prompt looked something like this:

Please generate a simple cartoon version of the attached image. Keep it to two tones. 

After some adjustments, I then converted the output image to gray-scale.

Info

If you also use AI to make art, please consider supporting a local artist.

Custom favicon

Digital Garden's favicon support is limited to SVG files. I was able to make a custom text favicon in two steps:

  1. Use favicon.io to create a custom text icon pack (I used my initials)
    1. This produces a zip file of several formats, including PNG
  2. Use an online file converter to turn one of the smaller PNG files into SVG

This one is a little tricky... the Digital Garden plug-in supports something called "slots". In this case, it means that you can define custom snippets of code that will be inserted into specific parts of the webpage HTML.

In this case, the slot in question is <footer></footer>, and we want to add code inside this section.

To do this, you have to work with the github repository directly:

  1. Clone the github repo of your website to your local machine
  2. Create the following folder(s) that complete the path: src/site/_includes/components/user/common/footer/
    1. common here means the code will inserted into all footers; you can replace with index or notes to limit scope
  3. Create a new file for each code block you want to inject
  4. Re-build the website

I wanted to center some convenient external links.

See the discussion here

Then you need to enable Analytics in Vercel

The icon in the bottom right corner is another custom footer. See the discussion here, and reference from pkms-notes.

  1. First, create a new file

source

  1. Update custom CSS

source

Product of a vibe coding session, pretty proud of this one

See this discussion. You also need to copy over the image files from topobon repo and tag your notes.

Overall, I had to:

  1. Copy over the svg files from topobon repo
  2. Add the forest.njk to notes header slot
  3. Enable all front-matter to be passed through from obsidian
  4. Add dg-note-icon parameter to your note
Tip

It helps to set defaults using the plug-in. For example, I want the "1" icon to be used by default for new notes. You can also add to a template, if that's your thing.