feat: ✨ add drafts
This commit is contained in:
parent
b195c84f12
commit
509449c9e5
2 changed files with 23 additions and 1 deletions
|
@ -32,7 +32,11 @@ export default async function (eleventyConfig) {
|
|||
eleventyConfig.addPassthroughCopy('./src/img/sebin.png');
|
||||
eleventyConfig.addWatchTarget('./src/img/sebin.png');
|
||||
|
||||
eleventyConfig.addCollection('posts', (collection) => collection.getFilteredByGlob('./src/posts/*.md'));
|
||||
eleventyConfig.addCollection('posts', (collection) =>
|
||||
process.env.ELEVENTY_PRODUCTION
|
||||
? collection.getFilteredByGlob('./src/posts/*.md')
|
||||
: collection.getFilteredByGlob('./src/{posts,drafts}/*.md')
|
||||
);
|
||||
|
||||
eleventyConfig.addPlugin(eleventyPluginCiu);
|
||||
eleventyConfig.addPlugin(eleventyPluginEmbedEverything);
|
||||
|
|
18
src/drafts/drafts.json
Normal file
18
src/drafts/drafts.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"layout": "blogpost.njk",
|
||||
"permalink": "/drafts/{{ title | slugify }}/",
|
||||
"date": "git Created",
|
||||
"type": "article",
|
||||
"author": {
|
||||
"name": "Sebin Nyshkim",
|
||||
"href": "https://blog.sebin-nyshkim.net",
|
||||
"image": "https://blog.sebin-nyshkim.net/img/sebin.png"
|
||||
},
|
||||
"twitter": {
|
||||
"cardType": "summary_large_image",
|
||||
"account": "SebinNyshkim"
|
||||
},
|
||||
"mastodon": {
|
||||
"fediverseCreator": "@SebinNyshkim@meow.social"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue