diff --git a/content/cr/2022/cr-20220517.mm b/content/cr/2022/cr-20220517.mm index b4b5edd..91cdeff 100644 --- a/content/cr/2022/cr-20220517.mm +++ b/content/cr/2022/cr-20220517.mm @@ -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 diff --git a/content/cr/2022/cr-20220628.mm b/content/cr/2022/cr-20220628.mm index ebda08a..e8c1650 100644 --- a/content/cr/2022/cr-20220628.mm +++ b/content/cr/2022/cr-20220628.mm @@ -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 diff --git a/content/cr/2022/cr-20220804.mm b/content/cr/2022/cr-20220804.mm index ccef6ff..919739b 100644 --- a/content/cr/2022/cr-20220804.mm +++ b/content/cr/2022/cr-20220804.mm @@ -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 diff --git a/package-lock.json b/package-lock.json index b404275..1bbda9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 4f9fc3c..6623490 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/metalsmith.js b/scripts/metalsmith.js index 96c78cd..200e71c 100644 --- a/scripts/metalsmith.js +++ b/scripts/metalsmith.js @@ -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, diff --git a/scripts/tmac/tinuage.tmac b/scripts/tmac/tinuage.tmac new file mode 100644 index 0000000..7c33556 --- /dev/null +++ b/scripts/tmac/tinuage.tmac @@ -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'