obsidian-digital-garden
Cheatsheet for obsidian-digital-garden so that I don't have to open dg-docs.ole.dev all the time. See: How does this site work?
Note-specific settings
The following goes in note's metadata at the top of the page.
- Publish a note → dg-publish: true
- Use a different title than your note's title → title: custom title
- Change the permalink → dg-permalink: "mynote"
- Custom path in the sidebar → dg-path: "Advanced/Features.md"
- Pin to file tree → dg-pinned: true
- Hide from file tree → dg-hide: true
- Hide from graph view → dg-hide-in-graph: true
- Set custom CSS class → dg-content-classes: cards
It's also possible to set custom meta tags in <head>:
dg-metatags:
    description: "some description"
	"og:image": "https//example.com/someimage.png"
Adding custom components
Doing things the official way means you'd be able to merge obsidian-digital-garden updates when they get released.
Create a custom file in src/site/_includes/components/user/<namespace>/<slot>/<filename>.njk. Filename should be the name of the feature.
Namespaces
- index→ Will be added to the homepage.
- notes→ Will be added to all note pages.
- common→ Will be added on both the home page and all note pages.
Slots
- head→ Inside the- <head>tag.
- header→ Inside the- <header>tag, after tags and note title.
- beforeContent→ Just before page content.
- afterContent→ Just after page content.
- footer→ Inside footer.
To include custom JavaScript, place it in src/site/scripts and reference it like this:
<script src="/scripts/custom-script.js" />
Unless specified otherwise, this work is licensed under a Creative Commons BY-NC-SA 4.0.