updates, samples, readme improvements
This commit is contained in:
parent
679534c42b
commit
77881df224
30
README.md
30
README.md
|
@ -1,6 +1,30 @@
|
|||
This is a highly opinionated (read: entirely based on my config and not super flexible yet) WIP way to turn an [obsidian](https://obsidian.md) vault into a static site. It also generates a couple (mostly) compliant atom feeds, and more will be improved in the future. This is written in fish cause it's the shell I use and I don't want to use full programming languages atm if I can avoid it. It could probably be improved and any feedback is welcome
|
||||
This is a highly opinionated (read: entirely based on my config and not super flexible yet) WIP way to turn an [obsidian](https://obsidian.md) vault into a static site. It also generates a couple (mostly) compliant atom feeds, and more will be improved in the future. This is written in fish cause it's the shell I use and I don't want to use full programming languages atm if I can avoid it. It could probably be improved and any feedback is welcome.
|
||||
|
||||
requires
|
||||
If you want to see my website's code you can find it [here](https://codeberg.org/proto-0/website) and my wiki can be found [here](https://git.merveilles.town/proto/wiki)
|
||||
|
||||
**requires**
|
||||
- [pandoc](https://github.com/jgm/pandoc)
|
||||
- [yq](https://github.com/mikefarah/yq)
|
||||
- [obsidian-export](https://github.com/zoni/obsidian-export)
|
||||
- [obsidian-export](https://github.com/zoni/obsidian-export)
|
||||
- [sitemap-generator-cli](https://github.com/lgraubner/sitemap-generator-cli)
|
||||
|
||||
|
||||
## how to use
|
||||
|
||||
create an obsidian vault and add some notes to it, a sample [note](sample_obsidian_note.md) is provided.
|
||||
|
||||
move obsidian-ssg.fish to your config
|
||||
```bash
|
||||
git clone 'https://git.merveilles.town/proto/obsidian-ssg'
|
||||
cd obsidian-ssg
|
||||
cp obsidian-ssg.fish ~/.config/fish/functions/obsidian-ssg.fish
|
||||
```
|
||||
|
||||
run with the arguments
|
||||
```
|
||||
obsidian-ssg /path/to/wiki /path/to/website /path/to/pandoc_template.html
|
||||
```
|
||||
|
||||
### optional
|
||||
|
||||
I also have my [config](obsidian-linter-data.json) for [obsidian-linter](https://github.com/platers/obsidian-linter) provided so copy that to $VAULT_PATH/.obsidian/plugins/obsidian-linter/data.json and lint all files in the vault in order to ensure all markdown is formatted correctly
|
|
@ -0,0 +1,282 @@
|
|||
{
|
||||
"ruleConfigs": {
|
||||
"add-blank-line-after-yaml": {
|
||||
"enabled": false
|
||||
},
|
||||
"escape-yaml-special-characters": {
|
||||
"enabled": false,
|
||||
"try-to-escape-single-line-arrays": false
|
||||
},
|
||||
"force-yaml-escape": {
|
||||
"enabled": false,
|
||||
"force-yaml-escape-keys": ""
|
||||
},
|
||||
"format-tags-in-yaml": {
|
||||
"enabled": true
|
||||
},
|
||||
"format-yaml-array": {
|
||||
"enabled": true,
|
||||
"alias-key": true,
|
||||
"tag-key": true,
|
||||
"default-array-style": "single-line",
|
||||
"default-array-keys": true,
|
||||
"force-single-line-array-style": "",
|
||||
"force-multi-line-array-style": ""
|
||||
},
|
||||
"insert-yaml-attributes": {
|
||||
"enabled": true,
|
||||
"text-to-insert": "type: note\naliases: \ntags: "
|
||||
},
|
||||
"move-tags-to-yaml": {
|
||||
"enabled": false,
|
||||
"how-to-handle-existing-tags": "Nothing",
|
||||
"tags-to-ignore": ""
|
||||
},
|
||||
"remove-yaml-keys": {
|
||||
"enabled": false,
|
||||
"yaml-keys-to-remove": ""
|
||||
},
|
||||
"yaml-key-sort": {
|
||||
"enabled": true,
|
||||
"yaml-key-priority-sort-order": "date-created:\ndate-modified:\ntype:\naliases: \ntags: ",
|
||||
"priority-keys-at-start-of-yaml": true,
|
||||
"yaml-sort-order-for-other-keys": "None"
|
||||
},
|
||||
"yaml-timestamp": {
|
||||
"enabled": true,
|
||||
"date-created": true,
|
||||
"date-created-key": "date-created",
|
||||
"force-retention-of-create-value": true,
|
||||
"date-modified": true,
|
||||
"date-modified-key": "date-modified",
|
||||
"format": "YYYY-MM-DDTHH:00:00"
|
||||
},
|
||||
"yaml-title": {
|
||||
"enabled": false,
|
||||
"title-key": "title",
|
||||
"mode": "first-h1-or-filename-if-h1-missing"
|
||||
},
|
||||
"yaml-title-alias": {
|
||||
"enabled": true,
|
||||
"preserve-existing-alias-section-style": true,
|
||||
"keep-alias-that-matches-the-filename": false,
|
||||
"use-yaml-key-to-keep-track-of-old-filename-or-heading": false
|
||||
},
|
||||
"capitalize-headings": {
|
||||
"enabled": true,
|
||||
"style": "Title Case",
|
||||
"ignore-case-words": true,
|
||||
"ignore-words": "macOS, iOS, iPhone, iPad, JavaScript, TypeScript, AppleScript, I",
|
||||
"lowercase-words": "a, an, the, aboard, about, abt., above, abreast, absent, across, after, against, along, aloft, alongside, amid, amidst, mid, midst, among, amongst, anti, apropos, around, round, as, aslant, astride, at, atop, ontop, bar, barring, before, B4, behind, below, beneath, neath, beside, besides, between, 'tween, beyond, but, by, chez, circa, c., ca., come, concerning, contra, counting, cum, despite, spite, down, during, effective, ere, except, excepting, excluding, failing, following, for, from, in, including, inside, into, less, like, minus, modulo, mod, near, nearer, nearest, next, notwithstanding, of, o', off, offshore, on, onto, opposite, out, outside, over, o'er, pace, past, pending, per, plus, post, pre, pro, qua, re, regarding, respecting, sans, save, saving, short, since, sub, than, through, thru, throughout, thruout, till, times, to, t', touching, toward, towards, under, underneath, unlike, until, unto, up, upon, versus, vs., v., via, vice, vis-à-vis, wanting, with, w/, w., c̄, within, w/i, without, 'thout, w/o, abroad, adrift, aft, afterward, afterwards, ahead, apart, ashore, aside, away, back, backward, backwards, beforehand, downhill, downstage, downstairs, downstream, downward, downwards, downwind, east, eastward, eastwards, forth, forward, forwards, heavenward, heavenwards, hence, henceforth, here, hereby, herein, hereof, hereto, herewith, home, homeward, homewards, indoors, inward, inwards, leftward, leftwards, north, northeast, northward, northwards, northwest, now, onward, onwards, outdoors, outward, outwards, overboard, overhead, overland, overseas, rightward, rightwards, seaward, seawards, skywards, skyward, south, southeast, southwards, southward, southwest, then, thence, thenceforth, there, thereby, therein, thereof, thereto, therewith, together, underfoot, underground, uphill, upstage, upstairs, upstream, upward, upwards, upwind, west, westward, westwards, when, whence, where, whereby, wherein, whereto, wherewith, although, because, considering, given, granted, if, lest, once, provided, providing, seeing, so, supposing, though, unless, whenever, whereas, wherever, while, whilst, ago, according to, as regards, counter to, instead of, owing to, pertaining to, at the behest of, at the expense of, at the hands of, at risk of, at the risk of, at variance with, by dint of, by means of, by virtue of, by way of, for the sake of, for sake of, for lack of, for want of, from want of, in accordance with, in addition to, in case of, in charge of, in compliance with, in conformity with, in contact with, in exchange for, in favor of, in front of, in lieu of, in light of, in the light of, in line with, in place of, in point of, in quest of, in relation to, in regard to, with regard to, in respect to, with respect to, in return for, in search of, in step with, in touch with, in terms of, in the name of, in view of, on account of, on behalf of, on grounds of, on the grounds of, on the part of, on top of, with a view to, with the exception of, à la, a la, as soon as, as well as, close to, due to, far from, in case, other than, prior to, pursuant to, regardless of, subsequent to, as long as, as much as, as far as, by the time, in as much as, inasmuch, in order to, in order that, even, provide that, if only, whether, whose, whoever, why, how, or not, whatever, what, both, and, or, not only, but also, either, neither, nor, just, rather, no sooner, such, that, yet, is, it, ssg"
|
||||
},
|
||||
"file-name-heading": {
|
||||
"enabled": true
|
||||
},
|
||||
"header-increment": {
|
||||
"enabled": false,
|
||||
"start-at-h2": false
|
||||
},
|
||||
"headings-start-line": {
|
||||
"enabled": false
|
||||
},
|
||||
"remove-trailing-punctuation-in-heading": {
|
||||
"enabled": false,
|
||||
"punctuation-to-remove": ".,;:!。,;:!"
|
||||
},
|
||||
"footnote-after-punctuation": {
|
||||
"enabled": false
|
||||
},
|
||||
"move-footnotes-to-the-bottom": {
|
||||
"enabled": false
|
||||
},
|
||||
"re-index-footnotes": {
|
||||
"enabled": false
|
||||
},
|
||||
"auto-correct-common-misspellings": {
|
||||
"enabled": false,
|
||||
"ignore-words": ""
|
||||
},
|
||||
"blockquote-style": {
|
||||
"enabled": true,
|
||||
"style": "space"
|
||||
},
|
||||
"convert-bullet-list-markers": {
|
||||
"enabled": true
|
||||
},
|
||||
"default-language-for-code-fences": {
|
||||
"enabled": false,
|
||||
"default-language": ""
|
||||
},
|
||||
"emphasis-style": {
|
||||
"enabled": true,
|
||||
"style": "asterisk"
|
||||
},
|
||||
"no-bare-urls": {
|
||||
"enabled": false,
|
||||
"no-bare-uris": false
|
||||
},
|
||||
"ordered-list-style": {
|
||||
"enabled": true,
|
||||
"number-style": "ascending",
|
||||
"list-end-style": "."
|
||||
},
|
||||
"proper-ellipsis": {
|
||||
"enabled": false
|
||||
},
|
||||
"quote-style": {
|
||||
"enabled": true,
|
||||
"single-quote-enabled": true,
|
||||
"single-quote-style": "''",
|
||||
"double-quote-enabled": true,
|
||||
"double-quote-style": "\"\""
|
||||
},
|
||||
"remove-consecutive-list-markers": {
|
||||
"enabled": true
|
||||
},
|
||||
"remove-empty-list-markers": {
|
||||
"enabled": true
|
||||
},
|
||||
"remove-hyphenated-line-breaks": {
|
||||
"enabled": true
|
||||
},
|
||||
"remove-multiple-spaces": {
|
||||
"enabled": false
|
||||
},
|
||||
"strong-style": {
|
||||
"enabled": true,
|
||||
"style": "asterisk"
|
||||
},
|
||||
"two-spaces-between-lines-with-content": {
|
||||
"enabled": false
|
||||
},
|
||||
"unordered-list-style": {
|
||||
"enabled": true,
|
||||
"list-style": "-"
|
||||
},
|
||||
"compact-yaml": {
|
||||
"enabled": true,
|
||||
"inner-new-lines": true
|
||||
},
|
||||
"consecutive-blank-lines": {
|
||||
"enabled": true
|
||||
},
|
||||
"convert-spaces-to-tabs": {
|
||||
"enabled": false,
|
||||
"tabsize": 4
|
||||
},
|
||||
"empty-line-around-blockquotes": {
|
||||
"enabled": true
|
||||
},
|
||||
"empty-line-around-code-fences": {
|
||||
"enabled": true
|
||||
},
|
||||
"empty-line-around-math-blocks": {
|
||||
"enabled": true
|
||||
},
|
||||
"empty-line-around-tables": {
|
||||
"enabled": true
|
||||
},
|
||||
"heading-blank-lines": {
|
||||
"enabled": true,
|
||||
"bottom": true,
|
||||
"empty-line-after-yaml": true
|
||||
},
|
||||
"line-break-at-document-end": {
|
||||
"enabled": true
|
||||
},
|
||||
"move-math-block-indicators-to-their-own-line": {
|
||||
"enabled": true
|
||||
},
|
||||
"paragraph-blank-lines": {
|
||||
"enabled": false
|
||||
},
|
||||
"remove-empty-lines-between-list-markers-and-checklists": {
|
||||
"enabled": true
|
||||
},
|
||||
"remove-link-spacing": {
|
||||
"enabled": false
|
||||
},
|
||||
"remove-space-around-characters": {
|
||||
"enabled": false,
|
||||
"include-fullwidth-forms": true,
|
||||
"include-cjk-symbols-and-punctuation": true,
|
||||
"include-dashes": true,
|
||||
"other-symbols": ""
|
||||
},
|
||||
"remove-space-before-or-after-characters": {
|
||||
"enabled": false,
|
||||
"characters-to-remove-space-before": ",!?;:).’”]",
|
||||
"characters-to-remove-space-after": "¿¡‘“(["
|
||||
},
|
||||
"space-after-list-markers": {
|
||||
"enabled": false
|
||||
},
|
||||
"space-between-chinese-japanese-or-korean-and-english-or-numbers": {
|
||||
"enabled": false
|
||||
},
|
||||
"trailing-spaces": {
|
||||
"enabled": true,
|
||||
"twp-space-line-break": false
|
||||
},
|
||||
"add-blockquote-indentation-on-paste": {
|
||||
"enabled": false
|
||||
},
|
||||
"prevent-double-checklist-indicator-on-paste": {
|
||||
"enabled": false
|
||||
},
|
||||
"prevent-double-list-item-indicator-on-paste": {
|
||||
"enabled": false
|
||||
},
|
||||
"proper-ellipsis-on-paste": {
|
||||
"enabled": false
|
||||
},
|
||||
"remove-hyphens-on-paste": {
|
||||
"enabled": false
|
||||
},
|
||||
"remove-leading-or-trailing-whitespace-on-paste": {
|
||||
"enabled": false
|
||||
},
|
||||
"remove-leftover-footnotes-from-quote-on-paste": {
|
||||
"enabled": false
|
||||
},
|
||||
"remove-multiple-blank-lines-on-paste": {
|
||||
"enabled": false
|
||||
},
|
||||
"dedupe-yaml-array-values": {
|
||||
"enabled": false,
|
||||
"dedupe-alias-key": true,
|
||||
"dedupe-tag-key": true,
|
||||
"dedupe-array-keys": true,
|
||||
"ignore-keys": ""
|
||||
},
|
||||
"sort-yaml-array-values": {
|
||||
"enabled": false,
|
||||
"sort-alias-key": true,
|
||||
"sort-tag-key": true,
|
||||
"sort-array-keys": true,
|
||||
"ignore-keys": "",
|
||||
"sort-order": "Ascending Alphabetical"
|
||||
}
|
||||
},
|
||||
"lintOnSave": false,
|
||||
"recordLintOnSaveLogs": false,
|
||||
"displayChanged": true,
|
||||
"lintOnFileChange": true,
|
||||
"displayLintOnFileChangeNotice": false,
|
||||
"settingsConvertedToConfigKeyValues": true,
|
||||
"foldersToIgnore": [
|
||||
"private",
|
||||
"lib/templates"
|
||||
],
|
||||
"linterLocale": "system-default",
|
||||
"logLevel": "ERROR",
|
||||
"lintCommands": [],
|
||||
"customRegexes": [],
|
||||
"commonStyles": {
|
||||
"aliasArrayStyle": "single-line",
|
||||
"tagArrayStyle": "single-line",
|
||||
"minimumNumberOfDollarSignsToBeAMathBlock": 2,
|
||||
"escapeCharacter": "\"",
|
||||
"removeUnnecessaryEscapeCharsForMultiLineArrays": false
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
date-created: 2024-01-01T00:00:00
|
||||
date-modified: 2024-01-01T00:00:00
|
||||
type: note
|
||||
aliases: [Sample]
|
||||
tags: []
|
||||
---
|
||||
|
||||
# Sample
|
|
@ -0,0 +1,76 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="date" content='$date-created$'>
|
||||
<link rel="stylesheet" type="text/css" href="/lib/css/normalize.css">
|
||||
<link rel="stylesheet" type="text/css" href="/lib/css/style.css">
|
||||
<link rel="icon" href="/lib/images/me.png">
|
||||
<link rel="alternate" type="application/atom+xml" title="blog" href="https://proto.garden/rss/blog.xml">
|
||||
<link rel="alternate" type="application/atom+xml" title="notes" href="https://proto.garden/rss/notes.xml">
|
||||
<link rel="alternate" type="application/atom+xml" title="notes" href="https://proto.garden/rss/recipes.xml">
|
||||
<link rel="alternate" type="application/atom+xml" title="notes" href="https://proto.garden/rss/recipes.xml">
|
||||
<link rel="alternate" type="application/atom+xml" title="music" href="https://proto.garden/rss/faircamp.rss">
|
||||
<link rel="webmention" href="https://webmention.io/proto.garden/webmention">
|
||||
<meta name="theme-color" content="#7bad9f">
|
||||
<meta name="keywords" content="$tags$">
|
||||
<title>proto - $aliases$</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<img src="/lib/images/me.png"
|
||||
alt="a figure wearing a shirt and scarf with a floating crystalline head against an abstract blue background">
|
||||
<h1>proto ⋄</h1>
|
||||
<nav>
|
||||
<a href="./">up</a>
|
||||
<a href="/">back to homepage</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
$body$
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p>
|
||||
<b>♥ proto</b>
|
||||
<a href="https://merveilles.town/@proto" rel="me" target="_blank">
|
||||
<svg width="30" height="30" fill="#8eb29a" stroke="none" viewbox="60 60 200 200"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<title>proto on mastodon</title>
|
||||
<g>
|
||||
<path
|
||||
d="M185,65 A60,60 0 0,0 125,125 L185,125 Z M125,245 A60,60 0 0,0 185,185 L125,185 Z M95,125 A30,30 0 0,1 125,155 A30,30 0 0,1 95,185 A30,30 0 0,1 65,155 A30,30 0 0,1 95,125 Z M155,125 A30,30 0 0,1 185,155 A30,30 0 0,1 155,185 A30,30 0 0,1 125,155 A30,30 0 0,1 155,125 Z M215,125 A30,30 0 0,1 245,155 A30,30 0 0,1 215,185 A30,30 0 0,1 185,155 A30,30 0 0,1 215,125 " />
|
||||
<path
|
||||
d="M125,65 A60,60 0 0,1 185,125 L125,125 Z M185,245 A60,60 0 0,1 125,185 L185,185 Z M65,65 A60,60 0 0,1 125,125 L65,125 Z M65,245 A60,60 0 0,0 125,185 L65,185 Z M245,65 A60,60 0 0,0 185,125 L245,125 Z M245,245 A60,60 0 0,1 185,185 L245,185 Z" />
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">
|
||||
<svg viewbox="0 0 30 30" fill="#8eb29a" style="width: 2rem;" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>creative commons 4.0</title>
|
||||
<path
|
||||
d="M14.972 0c4.196 0 7.769 1.465 10.715 4.393A14.426 14.426 0 0128.9 9.228C29.633 11.04 30 12.964 30 15c0 2.054-.363 3.978-1.085 5.772a13.77 13.77 0 01-3.2 4.754 15.417 15.417 0 01-4.983 3.322A14.932 14.932 0 0114.973 30c-1.982 0-3.88-.38-5.692-1.14a15.087 15.087 0 01-4.875-3.293c-1.437-1.437-2.531-3.058-3.281-4.862A14.71 14.71 0 010 15c0-1.982.38-3.888 1.138-5.719a15.062 15.062 0 013.308-4.915C7.303 1.456 10.812 0 14.972 0zm.055 2.706c-3.429 0-6.313 1.196-8.652 3.589a12.896 12.896 0 00-2.72 4.031 11.814 11.814 0 00-.95 4.675c0 1.607.316 3.156.95 4.646a12.428 12.428 0 002.72 3.992 12.362 12.362 0 003.99 2.679c1.483.616 3.037.924 4.662.924 1.607 0 3.164-.312 4.675-.937a12.954 12.954 0 004.084-2.705c2.339-2.286 3.508-5.152 3.508-8.6 0-1.66-.304-3.231-.91-4.713a11.994 11.994 0 00-2.651-3.965c-2.412-2.41-5.314-3.616-8.706-3.616zm-.188 9.803l-2.01 1.045c-.215-.445-.477-.758-.79-.937-.312-.178-.602-.268-.87-.268-1.34 0-2.01.884-2.01 2.652 0 .803.17 1.446.509 1.928.34.482.84.724 1.5.724.876 0 1.492-.43 1.85-1.286l1.847.937a4.407 4.407 0 01-1.634 1.728c-.696.42-1.464.63-2.303.63-1.34 0-2.42-.41-3.242-1.233-.821-.82-1.232-1.964-1.232-3.428 0-1.428.416-2.562 1.246-3.401.83-.84 1.879-1.26 3.147-1.26 1.858 0 3.188.723 3.992 2.17zm8.652 0l-1.983 1.045c-.214-.445-.478-.758-.79-.937-.313-.178-.613-.268-.897-.268-1.34 0-2.01.884-2.01 2.652 0 .803.17 1.446.51 1.928.338.482.838.724 1.5.724.874 0 1.49-.43 1.847-1.286l1.875.937a4.606 4.606 0 01-1.66 1.728c-.696.42-1.455.63-2.277.63-1.357 0-2.441-.41-3.253-1.233-.814-.82-1.22-1.964-1.22-3.428 0-1.428.415-2.562 1.246-3.401.83-.84 1.879-1.26 3.147-1.26 1.857 0 3.18.723 3.965 2.17z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a href="https://webring.xxiivv.com/#proto" target="_blank" rel="noopener"
|
||||
style="background-color:var(--color-background);">
|
||||
<svg class="webring" xmlns="http://www.w3.org/2000/svg" width="48.876" height="43.963" fill="none"
|
||||
stroke="#8eb29a" stroke-linecap="square" stroke-width="28" version="1.1"
|
||||
viewbox="0 0 97.752 57.925">
|
||||
<title>merveilles webring</title>
|
||||
<path d="M 71.956015,68.911383 A 24.94905,24.94905 0 1 0 28.742895,43.962503 L 7.9521752,79.973293"
|
||||
style="stroke-width:11.6428" />
|
||||
<path d="m 28.742895,68.911383 a 24.94905,24.94905 0 1 0 43.21312,-24.94888 L 51.165285,7.9517227"
|
||||
style="stroke-width:11.6428" />
|
||||
<path d="m 50.349455,31.488073 a 24.948873,24.948873 0 1 0 0,49.89774 h 41.58146"
|
||||
style="stroke-width:11.6428" />
|
||||
</svg>
|
||||
</a>
|
||||
</p>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue