fork of anirudh.fi/vite that uses chroma for hl
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update readme with YAML templating

+27 -1
+1 -1
go.mod
··· 6 6 git.icyphox.sh/grayfriday v0.0.0-20221126034429-23c704183914 7 7 github.com/adrg/frontmatter v0.2.0 8 8 github.com/alecthomas/chroma v0.10.0 9 - gopkg.in/yaml.v2 v2.3.0 10 9 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b 11 10 ) 12 11 13 12 require ( 14 13 github.com/BurntSushi/toml v0.3.1 // indirect 15 14 github.com/dlclark/regexp2 v1.4.0 // indirect 15 + gopkg.in/yaml.v2 v2.3.0 // indirect 16 16 )
+26
readme
··· 78 78 subdirectories by default (template.ParseGlob uses filepath.Glob, and 79 79 doesn't support deep-matching, i.e. **). 80 80 81 + vite also supports templating generic YAML files. Take for instance, 82 + pages/reading.yaml (https://git.icyphox.sh/site/blob/master/pages/reading.yaml): 83 + 84 + meta: 85 + template: reading.html 86 + title: reading 87 + subtitle: Tracking my reading. 88 + description: I use this page to track my reading. 89 + 90 + books: 91 + - 2024: 92 + - name: Dune Messiah 93 + link: https://en.wikipedia.org/wiki/Dune_Messiah 94 + author: Frank Herbert 95 + status: now reading 96 + - 2023: 97 + - name: Dune 98 + link: https://en.wikipedia.org/wiki/Dune_(novel) 99 + author: Frank Herbert 100 + status: finished 101 + 102 + vite will look for a 'meta' key in the YAML file, and use the 'template' 103 + specified to render the page. The rest of the YAML file is available to 104 + you in the template as a map[string]interface{} called Yaml. 105 + 106 + 81 107 More templating examples can be found at: 82 108 https://git.icyphox.sh/site/tree/templates 83 109