content: lc-eos

voidcannon: implement visibility_level for content, fixes and tweaks
This commit is contained in:
bignutty
2025-11-08 14:50:57 +01:00
parent c0cdffea32
commit fcc71f1f93
17 changed files with 240 additions and 64 deletions

View File

@@ -0,0 +1,13 @@
<voidcannon-cta>
<md-icon slot="icon">comic_bubble</md-icon>
The site (and content) are still heavily work-in-progress!
</voidcannon-cta>
# Voidcannon
Voidcannon is a modern blogging frontend build on pagex, a static site generator.
This site exists as both a functional example of what pagex can do, and my personal
playground to write about topics that interest me.
<gm3-wavy-divider></gm3-wavy-divider>

View File

@@ -0,0 +1,89 @@
import {
VoidcannonContentType,
VoidcannonSectionType
} from "voidcannon";
import {PagexResourceTransformer} from "pagex";
import CollectionContentTransformer from "voidcannon/src/transformers/CollectionContent.transformer.js";
import RecentContentTransformer from "voidcannon/src/transformers/RecentContent.transformer.js";
import ContentByIdentifierTransformer from "voidcannon/src/transformers/ContentByIdentifier.transformer.js";
import playground from "../../articles/playground/playground.pagex.js";
import playgroundP3 from "../../articles/playground-p3/playground-p3.pagex.js";
import playgroundEmpty from "../../articles/playground-empty/playground-empty.pagex.js";
import recentArticles from "../recent-articles/recent-articles.pagex.js";
export default {
type: VoidcannonContentType.EDITORIAL,
id: "voidcannon-index-debug",
slug: "home-debug",
name: "Voidcannon Home",
description: "Voidcannon Home",
color: null,
sections: [
{
type: VoidcannonSectionType.STORY_HERO,
content: {
_transform: ContentByIdentifierTransformer,
content_ids: [
playground.id,
playgroundEmpty.id,
playgroundP3.id,
],
// TODO: implement this
content_types: [
VoidcannonContentType.ARTICLE
]
}
},
{
type: VoidcannonSectionType.EDITORIAL,
content: {
_transform: PagexResourceTransformer.MARKDOWN,
path: "./content.md"
}
},
{
type: VoidcannonSectionType.CONTENT_GRID,
content: {
_transform: CollectionContentTransformer,
collection_id: "test"
},
label: "Testing Articles",
icon: "forklift"
},
{
type: VoidcannonSectionType.EDITORIAL,
content: {
_transform: PagexResourceTransformer.MARKDOWN,
content: "<gm3-wavy-divider></gm3-wavy-divider>"
}
},
{
type: VoidcannonSectionType.CONTENT_GRID,
content: {
_transform: RecentContentTransformer,
amount: 15
},
label: "Recent Articles",
icon: "history",
cta: {
label: "View All",
target: {
type: VoidcannonContentType.EDITORIAL,
id: recentArticles.id
},
}
},
{
type: VoidcannonSectionType.CAROUSEL,
content: {
_transform: CollectionContentTransformer,
collection_id: "featured"
},
label: "Various Articles",
target: "collections/featured"
},
]
}

View File

@@ -1,13 +1,6 @@
# blognutty
<voidcannon-cta>
<md-icon slot="icon">comic_bubble</md-icon>
The site (and content) are still heavily work-in-progress!
</voidcannon-cta>
# Voidcannon
Voidcannon is a modern blogging frontend build on pagex, a static site generator.
This site exists as both a functional example of what pagex can do, and my personal
playground to write about topics that interest me.
<gm3-wavy-divider></gm3-wavy-divider>
This site is still work-in-progress!
</voidcannon-cta>

View File

@@ -16,27 +16,12 @@ import recentArticles from "../recent-articles/recent-articles.pagex.js";
export default {
type: VoidcannonContentType.EDITORIAL,
id: "voidcannon-index",
id: "blognutty-index",
slug: "index",
name: "Voidcannon Home",
description: "Voidcannon Home",
name: "/home",
description: "blognutty home",
color: null,
sections: [
{
type: VoidcannonSectionType.STORY_HERO,
content: {
_transform: ContentByIdentifierTransformer,
content_ids: [
playground.id,
playgroundEmpty.id,
playgroundP3.id,
],
// TODO: implement this
content_types: [
VoidcannonContentType.ARTICLE
]
}
},
{
type: VoidcannonSectionType.EDITORIAL,
content: {
@@ -44,27 +29,11 @@ export default {
path: "./content.md"
}
},
{
type: VoidcannonSectionType.CONTENT_GRID,
content: {
_transform: CollectionContentTransformer,
collection_id: "test"
},
label: "Testing Articles",
icon: "forklift"
},
{
type: VoidcannonSectionType.EDITORIAL,
content: {
_transform: PagexResourceTransformer.MARKDOWN,
content: "<gm3-wavy-divider></gm3-wavy-divider>"
}
},
{
type: VoidcannonSectionType.CONTENT_GRID,
content: {
_transform: RecentContentTransformer,
amount: 15
amount: 9
},
label: "Recent Articles",
icon: "history",
@@ -75,15 +44,6 @@ export default {
id: recentArticles.id
},
}
},
{
type: VoidcannonSectionType.CAROUSEL,
content: {
_transform: CollectionContentTransformer,
collection_id: "featured"
},
label: "Various Articles",
target: "collections/featured"
},
}
]
}