diff options
Diffstat (limited to 'vhosts/blog/nuldoc-src/config.ts')
| -rw-r--r-- | vhosts/blog/nuldoc-src/config.ts | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/vhosts/blog/nuldoc-src/config.ts b/vhosts/blog/nuldoc-src/config.ts new file mode 100644 index 00000000..5e1cad46 --- /dev/null +++ b/vhosts/blog/nuldoc-src/config.ts @@ -0,0 +1,43 @@ +export const config = { + locations: { + contentDir: "/content", + destDir: "/public", + staticDir: "/static", + }, + rendering: { + html: { + indentWidth: 2, + }, + }, + blog: { + author: "nsfisis", + siteName: "REPL: Rest-Eat-Program Loop", + siteCopyrightYear: 2021, + tagLabels: { + "conference": "カンファレンス", + "cpp": "C++", + "cpp17": "C++ 17", + "note-to-self": "備忘録", + "php": "PHP", + "phpcon": "PHP カンファレンス", + "phpconfuk": "PHP カンファレンス福岡", + "phperkaigi": "PHPerKaigi", + "phpstudy-tokyo": "PHP 勉強会@東京", + "python": "Python", + "python3": "Python 3", + "ruby": "Ruby", + "ruby3": "Ruby 3", + "rust": "Rust", + "vim": "Vim", + }, + }, +}; + +export type Config = typeof config; + +export function getTagLabel(c: Config, slug: string): string { + if (!(slug in c.blog.tagLabels)) { + throw new Error(`Unknown tag: ${slug}`); + } + return (c.blog.tagLabels as { [slug: string]: string })[slug]; +} |
