diff --git a/package.json b/package.json index 431b788..730533d 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "devDependencies": { "@astrojs/mdx": "^2.1.1", "@types/better-sqlite3": "^7.6.9", + "@types/katex": "^0.16.7", "drizzle-kit": "^0.20.14", "npm-run-all": "^4.1.5", "remark-math": "^6.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4b68a4c..7a88c8f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,6 +52,9 @@ devDependencies: '@types/better-sqlite3': specifier: ^7.6.9 version: 7.6.9 + '@types/katex': + specifier: ^0.16.7 + version: 0.16.7 drizzle-kit: specifier: ^0.20.14 version: 0.20.14 diff --git a/src/components/Header.astro b/src/components/Header.astro index 837e9f8..eb3cac1 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -3,10 +3,12 @@ phc logo diff --git a/src/content/config.ts b/src/content/config.ts index bd61ade..2de5874 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -20,6 +20,7 @@ const postsCollection = defineCollection({ const guidesCollection = defineCollection({ type: 'content', schema: z.object({ + id: z.string(), title: z.string(), description: z.string(), series: z.string().optional(), diff --git a/src/content/guides/2024-02-29-git-101.md b/src/content/guides/2024-02-29-git-101.md index 48bcfc6..30c868b 100644 --- a/src/content/guides/2024-02-29-git-101.md +++ b/src/content/guides/2024-02-29-git-101.md @@ -1,7 +1,7 @@ --- +id: git-101-example title: Git 101 (Esempio) description: Una guida introduttiva alle basi di Git (Esempio) -slug: git-101-example author: Copilot series: git --- diff --git a/src/pages/guide/[...slug].astro b/src/pages/guide/[id].astro similarity index 83% rename from src/pages/guide/[...slug].astro rename to src/pages/guide/[id].astro index 9691ee6..9c1443e 100644 --- a/src/pages/guide/[...slug].astro +++ b/src/pages/guide/[id].astro @@ -6,7 +6,7 @@ import ArticleLayout from '../../layouts/ArticleLayout.astro' export async function getStaticPaths() { const blogEntries = await getCollection('guides') return blogEntries.map(entry => ({ - params: { slug: entry.slug }, + params: { id: entry.data.id }, props: { entry }, })) } @@ -15,7 +15,7 @@ const { entry } = Astro.props const { Content } = await entry.render() --- - +

{entry.data.title}

{entry.data.series &&

{entry.data.series}

} diff --git a/src/pages/login.astro b/src/pages/login.astro new file mode 100644 index 0000000..5df08d1 --- /dev/null +++ b/src/pages/login.astro @@ -0,0 +1,21 @@ +--- +import PageLayout from '../layouts/PageLayout.astro' +--- + + +

Login

+ + +
+

Accedi con Poisson

+ + + + + +
+

Accedi con Ateneo

+ Login +
+ +
diff --git a/src/pages/utenti.astro b/src/pages/utenti.astro index e1699c4..e834211 100644 --- a/src/pages/utenti.astro +++ b/src/pages/utenti.astro @@ -2,7 +2,7 @@ import PageLayout from '../layouts/PageLayout.astro' --- - +

Utenti