From 93d25adb20bdf4552787330265c8a915c88a0a10 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Wed, 24 Apr 2019 22:09:24 +0530 Subject: [PATCH] Use pelican page/static linking --- content/{cheat sheets => cheat-sheets}/git-fr.md | 2 +- content/{cheat sheets => cheat-sheets}/git.md | 2 +- content/pages/index-fr.md | 2 +- content/pages/index.md | 2 +- content/software/pass-fr.md | 2 +- content/software/pass.md | 2 +- content/tips/latex-adblock-fr.md | 4 ++-- content/tips/latex-adblock.md | 4 ++-- content/tips/latex-letterhead-fr.md | 2 +- content/tips/latex-letterhead.md | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) rename content/{cheat sheets => cheat-sheets}/git-fr.md (92%) rename content/{cheat sheets => cheat-sheets}/git.md (92%) diff --git a/content/cheat sheets/git-fr.md b/content/cheat-sheets/git-fr.md similarity index 92% rename from content/cheat sheets/git-fr.md rename to content/cheat-sheets/git-fr.md index 0a36b50..6d5c088 100644 --- a/content/cheat sheets/git-fr.md +++ b/content/cheat-sheets/git-fr.md @@ -14,7 +14,7 @@ Lang: fr Quelques astuces [git](https://git-scm.com/) que j’utilise de temps en temps que j’oublie tout le temps… **Attention:** Je ne suis pas un exemple à suivre comme utilisateur de git, et mes manières sont parfois un peu crues. -Récemment, la majorité de mes commits sont dues à [pass](password-store.html), et donc la plupart du temps, je suis en train de réparer mes propres erreurs. +Récemment, la majorité de mes commits sont dues à [pass]({filename}/software/pass-fr.md), et donc la plupart du temps, je suis en train de réparer mes propres erreurs. Remettre la branche master `master` sur la branche distante `origin/master` : ```sh diff --git a/content/cheat sheets/git.md b/content/cheat-sheets/git.md similarity index 92% rename from content/cheat sheets/git.md rename to content/cheat-sheets/git.md index 9c2f717..48b6e4a 100644 --- a/content/cheat sheets/git.md +++ b/content/cheat-sheets/git.md @@ -14,7 +14,7 @@ Lang: en Some [git](https://git-scm.com/) tricks I use from time to time and that I forgot everytime… **Disclaimer:** I'm not the perfect git user, and my way of using it is especially crude. -Recently, most of my git commits are due to [pass](password-store.html), therefore most of those commands are here to fix my own mistakes. +Recently, most of my git commits are due to [pass]({filename}/software/pass.md), therefore most of those commands are here to fix my own mistakes. Reset `master` to `origin/master`: ```sh diff --git a/content/pages/index-fr.md b/content/pages/index-fr.md index c88a19e..80c185c 100644 --- a/content/pages/index-fr.md +++ b/content/pages/index-fr.md @@ -18,7 +18,7 @@ La plupart de ces astuces concernent mon usage quotidien de *linux*, mais pas qu Si vous vous êtes perdus sur les internets et cherchez ma page professionnelle, elle est disponible par là ---> [*](https://fmouhart.epheme.re/index-fr.html), où vous pouvez néanmoins retrouver la liste de mes [activités annexes](https://fmouhart.epheme.re/pages/etc-fr.html) ainsi qu’une liste des [logiciels libres que j’utilise au jour le jour](https://fmouhart.epheme.re/pages/etc-fr.html#le-logiciel-libre). -Si vous cherchez une version anglophone de ce blog, c'est [par là](/index.html). +Si vous cherchez une version anglophone de ce blog, c'est [par là]({filename}index.md). Pour toutes remarques ou commentaires, n’hésitez pas à me contacter par e-mail à l’adresse suivante : courriel. diff --git a/content/pages/index.md b/content/pages/index.md index c15fc80..aa27bde 100644 --- a/content/pages/index.md +++ b/content/pages/index.md @@ -15,6 +15,6 @@ I'm Fabrice Mouhartem, and I welcome you to this _blog_, which aims at relieving Those stuffs will be mainly about my everyday use of _linux_ but not only. If you are lost and are looking for my professional page, it's available [**here**](https://fmouhart.epheme.re) where you can find a list of my [annex activities](https://fmouhart.epheme.re/pages/etc.html) as well as a list of [free and open source software I everyday use](https://fmouhart.epheme.re/pages/etc.html#free-and-open-source-software). -If you are looking for a French version of this blog, you take a look over [there](fr/). +If you are looking for a French version of this blog, you take a look over [there]({filename}index-fr.md). If you want to send me any questions or comments about this blog, feel free to do so at courriel. diff --git a/content/software/pass-fr.md b/content/software/pass-fr.md index 72fb27a..624bfbe 100644 --- a/content/software/pass-fr.md +++ b/content/software/pass-fr.md @@ -29,7 +29,7 @@ Voici quelques commandes que j’utilise souvent : pass generate -i ``` Pour **re**générer un mot de passe, l’option `-i` ici est **importante** puisqu’elle permet de ne réécrire que la première ligne du fichier (en général le mot de passe). -Cela évite donc de devoir utiliser du [git sale](git-tricks.html) pour retirer l’erreur de l’arbre des commits vu que `pass ` fait automatiquement un commit atomique à la fin de la commande. +Cela évite donc de devoir utiliser du [git sale]({filename}/cheat-sheets/git-fr.md) pour retirer l’erreur de l’arbre des commits vu que `pass ` fait automatiquement un commit atomique à la fin de la commande. Je l’oublie parfois, c’est pourquoi je laisse ça ici en guise de rappel. ```sh diff --git a/content/software/pass.md b/content/software/pass.md index 249d1c3..7d5ead5 100644 --- a/content/software/pass.md +++ b/content/software/pass.md @@ -28,7 +28,7 @@ Here are just some commands I often use. ```sh pass generate -i ``` -To regenerate a password, the `-i` is important to avoid overwritting the whole file and having to rely on [dirty git](git-tricks.html) to withdraw your mistake (`pass ` will automatically commit your change)… I sometimes forget it, so let's put it here as a reminder. +To regenerate a password, the `-i` is important to avoid overwritting the whole file and having to rely on [dirty git]({filename}/cheat-sheets/git.md) to withdraw your mistake (`pass ` will automatically commit your change)… I sometimes forget it, so let's put it here as a reminder. ```sh pass git diff --git a/content/tips/latex-adblock-fr.md b/content/tips/latex-adblock-fr.md index de50228..98eebf8 100644 --- a/content/tips/latex-adblock-fr.md +++ b/content/tips/latex-adblock-fr.md @@ -32,14 +32,14 @@ De plus, certaines polices (comme Mais inkscape peut toujours nous servir pour supprimer ces publicités dérangeantes ! En effet, parmi les informations que ce dernier fournit, il donne la position et les dimensions de ces publicités, comme illustré ci-dessous (cliquez pour agrandir): -[![Inkscape pour repérer les dimensions](/examples/inkscape-adblock.png)](/examples/inkscape-adblock.png) +[![Inkscape pour repérer les dimensions]({static}/examples/inkscape-adblock.png)]({static}/examples/inkscape-adblock.png) **Explications**: Après avoir ouvert le pdf, on commence par sélectionner la publicité (en violet), il se peut qu’on ait besoin de dégrouper les objets (ctrl+maj+g). Ensuite, on fixe les dimensions dans notre unité de mesure favorite, par exemple en cm (en bleu), et finalement noter les dimensions du cadre de la publicité en question (en rouge). Ensuite, il nous suffit d’utiliser LaTeX pour recouvrir la publicité d’un voile blanc (ou n’importe quelle couleur de fond, je laisse au lecteur le soin de découvrir comment LaTeX permet d’importer n’importe quellle couleur RGB à l’aide du paquet [xcolor](https://www.ctan.org/pkg/xcolor)). -J’ai déjà utilisé le paquet [wallpaper](https://www.ctan.org/pkg/wallpaper) dans un [autre billet](latex-letterhead.html), mais celui-ci souffre de quelques limitations: il ne permet pas d’importer plusieurs pages (comme sur un billet aller-retour), et tikz interagit mal avec la géométrie de la page induite par wallpaper (ne me demandez pas pourquoi). +J’ai déjà utilisé le paquet [wallpaper](https://www.ctan.org/pkg/wallpaper) dans un [autre billet]({filename}latex-letterhead-fr.md), mais celui-ci souffre de quelques limitations: il ne permet pas d’importer plusieurs pages (comme sur un billet aller-retour), et tikz interagit mal avec la géométrie de la page induite par wallpaper (ne me demandez pas pourquoi). Je me suis donc inspiré de cette [réponse sur stackexchange](https://tex.stackexchange.com/questions/12838/can-i-add-tikzpictures-to-pages-included-with-pdfpages) pour arriver à mes fins. Pour faire simple, on utilise le package [pdfpages](https://ctan.org/pkg/pdfpages) avec ses options `pages={-}` pour inclure toutes les pages, et `pagecommand` pour inclure rectangle blanc avec les bons positionnements et dimensions `X`, `Y`, `L`, `H`. diff --git a/content/tips/latex-adblock.md b/content/tips/latex-adblock.md index e970c74..646a1d3 100644 --- a/content/tips/latex-adblock.md +++ b/content/tips/latex-adblock.md @@ -26,12 +26,12 @@ Yet more elegant, this approach still has a serious drawback: it breaks the font But inkscape can still be of use in order to remove those ads. Indeed, it allows finding the coordinates and the dimensions of those ads as illustrated in the following (click to zoom): -[![Inkscape ad dimensions](/examples/inkscape-adblock.png)](/examples/inkscape-adblock.png) +[![Inkscape ad dimensions]({static}/examples/inkscape-adblock.png)]({static}/examples/inkscape-adblock.png) **Explanations:** After opening your pdf file, start by selecting the ad (purple), you may have to ungroup elements (`ctrl+shift+g`), then set the dimensions in cm or your favourite length unit (blue) and finally note the dimensions of the ad (red). Then we just use LaTeX to add a white (or any background color, I let you devise it by yourself, you can use RGB codes with [xcolor](https://www.ctan.org/pkg/xcolor)) rectangle in front of the ad. -I already used the [wallpaper](https://www.ctan.org/pkg/wallpaper) package in [another post](latex-letterhead.html), but it has some limitations: it doesn't allow us to import multiple pages (such as a round-trip ticket), and tikz doesn't interact well with the induced page geometry. +I already used the [wallpaper](https://www.ctan.org/pkg/wallpaper) package in [another post]({filename}latex-letterhead.md), but it has some limitations: it doesn't allow us to import multiple pages (such as a round-trip ticket), and tikz doesn't interact well with the induced page geometry. Thus, I used this [answer on stackexchange](https://tex.stackexchange.com/questions/12838/can-i-add-tikzpictures-to-pages-included-with-pdfpages). To put it short, we use the package [pdfpages](https://ctan.org/pkg/pdfpages) with its options `pages={-}` to include every page, and the option `pagecommand` to include the rectangle overlay with the right dimensions `X`, `Y`, `L`, `H`. diff --git a/content/tips/latex-letterhead-fr.md b/content/tips/latex-letterhead-fr.md index da48443..6606053 100644 --- a/content/tips/latex-letterhead-fr.md +++ b/content/tips/latex-letterhead-fr.md @@ -20,7 +20,7 @@ Avant de commencer, il faudra trouver une version pdf des modèles de letters. P Ceci fait, tout repose maintenant sur le paquet [wallpaper](https://www.ctan.org/pkg/wallpaper) pour inclure le modèle de lettre comme font de page, et ensuite jouer avec les [marges](https://ctan.org/pkg/geometry) pour ajuster le tout. -Ainsi voici un exemple minimal avec la [sortie correspondante](examples/background-latex.pdf). +Ainsi voici un exemple minimal avec la [sortie correspondante]({static}/examples/background-latex.pdf). Bien entendu, remplacez `fond.pdf` par votre fond de page. Cela peut aussi être adapté à d’autres classes, comme [`lettre.cls`](https://ctan.org/pkg/lettre). diff --git a/content/tips/latex-letterhead.md b/content/tips/latex-letterhead.md index 9f4a293..249bb47 100644 --- a/content/tips/latex-letterhead.md +++ b/content/tips/latex-letterhead.md @@ -19,7 +19,7 @@ As a preliminary, you have to obtain a pdf version of the letterhead (to do so, Once this is done, the core of this method is to use the [wallpaper](https://www.ctan.org/pkg/wallpaper) package to embed the letterhead as a background image, and then play with margins to make it look nice. -Here follows a minimal example with the [corresponding output](examples/background-latex.pdf). Replace `background.pdf` with your (empty) letterhead of course. +Here follows a minimal example with the [corresponding output]({static}/examples/background-latex.pdf). Replace `background.pdf` with your (empty) letterhead of course. This can also be adapted to other classes, such as [`letter.cls`](https://ctan.org/pkg/letter). ```tex