Added support for dates of articles. :)
This commit is contained in:
parent
53bd81a8af
commit
7fa8f0b308
|
@ -10,6 +10,11 @@ article > header {
|
|||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
article > header > i {
|
||||
color: var(--accent);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.toc-container {
|
||||
grid-area: toc;
|
||||
display: grid;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
%%-
|
||||
title: qwik cms
|
||||
header: qwik cms intro
|
||||
date: 8th August 2021
|
||||
-%%
|
||||
|
||||
# Introduction
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<article>
|
||||
<header>
|
||||
{{ externalMeta.header }}
|
||||
<i>{{ externalMeta.date }}</i>
|
||||
</header>
|
||||
|
||||
<div class="toc-container">
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import fs from 'fs'
|
||||
import { JSDOM } from 'jsdom'
|
||||
import { parseExternalContext } from './externalContext.js'
|
||||
|
||||
const ConfigFile = fs.readFileSync('./config.json')
|
||||
const Config = JSON.parse(ConfigFile)
|
||||
|
||||
function generateToc(dom) {
|
||||
// Get all ToC anchors from the DOM
|
||||
const tocAnchors = dom.window.document.querySelectorAll(".toc-anchor")
|
||||
|
|
Loading…
Reference in New Issue
Block a user