1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-01-07 22:11:13 +00:00

Create initial language support

Create support for languages, then reformat user, home, and post pages
to use it, and create en and en-us language files.
This commit is contained in:
Cadence Ember
2020-07-20 01:40:27 +12:00
parent 1f76e43446
commit 496d53f47e
22 changed files with 319 additions and 54 deletions

View File

@@ -1,6 +1,7 @@
const {Pinski} = require("pinski")
const {subdirs} = require("node-dir")
const constants = require("../lib/constants")
const lang = require("../lang")
const passthrough = require("./passthrough")
@@ -64,7 +65,7 @@ subdirs("pug", async (err, dirs) => {
const plugins = require("pinski/plugins")
plugins.setInstance(pinski)
Object.assign(pinski.pugDefaultLocals, {constants})
Object.assign(pinski.pugDefaultLocals, {constants, lang})
Object.assign(passthrough, pinski.getExports())
console.log("[.] Server started")