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": [
|
||||
{
|
||||
"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 pluginGitCommitDate from "eleventy-plugin-git-commit-date";
|
||||
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 poison from "eleventy-plugin-poison";
|
||||
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";
|
||||
|
||||
|
|
@ -28,11 +31,13 @@ export default function (eleventyConfig) {
|
|||
userId: "114661188739031987",
|
||||
cacheLocation: ".cache/mastodon.json"
|
||||
});
|
||||
|
||||
eleventyConfig.addPlugin(purgeCssPlugin, {
|
||||
config: "./purgecss.config.cjs",
|
||||
quiet: false,
|
||||
});
|
||||
// eleventyConfig.addPlugin(purgeCssPlugin, {
|
||||
// config: "./purgecss.config.cjs",
|
||||
// quiet: false,
|
||||
// });
|
||||
eleventyConfig.addPlugin(pluginCleanUrls);
|
||||
// eleventyConfig.addPlugin(githubRepos, { userAccount: 'adrianvic' });
|
||||
eleventyConfig.addPlugin(readingTime);
|
||||
|
||||
|
||||
eleventyConfig.addCollection("post", function (collectionApi) {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ module.exports = {
|
|||
thisWebsiteDoesNotTrackYou: "This website does not track you.",
|
||||
mrnandoChannel: "Mr. Nando's channel",
|
||||
liked: "liked",
|
||||
changes: "changes"
|
||||
changes: "changes",
|
||||
readingTime: "Reading time"
|
||||
},
|
||||
pt: {
|
||||
language: "português",
|
||||
|
|
@ -166,6 +167,7 @@ module.exports = {
|
|||
thisWebsiteDoesNotTrackYou: "Esse website não rastreia você.",
|
||||
mrnandoChannel: "Canal do Mr. Nando",
|
||||
liked: "curtiu",
|
||||
changes: "mudanças"
|
||||
changes: "mudanças",
|
||||
readingTime: "Tempo de leitura"
|
||||
}
|
||||
};
|
||||
|
|
@ -9,6 +9,7 @@ title: Adrian Victor:Blog
|
|||
<article>
|
||||
<div id="postHeader">
|
||||
<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>
|
||||
{% if altLanguages.length > 0 %}
|
||||
{{ 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",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2",
|
||||
"@inframanufaktur/eleventy-plugin-clean-urls": "^1.0.2",
|
||||
"@sardine/eleventy-plugin-external-links": "^1.4.0",
|
||||
"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-mastoarchive": "^0.2.0",
|
||||
"eleventy-plugin-poison": "^1.0.1",
|
||||
"eleventy-plugin-purgecss": "^0.6.0",
|
||||
"eleventy-plugin-reading-time": "^0.0.1",
|
||||
"eleventy-plugin-recent-changes": "^1.0.1",
|
||||
"eleventy-plugin-webmentions": "^2.1.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue