1
0
forked from ti-nuage/site

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

@@ -1,21 +1,3 @@
.ds HP +2 +1
.ds HF I B
.\" Une macro pour décrire les personnes présentes à la réunion.
.\" Le seul paramètre attendu est la liste des personnes.
.de PRESENT
.P
.sp .4
.LP
\fIPrésent(e)s : \\$1\fI
..
.\" Une macro pour afficher les URLs dans un style habituel.
.de URL
.I \m[blue]\\$1\m[]
..
\R'Hu 1'
.\"
.\" Le document débute ici.
.\"
.ND 22/05/2022
.TL
Compte-rendu de Réunion

View File

@@ -1,21 +1,3 @@
.ds HP +2 +1
.ds HF I B
.\" Une macro pour décrire les personnes présentes à la réunion.
.\" Le seul paramètre attendu est la liste des personnes.
.de PRESENT
.P
.sp .4
.LP
\fIPrésent(e)s : \\$1\fI
..
.\" Une macro pour afficher les URLs dans un style habituel.
.de URL
.I \m[blue]\\$1\m[]
..
\R'Hu 1'
.\"
.\" Le document débute ici.
.\"
.ND 28/06/2022
.TL
Compte-rendu de Réunion

View File

@@ -1,21 +1,3 @@
.ds HP +2 +1
.ds HF I B
.\" Une macro pour décrire les personnes présentes à la réunion.
.\" Le seul paramètre attendu est la liste des personnes.
.de PRESENT
.P
.sp .4
.LP
\fIPrésent(e)s : \\$1\fI
..
.\" Une macro pour afficher les URLs dans un style habituel.
.de URL
.I \m[blue]\\$1\m[]
..
\R'Hu 1'
.\"
.\" Le document débute ici.
.\"
.ND 04/08/2022
.TL
Compte-rendu de Réunion

14
package-lock.json generated
View File

@@ -30,7 +30,7 @@
"metalsmith": "^2.4.0",
"metalsmith-assets": "^0.1.0",
"metalsmith-clean-css": "^6.1.3",
"metalsmith-groff": "^0.2.0",
"metalsmith-groff": "^0.4.0",
"metalsmith-rename": "^1.0.0",
"metalsmith-sitemap": "^1.2.2",
"moment": "^2.29.1",
@@ -5615,9 +5615,9 @@
"dev": true
},
"node_modules/metalsmith-groff": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/metalsmith-groff/-/metalsmith-groff-0.2.0.tgz",
"integrity": "sha512-I7j2oyan1ojt8jSbnuxjZoTy5Ig5ZFYlzRt18j2L3yXXeC+LPST36rJAfDtz8Lsphd5iK92dRGfKzJNL+1tQWQ==",
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/metalsmith-groff/-/metalsmith-groff-0.4.0.tgz",
"integrity": "sha512-Uzq4pjPu5Er/GSFAV38yNqBZFXXJV7P+81r0X+XcDeDTQwfrx+Eb/h+t+RvLVaGN3+iBzicVKE2kImqqB/ZxaA==",
"dev": true,
"dependencies": {
"debug": "~2.2.0",
@@ -13254,9 +13254,9 @@
}
},
"metalsmith-groff": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/metalsmith-groff/-/metalsmith-groff-0.2.0.tgz",
"integrity": "sha512-I7j2oyan1ojt8jSbnuxjZoTy5Ig5ZFYlzRt18j2L3yXXeC+LPST36rJAfDtz8Lsphd5iK92dRGfKzJNL+1tQWQ==",
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/metalsmith-groff/-/metalsmith-groff-0.4.0.tgz",
"integrity": "sha512-Uzq4pjPu5Er/GSFAV38yNqBZFXXJV7P+81r0X+XcDeDTQwfrx+Eb/h+t+RvLVaGN3+iBzicVKE2kImqqB/ZxaA==",
"dev": true,
"requires": {
"debug": "~2.2.0",

View File

@@ -42,7 +42,7 @@
"metalsmith": "^2.4.0",
"metalsmith-assets": "^0.1.0",
"metalsmith-clean-css": "^6.1.3",
"metalsmith-groff": "^0.2.0",
"metalsmith-groff": "^0.4.0",
"metalsmith-rename": "^1.0.0",
"metalsmith-sitemap": "^1.2.2",
"moment": "^2.29.1",

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,

15
scripts/tmac/tinuage.tmac Normal file
View File

@@ -0,0 +1,15 @@
.ds HP +2 +1
.ds HF I B
.\" Une macro pour décrire les personnes présentes à la réunion.
.\" Le seul paramètre attendu est la liste des personnes.
.de PRESENT
.P
.sp .4
.LP
\fIPr\[u00E9]sent(e)s : \\$1\fI
..
.\" Une macro pour afficher les URLs dans un style habituel.
.de URL
.I \m[blue]\\$1\m[]
..
\R'Hu 1'