We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84002a9 commit 45d8d39Copy full SHA for 45d8d39
_config.ts
@@ -3,4 +3,23 @@ import blog from 'blog/mod.ts'
3
4
export default lume({
5
src: './src',
6
-}).use(blog())
+})
7
+ .use(blog())
8
+ // remove /posts prefix
9
+ // https://lume.land/docs/core/processors/#preprocess
10
+ .preprocess(['.html'], pages => {
11
+ for (const page of pages) {
12
+ if (page.data.url.startsWith('/posts')) {
13
+ page.data.url = page.data.url.slice('/posts'.length)
14
+ }
15
16
+ })
17
+ // remove author page
18
+ // https://lume.land/docs/core/processors/#remove-pages-dynamically
19
+ .process(['.html'], (filteredPages, allPages) => {
20
+ for (const page of filteredPages) {
21
+ if (page.data.url.startsWith('/author')) {
22
+ allPages.splice(allPages.indexOf(page), 1)
23
24
25
0 commit comments