feat: add auto menu

This commit is contained in:
2025-02-07 16:09:32 +01:00
parent c97a015a71
commit 56c67dd564
11 changed files with 60 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ import Metalsmith from 'metalsmith'
import layouts from '@metalsmith/layouts'
import markdown from '@metalsmith/markdown'
import permalinks from '@metalsmith/permalinks'
import collections from '@metalsmith/collections'
const __dirname = dirname(fileURLToPath(import.meta.url))
const t1 = performance.now()
@@ -17,14 +18,6 @@ const sitedata = {
contact: 'contact@lowtechlabgrenoble.org',
address: '48 Ave. Washington, 38100 Grenoble'
},
nav: [
{ path: 'index.html', label: 'Accueil' },
{ path: 'actions.html', label: 'Actions' },
{ path: 'contact.html', label: 'Contact' },
{ path: 'faq.html', label: 'FAQ' },
{ path: 'ressources.html', label: 'Ressources' },
{ path: 'blog.html', label: 'Blog' }
],
socials: {
twitter: 'https://twitter.com/johndoe',
facebook: 'https://facebook.com/johndoe',
@@ -44,6 +37,12 @@ Metalsmith(__dirname)
})
.metadata(sitedata)
.use(markdown())
.use(collections({
nav: {
pattern: '**/*.html',
sortBy: 'nav_order'
}
}))
.use(permalinks())
.use(layouts({
directory: 'layouts',