Add reading time to post header, remove purgecss because it was breaking CSS used by injected HTML.
This commit is contained in:
parent
6a6c9043d4
commit
a301a5cc5e
6 changed files with 1621 additions and 18 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"lastFetched": "2026-07-04T19:05:20.884Z",
|
"lastFetched": "2026-07-04T19:22:19.688Z",
|
||||||
"posts": [
|
"posts": [
|
||||||
{
|
{
|
||||||
"date": "2026-07-03T01:51:37.604Z",
|
"date": "2026-07-03T01:51:37.604Z",
|
||||||
|
|
|
||||||
19
.eleventy.js
19
.eleventy.js
|
|
@ -5,11 +5,14 @@ import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
|
||||||
import safeLinks from "@sardine/eleventy-plugin-external-links";
|
import safeLinks from "@sardine/eleventy-plugin-external-links";
|
||||||
import pluginGitCommitDate from "eleventy-plugin-git-commit-date";
|
import pluginGitCommitDate from "eleventy-plugin-git-commit-date";
|
||||||
import recentChanges from "eleventy-plugin-recent-changes";
|
import recentChanges from "eleventy-plugin-recent-changes";
|
||||||
import Webmentions from "eleventy-plugin-webmentions"; // configure later
|
// import Webmentions from "eleventy-plugin-webmentions"; // configure later
|
||||||
import pluginInlineLinkFavicon from "eleventy-plugin-inline-link-favicon";
|
import pluginInlineLinkFavicon from "eleventy-plugin-inline-link-favicon";
|
||||||
import poison from "eleventy-plugin-poison";
|
import poison from "eleventy-plugin-poison";
|
||||||
import mastoarchive from "eleventy-plugin-mastoarchive";
|
import mastoarchive from "eleventy-plugin-mastoarchive";
|
||||||
import purgeCssPlugin from "eleventy-plugin-purgecss";
|
// import purgeCssPlugin from "eleventy-plugin-purgecss";
|
||||||
|
import pluginCleanUrls from "@inframanufaktur/eleventy-plugin-clean-urls";
|
||||||
|
// import githubRepos from 'eleventy-plugin-github-repos';
|
||||||
|
import readingTime from 'eleventy-plugin-reading-time';
|
||||||
|
|
||||||
// import i18n from "./_data/i18n.js";
|
// import i18n from "./_data/i18n.js";
|
||||||
|
|
||||||
|
|
@ -28,11 +31,13 @@ export default function (eleventyConfig) {
|
||||||
userId: "114661188739031987",
|
userId: "114661188739031987",
|
||||||
cacheLocation: ".cache/mastodon.json"
|
cacheLocation: ".cache/mastodon.json"
|
||||||
});
|
});
|
||||||
|
// eleventyConfig.addPlugin(purgeCssPlugin, {
|
||||||
eleventyConfig.addPlugin(purgeCssPlugin, {
|
// config: "./purgecss.config.cjs",
|
||||||
config: "./purgecss.config.cjs",
|
// quiet: false,
|
||||||
quiet: false,
|
// });
|
||||||
});
|
eleventyConfig.addPlugin(pluginCleanUrls);
|
||||||
|
// eleventyConfig.addPlugin(githubRepos, { userAccount: 'adrianvic' });
|
||||||
|
eleventyConfig.addPlugin(readingTime);
|
||||||
|
|
||||||
|
|
||||||
eleventyConfig.addCollection("post", function (collectionApi) {
|
eleventyConfig.addCollection("post", function (collectionApi) {
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,8 @@ module.exports = {
|
||||||
thisWebsiteDoesNotTrackYou: "This website does not track you.",
|
thisWebsiteDoesNotTrackYou: "This website does not track you.",
|
||||||
mrnandoChannel: "Mr. Nando's channel",
|
mrnandoChannel: "Mr. Nando's channel",
|
||||||
liked: "liked",
|
liked: "liked",
|
||||||
changes: "changes"
|
changes: "changes",
|
||||||
|
readingTime: "Reading time"
|
||||||
},
|
},
|
||||||
pt: {
|
pt: {
|
||||||
language: "português",
|
language: "português",
|
||||||
|
|
@ -166,6 +167,7 @@ module.exports = {
|
||||||
thisWebsiteDoesNotTrackYou: "Esse website não rastreia você.",
|
thisWebsiteDoesNotTrackYou: "Esse website não rastreia você.",
|
||||||
mrnandoChannel: "Canal do Mr. Nando",
|
mrnandoChannel: "Canal do Mr. Nando",
|
||||||
liked: "curtiu",
|
liked: "curtiu",
|
||||||
changes: "mudanças"
|
changes: "mudanças",
|
||||||
|
readingTime: "Tempo de leitura"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -9,6 +9,7 @@ title: Adrian Victor:Blog
|
||||||
<article>
|
<article>
|
||||||
<div id="postHeader">
|
<div id="postHeader">
|
||||||
<h1>{{ postTitle }}</h1>
|
<h1>{{ postTitle }}</h1>
|
||||||
|
<p>{{ i18n[langKey].readingTime }}: {{ content | readingTime }}</p>
|
||||||
<p>{{ authors or "Adrian Victor" }} - <b>{{ date | postDate }}</b>{% if lastModified | postDate !== date | postDate %} ({{ i18n[langKey].lastEditedIn }} {{ lastModified | postDate }}){% endif %}</p>
|
<p>{{ authors or "Adrian Victor" }} - <b>{{ date | postDate }}</b>{% if lastModified | postDate !== date | postDate %} ({{ i18n[langKey].lastEditedIn }} {{ lastModified | postDate }}){% endif %}</p>
|
||||||
{% if altLanguages.length > 0 %}
|
{% if altLanguages.length > 0 %}
|
||||||
{{ i18n[langKey].availableInOtherLanguages }}:
|
{{ i18n[langKey].availableInOtherLanguages }}:
|
||||||
|
|
|
||||||
1592
package-lock.json
generated
1592
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -14,12 +14,15 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2",
|
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2",
|
||||||
|
"@inframanufaktur/eleventy-plugin-clean-urls": "^1.0.2",
|
||||||
"@sardine/eleventy-plugin-external-links": "^1.4.0",
|
"@sardine/eleventy-plugin-external-links": "^1.4.0",
|
||||||
"eleventy-plugin-git-commit-date": "^1.0.2",
|
"eleventy-plugin-git-commit-date": "^1.0.2",
|
||||||
|
"eleventy-plugin-github-repos": "^0.1.8",
|
||||||
"eleventy-plugin-inline-link-favicon": "^1.1.0",
|
"eleventy-plugin-inline-link-favicon": "^1.1.0",
|
||||||
"eleventy-plugin-mastoarchive": "^0.2.0",
|
"eleventy-plugin-mastoarchive": "^0.2.0",
|
||||||
"eleventy-plugin-poison": "^1.0.1",
|
"eleventy-plugin-poison": "^1.0.1",
|
||||||
"eleventy-plugin-purgecss": "^0.6.0",
|
"eleventy-plugin-purgecss": "^0.6.0",
|
||||||
|
"eleventy-plugin-reading-time": "^0.0.1",
|
||||||
"eleventy-plugin-recent-changes": "^1.0.1",
|
"eleventy-plugin-recent-changes": "^1.0.1",
|
||||||
"eleventy-plugin-webmentions": "^2.1.0"
|
"eleventy-plugin-webmentions": "^2.1.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue