Skip to content

Commit

Permalink
Use the Reading info official Lume plugin
Browse files Browse the repository at this point in the history
We used to use `reading_time` from the experimental Lume plugins
repository (https://github.com/lumeland/experimental-plugins) to show
an estimate of the reading time needed for a post. While this
experimental plugin still exists in that repo, now it is available as
an official Lume plugin (https://lume.land/plugins/reading_info/), and
therefore we are switching to it.
  • Loading branch information
andreubotella committed Nov 22, 2023
1 parent ed83bee commit 37a1b70
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion _components/postDetails.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% else %}
<p>Not yet published</p>
{% endif %}
<p>{{ readingTime.minutes or "???" }} minutes</p>
<p>{{ readingInfo.minutes or "???" }} minutes</p>
</div>
<div class="tags">
{% if tags | length %}
Expand Down
4 changes: 2 additions & 2 deletions _config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import lume from "lume/mod.ts";
import metas from "lume/plugins/metas.ts";
import slugifyUrls from "lume/plugins/slugify_urls.ts";
import readingtime from "lume-experimental-plugins/reading_time/mod.ts";
import readingInfo from "lume/plugins/reading_info.ts";
import markdownItConfig from "./_util/markdown-it-config.ts";
import blogAutodescriptor from "./_util/plugins/blog-autodesc.ts";
import capitalize from "./_util/plugins/capitalize.ts";
Expand All @@ -23,7 +23,7 @@ site.use(metas())
.use(slugifyUrls())
.use(capitalize())
.use(inlineHighlight())
.use(readingtime())
.use(readingInfo())
.use(blogAutodescriptor())
.use(plaintextMeta());

Expand Down
3 changes: 1 addition & 2 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"serve": "deno task lume -s"
},
"imports": {
"lume/": "https://deno.land/x/[email protected]/",
"lume-experimental-plugins/": "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/"
"lume/": "https://deno.land/x/[email protected]/"
}
}
4 changes: 2 additions & 2 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 37a1b70

Please sign in to comment.