Compare commits

...

3 Commits

Author SHA1 Message Date
David Soulayrol
32c83c4245 Meilleure mise en évidence du focus sur les liens. 2022-09-04 10:04:26 +02:00
David Soulayrol
ddde4f1309 Mise en évidence automatique des liens externes.
Ceci concerne uniquement le traitement des fichiers Markdown (il est
toujours nécessaire de traiter manuellement les sources écrites en
HTML).

Pour réaliser cette fonction, le plugin metalsmith-mardownit a été
remplacé par @metalsmith/markdown.
2022-09-04 09:54:31 +02:00
David Soulayrol
1f8be84377 Mise en avant des rendez-vous mensuels. 2022-09-04 09:49:59 +02:00
5 changed files with 135 additions and 139 deletions

View File

@@ -20,6 +20,11 @@ a {
color: #373d3f;
}
a:focus {
color: red;
font-weight: bolder;
}
a.external::after {
content: url(/images/external-link.svg);
display: inline-flex;

View File

@@ -9,14 +9,9 @@ title: L'hébergeur associatif, transparent et solidaire
</header>
<section class="Explanation">
<h2 class="tac mb64">Ti Nuage ?</h2>
<p class="mb64">L'association Ti Nuage offre une alternative locale aux <abbr title="Google, Apple, Facebook, Amazon, Microsoft, etc.">GAFAM</abbr> pour les associations, les petites entreprises et les particuliers de la région du Trégor. Linfrastructure technique est gérée par les membres de lassociation. Son objet est de promouvoir la décentralisation et l'entraide et à terme d'héberger ses données dans le Trégor.</p>
<div class="frame mb64">
<img class="logo-chatons" src="/images/logo-tinuage-chatons.png" alt="Notre logo CHATONS"/>
<p>Nous souscrivons entièrement aux valeurs décrites dans le <a href="https://www.chatons.org/manifeste">manifeste</a> des <a href="https://chatons.org">CHATONS</a>, le Collectif des Hébergeurs Alternatifs, Transparents, Neutres et Solidaires. CHATONS a été initié par l'<a href="https://framasoft.org/">association Framasoft</a> suite au succès de sa campagne <i>Dégooglisons Internet</i>. La description de ce qu'il est et ce qu'il promeut se trouve sur <a href="https://www.chatons.org/presentation">sa page de présentation.</a></p>
<p>Nous nous sommes engagés à respecter la <a href="https://www.chatons.org/charte">charte</a> du collectif et l'association Ti Nuage est candidate pour la quinzième portée du collectif.</p>
<p>N'hésitez pas à découvrir <a href="https://www.chatons.org/chatons/all">les autres membres</a> ; tous proposent une palette particulière de services avec un coût et des garanties différentes. L'un d'eux pourrait être davantage adapté que Ti Nuage à vos besoins.</p>
</div>
<div class="Two-cols-One-row">
<p>L'association Ti Nuage offre une alternative locale aux <abbr title="Google, Apple, Facebook, Amazon, Microsoft, etc.">GAFAM</abbr> pour les associations, les petites entreprises et les particuliers de la région du Trégor. Linfrastructure technique est gérée par les membres de lassociation. Son objet est de promouvoir la décentralisation et l'entraide et à terme d'héberger ses données dans le Trégor.</p>
<p class="mt32">L'association propose une rencontre mensuelle aux adhérents comme aux non adhérents <b>le premier jeudi de chaque mois à <a href="https://lahutte.ti-nuage.fr">La Hutte</a></b>. Ce moment est l'occasion de discuter et d'obtenir de l'aide ou des conseils sur l'usage des services proposés, ou les moyens de gérer vos données comme vous l'entendez.</p>
<div class="mt32 Two-cols-One-row">
<div class="col-1">
<h3 class="tac">Liberté</h3>
<p>Nous fournissons des outils en ligne à code source ouvert qui vous permettent de garder le contrôle de vos données et de votre vie privée. Quand cela est possible, ces données sont chiffées sur le serveur (courrier, documents personnels et partagés). Nous ne transmettons ni ne vendons d'informations sur l'utilisations de nos service à qui que ce soit.</p>
@@ -26,6 +21,12 @@ title: L'hébergeur associatif, transparent et solidaire
<p>Nous nous organisons sur la base de l'autonomie, l'aide mutuelle, le partage de ressources et la création communautaire. Chaque adhérent(e) possède une voix lorsqu'il s'agit de peser sur les activités de l'association. Que vous soyez du métier, intéressé(e) par les services proposés ou simplement curieux(se), nous vous accueillons à bras ouverts.</p>
</div>
</div>
<div class="frame mt32">
<img class="logo-chatons" src="/images/logo-tinuage-chatons.png" alt="Notre logo CHATONS"/>
<p>Nous souscrivons entièrement aux valeurs décrites dans le <a href="https://www.chatons.org/manifeste">manifeste</a> des <a href="https://chatons.org">CHATONS</a>, le Collectif des Hébergeurs Alternatifs, Transparents, Neutres et Solidaires. CHATONS a été initié par l'<a href="https://framasoft.org/">association Framasoft</a> suite au succès de sa campagne <i>Dégooglisons Internet</i>. La description de ce qu'il est et ce qu'il promeut se trouve sur <a href="https://www.chatons.org/presentation">sa page de présentation.</a></p>
<p>Nous nous sommes engagés à respecter la <a href="https://www.chatons.org/charte">charte</a> du collectif et l'association Ti Nuage est candidate pour la quinzième portée du collectif.</p>
<p>N'hésitez pas à découvrir <a href="https://www.chatons.org/chatons/all">les autres membres</a> ; tous proposent une palette particulière de services avec un coût et des garanties différentes. L'un d'eux pourrait être davantage adapté que Ti Nuage à vos besoins.</p>
</div>
<div class="tac mt32">
<a class="Button" href="/association.html">Découvrir l'association</a>
</div>

220
package-lock.json generated
View File

@@ -11,6 +11,7 @@
"@metalsmith/collections": "^1.2.1",
"@metalsmith/excerpts": "^1.5.1",
"@metalsmith/layouts": "^2.4.0",
"@metalsmith/markdown": "^1.6.0",
"@metalsmith/permalinks": "^2.4.0",
"browser-sync": "^2.27.5",
"bs-fullscreen-message": "^1.1.0",
@@ -30,7 +31,6 @@
"metalsmith-assets": "^0.1.0",
"metalsmith-clean-css": "^6.1.3",
"metalsmith-groff": "^0.2.0",
"metalsmith-markdownit": "^0.5.0",
"metalsmith-rename": "^1.0.0",
"metalsmith-sitemap": "^1.2.2",
"moment": "^2.29.1",
@@ -745,6 +745,47 @@
"node": ">=8"
}
},
"node_modules/@metalsmith/markdown": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@metalsmith/markdown/-/markdown-1.6.0.tgz",
"integrity": "sha512-WtgbJAXo29DMy6PFMrPRMJBJIaTcgwvZ2X6Cq5QXEbRTWzde8POeXKGxJZe5MMoiYYS1FoBq5j31ArSIqX2W5g==",
"dev": true,
"dependencies": {
"debug": "^4.3.4",
"dlv": "^1.1.3",
"dset": "^3.1.2",
"marked": "^4.0.16"
},
"engines": {
"node": ">=10"
},
"peerDependencies": {
"metalsmith": "^2.3.0"
}
},
"node_modules/@metalsmith/markdown/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dev": true,
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/@metalsmith/markdown/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"node_modules/@metalsmith/permalinks": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@metalsmith/permalinks/-/permalinks-2.4.0.tgz",
@@ -2594,6 +2635,15 @@
"node": ">=8"
}
},
"node_modules/dset": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz",
"integrity": "sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/duplexer3": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
@@ -4992,15 +5042,6 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true
},
"node_modules/linkify-it": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
"dev": true,
"dependencies": {
"uc.micro": "1.0.6"
}
},
"node_modules/localtunnel": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz",
@@ -5350,20 +5391,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/markdown-it": {
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz",
"integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==",
"node_modules/marked": {
"version": "4.0.18",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.18.tgz",
"integrity": "sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==",
"dev": true,
"dependencies": {
"argparse": "1.0.10",
"entities": "1.1.2",
"linkify-it": "2.2.0",
"mdurl": "1.0.1",
"uc.micro": "1.0.6"
},
"bin": {
"markdown-it": "bin/markdown-it.js"
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 12"
}
},
"node_modules/mathml-tag-names": {
@@ -5421,12 +5458,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
"dev": true
},
"node_modules/meow": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz",
@@ -5608,32 +5639,6 @@
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
"dev": true
},
"node_modules/metalsmith-markdownit": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/metalsmith-markdownit/-/metalsmith-markdownit-0.5.0.tgz",
"integrity": "sha1-IVvJA29N0UAVwtXQ2D/hLbxyzwM=",
"dev": true,
"dependencies": {
"debug": "2.2.0",
"markdown-it": "8.4.2",
"minimatch": "3.0.4"
}
},
"node_modules/metalsmith-markdownit/node_modules/debug": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
"dev": true,
"dependencies": {
"ms": "0.7.1"
}
},
"node_modules/metalsmith-markdownit/node_modules/ms": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
"dev": true
},
"node_modules/metalsmith-rename": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/metalsmith-rename/-/metalsmith-rename-1.0.0.tgz",
@@ -8288,12 +8293,6 @@
"node": "*"
}
},
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
"dev": true
},
"node_modules/unbox-primitive": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
@@ -9461,6 +9460,35 @@
}
}
},
"@metalsmith/markdown": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@metalsmith/markdown/-/markdown-1.6.0.tgz",
"integrity": "sha512-WtgbJAXo29DMy6PFMrPRMJBJIaTcgwvZ2X6Cq5QXEbRTWzde8POeXKGxJZe5MMoiYYS1FoBq5j31ArSIqX2W5g==",
"dev": true,
"requires": {
"debug": "^4.3.4",
"dlv": "^1.1.3",
"dset": "^3.1.2",
"marked": "^4.0.16"
},
"dependencies": {
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dev": true,
"requires": {
"ms": "2.1.2"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
}
}
},
"@metalsmith/permalinks": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@metalsmith/permalinks/-/permalinks-2.4.0.tgz",
@@ -10890,6 +10918,12 @@
"is-obj": "^2.0.0"
}
},
"dset": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz",
"integrity": "sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q==",
"dev": true
},
"duplexer3": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
@@ -12707,15 +12741,6 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true
},
"linkify-it": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
"dev": true,
"requires": {
"uc.micro": "1.0.6"
}
},
"localtunnel": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz",
@@ -13004,18 +13029,11 @@
"integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
"dev": true
},
"markdown-it": {
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz",
"integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==",
"dev": true,
"requires": {
"argparse": "1.0.10",
"entities": "1.1.2",
"linkify-it": "2.2.0",
"mdurl": "1.0.1",
"uc.micro": "1.0.6"
}
"marked": {
"version": "4.0.18",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.18.tgz",
"integrity": "sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==",
"dev": true
},
"mathml-tag-names": {
"version": "2.1.3",
@@ -13056,12 +13074,6 @@
"integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==",
"dev": true
},
"mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
"dev": true
},
"meow": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz",
@@ -13268,34 +13280,6 @@
}
}
},
"metalsmith-markdownit": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/metalsmith-markdownit/-/metalsmith-markdownit-0.5.0.tgz",
"integrity": "sha1-IVvJA29N0UAVwtXQ2D/hLbxyzwM=",
"dev": true,
"requires": {
"debug": "2.2.0",
"markdown-it": "8.4.2",
"minimatch": "3.0.4"
},
"dependencies": {
"debug": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
"dev": true,
"requires": {
"ms": "0.7.1"
}
},
"ms": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
"dev": true
}
}
},
"metalsmith-rename": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/metalsmith-rename/-/metalsmith-rename-1.0.0.tgz",
@@ -15338,12 +15322,6 @@
"integrity": "sha512-00y/AXhx0/SsnI51fTc0rLRmafiGOM4/O+ny10Ps7f+j/b8p/ZY11ytMgznXkOVo4GQ+KwQG5UQLkLGirsACRg==",
"dev": true
},
"uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
"dev": true
},
"unbox-primitive": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",

View File

@@ -23,6 +23,7 @@
"@metalsmith/collections": "^1.2.1",
"@metalsmith/excerpts": "^1.5.1",
"@metalsmith/layouts": "^2.4.0",
"@metalsmith/markdown": "^1.6.0",
"@metalsmith/permalinks": "^2.4.0",
"browser-sync": "^2.27.5",
"bs-fullscreen-message": "^1.1.0",
@@ -42,7 +43,6 @@
"metalsmith-assets": "^0.1.0",
"metalsmith-clean-css": "^6.1.3",
"metalsmith-groff": "^0.2.0",
"metalsmith-markdownit": "^0.5.0",
"metalsmith-rename": "^1.0.0",
"metalsmith-sitemap": "^1.2.2",
"moment": "^2.29.1",

View File

@@ -7,7 +7,8 @@ const excerpts = require('@metalsmith/excerpts')
const groff = require('metalsmith-groff')
const layouts = require('@metalsmith/layouts')
const Metalsmith = require('metalsmith')
const markdown = require('metalsmith-markdownit')
const markdown = require('@metalsmith/markdown')
const marked = require('marked')
const moment = require('moment')
const permalinks = require('@metalsmith/permalinks')
const rename = require('metalsmith-rename')
@@ -17,6 +18,20 @@ const statistics = require('./metalsmith-statistics-plugin')
const __PROD__ = process.env.NODE_ENV === 'production'
const markdownRenderer = new marked.Renderer()
const m = markdownRenderer.link
markdownRenderer.link = function (href, title, text) {
let out = m.apply(this, [href, title, text])
if (href.startsWith('http') && !href.match('^https?://(www.)?ti-nuage\\.fr/.*')) {
out = out.slice(0, 3) + ' class="external" ' + out.slice(3)
}
return out
}
moment.locale('fr')
module.exports = new Metalsmith(config.paths.projectRoot)
@@ -43,14 +58,11 @@ module.exports = new Metalsmith(config.paths.projectRoot)
}))
.use(groff())
.use(markdown({
html: true,
linkify: true,
typographer: true,
quotes: ['«\xA0', '\xA0»', '\xA0', '\xA0'],
plugin: {
pattern: '**/*.md',
extension: 'html'
}
gfm: false,
headerIds: false,
renderer: markdownRenderer,
smartypants: true,
xhtml: true
}))
.use(excerpts())
.use(permalinks({