feat: added a hidden toggle availible in frontmatter which renders the note unlisted, also updated agent behavior with a compliance skill
This commit is contained in:
+17
-13
@@ -2,7 +2,7 @@ import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
|
||||
import markdownIt from "markdown-it";
|
||||
import markdownItAnchor from "markdown-it-anchor";
|
||||
import { filters } from "./src/_filters/index.js";
|
||||
import { postComparator } from "./src/_utils/sort-posts.js";
|
||||
import { postComparator, isPostPublic } from "./src/_utils/sort-posts.js";
|
||||
|
||||
export default function (eleventyConfig) {
|
||||
// 1. Static Asset Passthrough Copy
|
||||
@@ -39,30 +39,34 @@ export default function (eleventyConfig) {
|
||||
}
|
||||
|
||||
// 5. Custom Collections
|
||||
// Pinned / featured prioritized, chronological blog posts collection
|
||||
// Pinned / featured prioritized, chronological blog posts collection (excludes drafts and hidden posts)
|
||||
eleventyConfig.addCollection("posts", (collectionApi) => {
|
||||
return collectionApi
|
||||
.getFilteredByGlob("src/posts/*.md")
|
||||
.filter((post) => !post.data.draft)
|
||||
.filter((post) => isPostPublic(post))
|
||||
.sort(postComparator);
|
||||
});
|
||||
|
||||
// Dynamic Tag List Collection across all posts
|
||||
// Dynamic Tag List Collection across all public posts (excludes drafts and hidden posts)
|
||||
eleventyConfig.addCollection("tagList", (collectionApi) => {
|
||||
const tagSet = new Set();
|
||||
collectionApi.getFilteredByGlob("src/posts/*.md").forEach((item) => {
|
||||
if ("tags" in item.data) {
|
||||
let tags = item.data.tags;
|
||||
if (typeof tags === "string") tags = [tags];
|
||||
for (const tag of tags) {
|
||||
const cleanTag = tag.replace(/^#/, "");
|
||||
tagSet.add(cleanTag);
|
||||
collectionApi
|
||||
.getFilteredByGlob("src/posts/*.md")
|
||||
.filter((post) => isPostPublic(post))
|
||||
.forEach((item) => {
|
||||
if ("tags" in item.data) {
|
||||
let tags = item.data.tags;
|
||||
if (typeof tags === "string") tags = [tags];
|
||||
for (const tag of tags) {
|
||||
const cleanTag = tag.replace(/^#/, "");
|
||||
tagSet.add(cleanTag);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
return [...tagSet].sort();
|
||||
});
|
||||
|
||||
|
||||
// 6. Dev Server Options (dynamic port binding)
|
||||
eleventyConfig.setServerOptions({
|
||||
port: parseInt(process.env.PORT || "8080", 10)
|
||||
|
||||
Reference in New Issue
Block a user