mirror of
https://github.com/maciejpedzich/maciejpedzi.ch.git
synced 2024-11-27 15:45:47 +01:00
Read categories and tags from different file
This commit is contained in:
parent
fd93a73d31
commit
c6566812c6
@ -1 +1,16 @@
|
||||
{"taxonomy":{"tags":["appwrite","formulaone","linux","planning","racemash","self-hosted","vue","vuetify"],"categories":["dev diary","learning modern linux"]}}
|
||||
{
|
||||
"taxonomy": {
|
||||
"tags": [
|
||||
"appwrite",
|
||||
"formulaone",
|
||||
"linux",
|
||||
"notes",
|
||||
"planning",
|
||||
"racemash",
|
||||
"self-hosted",
|
||||
"vue",
|
||||
"vuetify"
|
||||
],
|
||||
"categories": ["dev diary", "learning modern linux"]
|
||||
}
|
||||
}
|
||||
|
4
.markdownlint.json
Normal file
4
.markdownlint.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"MD040": false,
|
||||
"MD013": false
|
||||
}
|
@ -3,10 +3,10 @@ import type { CollectionEntry } from 'astro:content';
|
||||
|
||||
import BlogSubpage from '../../../layouts/BlogSubpage.astro';
|
||||
import PostList from '../../../components/PostList.astro';
|
||||
import frontMatterConfig from '../../../../frontmatter.json';
|
||||
import taxonomyDb from '../../../../.frontmatter/database/taxonomyDb.json';
|
||||
|
||||
export function getStaticPaths() {
|
||||
const categories = frontMatterConfig['frontMatter.taxonomy.categories'];
|
||||
const { categories } = taxonomyDb.taxonomy;
|
||||
return categories.map((category) => ({ params: { category } }));
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
import BlogSubpage from '../../../layouts/BlogSubpage.astro';
|
||||
import frontMatterConfig from '../../../../frontmatter.json';
|
||||
import taxonomyDb from '../../../../.frontmatter/database/taxonomyDb.json';
|
||||
|
||||
const categories = frontMatterConfig['frontMatter.taxonomy.categories'];
|
||||
const { categories } = taxonomyDb.taxonomy;
|
||||
---
|
||||
|
||||
<BlogSubpage title="tags" description="all categories of maciej's blog posts">
|
||||
|
@ -3,10 +3,10 @@ import type { CollectionEntry } from 'astro:content';
|
||||
|
||||
import BlogSubpage from '../../../layouts/BlogSubpage.astro';
|
||||
import PostList from '../../../components/PostList.astro';
|
||||
import frontMatterConfig from '../../../../frontmatter.json';
|
||||
import taxonomyDb from '../../../../.frontmatter/database/taxonomyDb.json';
|
||||
|
||||
export function getStaticPaths() {
|
||||
const tags = frontMatterConfig['frontMatter.taxonomy.tags'];
|
||||
const { tags } = taxonomyDb.taxonomy;
|
||||
return tags.map((tag) => ({ params: { tag } }));
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
import BlogSubpage from '../../../layouts/BlogSubpage.astro';
|
||||
import frontMatterConfig from '../../../../frontmatter.json';
|
||||
import taxonomyDb from '../../../../.frontmatter/database/taxonomyDb.json';
|
||||
|
||||
const tags = frontMatterConfig['frontMatter.taxonomy.tags'];
|
||||
const { tags } = taxonomyDb.taxonomy;
|
||||
---
|
||||
|
||||
<BlogSubpage title="tags" description="all tags of maciej's blog posts">
|
||||
|
Loading…
Reference in New Issue
Block a user