Add social page with archived mastodon posts, move source to /site
This commit is contained in:
parent
a301a5cc5e
commit
648869bf76
40 changed files with 58 additions and 2 deletions
|
|
@ -1,31 +0,0 @@
|
|||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
eleventyComputed: {
|
||||
t: (data) => {
|
||||
const dir = path.dirname(data.page.inputPath);
|
||||
|
||||
const file = path.join(dir, `${data.langKey}.json`);
|
||||
if (fs.existsSync(file)) {
|
||||
return JSON.parse(fs.readFileSync(file, "utf-8"));
|
||||
}
|
||||
|
||||
return {};
|
||||
},
|
||||
c: (data) => {
|
||||
const dir = path.dirname(data.page.inputPath);
|
||||
|
||||
const file = path.join(dir, `common.json`);
|
||||
if (fs.existsSync(file)) {
|
||||
return JSON.parse(fs.readFileSync(file, "utf-8"));
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
},
|
||||
permalink: data => {
|
||||
return `/${data.langKey}/misc/${data.page.fileSlug}/`;
|
||||
},
|
||||
tags: "misc"
|
||||
};
|
||||
Loading…
Reference in a new issue