Fetch Mastodon posts only on production.

This commit is contained in:
天クマ 2026-07-05 18:58:28 -03:00
commit 8a2c269d26
4 changed files with 7 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{ {
"lastFetched": "2026-07-05T19:47:20.955Z", "lastFetched": "2026-07-05T21:48:17.927Z",
"posts": [ "posts": [
{ {
"date": "2026-07-03T01:51:37.604Z", "date": "2026-07-03T01:51:37.604Z",

View file

@ -16,6 +16,9 @@ import readingTime from 'eleventy-plugin-reading-time';
// import i18n from "./_data/i18n.js"; // import i18n from "./_data/i18n.js";
const production = (process.env.GITHUB_ACTIONS || process.env.FORGEJO_ACTIONS);
console.log("Production: ", production ? "true" : "false");
export default function (eleventyConfig) { export default function (eleventyConfig) {
eleventyConfig.setInputDirectory("site"); eleventyConfig.setInputDirectory("site");
@ -31,7 +34,8 @@ export default function (eleventyConfig) {
eleventyConfig.addPlugin(mastoarchive, { eleventyConfig.addPlugin(mastoarchive, {
host: "https://mstdn.social", host: "https://mstdn.social",
userId: "114661188739031987", userId: "114661188739031987",
cacheLocation: ".cache/mastodon.json" cacheLocation: ".cache/mastodon.json",
isProduction: production
}); });
// eleventyConfig.addPlugin(purgeCssPlugin, { // eleventyConfig.addPlugin(purgeCssPlugin, {
// config: "./purgecss.config.cjs", // config: "./purgecss.config.cjs",

View file

@ -10,5 +10,5 @@ headerLink: social
--- ---
<main> <main>
<p>{{ i18n[langKey].guestbookWarning | safe }}</p> <p>{{ i18n[langKey].guestbookWarning | safe }}</p>
<button id="guestbookConfirmButton" onClick="window.location.href = 'https://iframe.chat/embed?chat=17048300'">Load</button> <button id="guestbookConfirmButton" onClick="window.location.href = 'https://iframe.chat/embed?chat=17048300'" style="margin-top: auto;">Load</button>
</main> </main>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB