Factorisation du style des comptes-rendus.

Le commit définitif devrait référencer metalsmith-groff 0.4.0.
This commit is contained in:
David Soulayrol
2022-09-04 16:33:40 +02:00
parent 32c83c4245
commit a311e6c238
7 changed files with 29 additions and 63 deletions

View File

@@ -22,6 +22,8 @@ const markdownRenderer = new marked.Renderer()
const m = markdownRenderer.link
const { join } = require('path')
markdownRenderer.link = function (href, title, text) {
let out = m.apply(this, [href, title, text])
@@ -56,7 +58,10 @@ module.exports = new Metalsmith(config.paths.projectRoot)
source: './assets/' + (process.env.NODE_ENV || 'dev'),
destination: './'
}))
.use(groff())
.use(groff({
macroPackages: ['mm', 'tinuage'],
macroPaths: [join(config.paths.projectRoot, 'scripts/tmac')]
}))
.use(markdown({
gfm: false,
headerIds: false,