Mkdocs emoji reduction de la taille

En passant

J’ai fini par trouvé (j’ai ajouté css/extra.css ):

img.emoji {
   height: 16px;
   width: 16px;
   margin: 0 .05em 0 .1em;
   vertical-align: -0.1em;
}

.twemoji {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: top;
}

Et maintenant c’est fixé.

MKdocs pour un ReadTheDocs à partir d’un Markdown

J’ai donc repris « mon CV » au format Markdown : https://github.com/farias06/resume .
Mais cette fois le but est de faire un ReadTheDocs avec mkdocs : https://mkdocs.readthedocs.io/en/0.10/ .

# apt-get install mkdocs
# apt-get install pip
# pip install mkdocs-mermaid2-plugin
# mkdocs build
INFO     -  Cleaning site directory
INFO     -  Building documentation to directory: /.../site
INFO     -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
              - Competitions/Velo/README.md
WARNING  -  Documentation file 'README.md' contains a link to 'www.cyber-neurones.org' which is not found in the documentation files.
WARNING  -  Documentation file 'README.md' contains a link to 'descente-canyon.com' which is not found in the documentation files.
WARNING  -  Documentation file 'README.md' contains a link to 'descente-canyon.com' which is not found in the documentation files.
WARNING  -  Documentation file 'README.md' contains a link to 'descente-canyon.com' which is not found in the documentation files.
WARNING  -  Documentation file 'README.md' contains a link to 'descente-canyon.com' which is not found in the documentation files.
WARNING  -  Documentation file 'README.md' contains a link to 'descente-canyon.com' which is not found in the documentation files.
INFO     -  Documentation built in 0.67 seconds
# rm -rf /var/arias-frederic.org/public/*
# cp -r site/* /var/arias-frederic.org/public/.
# chown -R www-data.www-data /var/arias-frederic.org/public/

J’ai donc remplacé le site fait bien Hugo par le MKdocs.

Mais les emoji et le mermaid ne fonctionne pas pour l’instant.

J’ai donc ajouté :

  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg 

Cette fois cela marche mes les emojis sont énorme.

Au final c’est mieux d’avoir (moins pire) :

  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji

Pour le mermaid j’ai ajouté :

  - codehilite
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_div_format

extra_css:
  - https://unpkg.com/mermaid@8.5.1/dist/mermaid.css
extra_javascript:
  - https://unpkg.com/mermaid@8.5.1/dist/mermaid.min.js

Et cela fonctionne : https://my.cyber-neurones.org/ . Mais les emojis sont trop gros ….

A suivre.

HUGO : Build Markdown d’un GITHUB

En passant

Pour l’instant cela ne marche absolument pas … j’ai fait un Markdown sous GIT : https://github.com/farias06/resume .

Le but étant de faire le build via Hugo sous Débian :

# cat /etc/os-release  | grep "PRETTY_NAME"
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
# hugo server -D --bind="0.0.0.0"
# hugo version
Hugo Static Site Generator v0.80.0/extended linux/amd64 BuildDate: 2021-07-18T09:31:51Z (debian 0.80.0-6+b5)
# cd /var/arias-frederic.org/
# /root/go/bin/hugo server -D --bind="0.0.0.0"
Start building sites … 
hugo v0.112.3+extended linux/amd64 BuildDate=unknown

                   | FR   
-------------------+------
  Pages            |   3  
  Paginator pages  |   0  
  Non-page files   | 136  
  Static files     | 136  
  Processed images |   0  
  Aliases          |   0  
  Sitemaps         |   0  
  Cleaned          |   0  

Built in 102 ms
Watching for changes in /var/arias-frederic.org/{archetypes,content,data,layouts,static,themes}
Watching for config changes in /var/arias-frederic.org/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 0.0.0.0)
Press Ctrl+C to stop

Le résultat avec hugo sur le port 1313 :

Pour l’instant le résultat n’est pas bon : https://my.cyber-neurones.org/ . Sachant que résultat de Hugo n’est pas le même que le build. Le mermaid ne s’affiche pas …

Il reste du boulot.

BIOT : Enfin des informations sur la réouverture du sentier des Aspres.

Mairie de BIOT : L’audience relative à notre demande de bornage judiciaire du chemin des Aspres a été renvoyée au 28 septembre 2023. L’audience est publique.

Pour mémoire :