issue216:python
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue216:python [2025/04/28 08:15] – d52fr | issue216:python [2025/04/28 18:46] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | + | **You know what it's like, you're having a party and that one crazy guy shows up, and you're wondering 'who the hell invited this guy?' | |
- | You know what it's like, you're having a party and that one crazy guy shows up, and you're wondering 'who the hell invited this guy?' | + | |
Just kidding. We couldn' | Just kidding. We couldn' | ||
Ligne 11: | Ligne 10: | ||
The Trasforiua representative somewhat reminds me of Billy Mumy's character Lennier (a Minbari) from Babylon 5. | The Trasforiua representative somewhat reminds me of Billy Mumy's character Lennier (a Minbari) from Babylon 5. | ||
- | It's amazing to me how Terran Science Fiction got things so right on the appearance of many of the races of the interstellar community. | + | It's amazing to me how Terran Science Fiction got things so right on the appearance of many of the races of the interstellar community. |
- | Anyway, Ronnie contacted me about the 18th anniversary issue, so I moved some of my new daily tasks to write another article (something I've been meaning to do for a while). | + | Vous savez ce que c'est : vous organisez une fête et un type un peu fou débarque, et vous vous demandez : « Mais qui a bien pu l' |
+ | |||
+ | Je plaisante. Impossible de fêter un 18e anniversaire sans inviter le Python le plus fou de tous. | ||
+ | |||
+ | Salutations encore, camarades Formes de Vie Sensibles. Ça fait un bail, n' | ||
+ | |||
+ | Le représentant de Gozorn est (à mon avis) un croisement entre La Chose des Quatre Fantastiques et l' | ||
+ | |||
+ | Le représentant de Trasforiua me rappelle un peu Lennier, le personnage de Billy Mumy (un Minbari) dans Babylon 5. | ||
+ | |||
+ | Je suis stupéfait de voir à quel point la science-fiction terrienne a réussi à bien cerner l' | ||
+ | |||
+ | |||
+ | **Anyway, Ronnie contacted me about the 18th anniversary issue, so I moved some of my new daily tasks to write another article (something I've been meaning to do for a while). | ||
So, HAPPY ANNIVERSARY, | So, HAPPY ANNIVERSARY, | ||
Ligne 27: | Ligne 39: | ||
Per the MkDocs GitHub repository (https:// | Per the MkDocs GitHub repository (https:// | ||
- | “MkDocs is a fast, simple and downright gorgeous static site generator that's geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file. It is designed to be easy to use and can be extended with third-party themes, plugins, and Markdown extensions.” | + | “MkDocs is a fast, simple and downright gorgeous static site generator that's geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file. It is designed to be easy to use and can be extended with third-party themes, plugins, and Markdown extensions.”** |
- | So this is a free project designed to help design a project ssg written (mostly) in Python. | + | Bref, Ronnie m'a contacté au sujet du numéro du 18e anniversaire, |
+ | |||
+ | Alors, JOYEUX ANNIVERSAIRE, | ||
+ | |||
+ | Pour ce numéro anniversaire, | ||
+ | |||
+ | Générateurs de sites statiques | ||
+ | |||
+ | Si vous ne connaissez pas les générateurs de sites statiques (GSS), ils permettent à un programmeur non-HTML de créer un site Web basé sur un modèle (ou un thème) et de l' | ||
+ | |||
+ | MkDocs est arrivé ! | ||
+ | |||
+ | Selon le dépôt GitHub MkDocs (https:// | ||
+ | |||
+ | « MkDocs est un générateur de sites statiques rapide, simple et vraiment magnifique, conçu pour la création de documentation de projet. Les fichiers sources de la documentation sont écrits en Markdown et configurés avec un seul fichier YAML de configuration. Il est conçu pour être facile à utiliser et peut être étendu avec des thèmes, des plugins et des extensions Markdown tiers. » | ||
+ | |||
+ | |||
+ | **So this is a free project designed to help design a project ssg written (mostly) in Python. | ||
Please notice the part stating that MkDocs is “geared towards building project documentation”. | Please notice the part stating that MkDocs is “geared towards building project documentation”. | ||
Ligne 49: | Ligne 78: | ||
mkdocs new my-project | mkdocs new my-project | ||
- | Now, change to your new project folder. | + | Now, change to your new project folder.** |
- | The mkdocs.yml is the configuration file. The docs folder holds all the “pages” that make up your site. The main page has already been started for you. | + | Il s'agit d'un projet gratuit conçu pour vous aider à concevoir un projet SSG écrit (principalement) en Python. |
+ | |||
+ | Veuillez noter la partie indiquant que MkDocs est conçu pour la création de documentation de projet. | ||
+ | |||
+ | Le processus de création de votre site statique est très similaire à celui de Sphinx. Cependant, Sphinx utilise le langage RST pour générer les pages, tandis que MkDocs utilise Markdown. | ||
+ | |||
+ | Installation | ||
+ | |||
+ | L' | ||
+ | |||
+ | Utilisez maintenant pip (pip3) pour l' | ||
+ | |||
+ | pip install mkdocs | ||
+ | |||
+ | Démarrage | ||
+ | |||
+ | Une fois cette étape terminée, accédez à votre terminal d' | ||
+ | |||
+ | mkdocs new my-project | ||
+ | |||
+ | Accédez ensuite au dossier de votre nouveau projet. | ||
+ | |||
+ | |||
+ | **The mkdocs.yml is the configuration file. The docs folder holds all the “pages” that make up your site. The main page has already been started for you. | ||
To see what your “site” will look like, in the terminal type: | To see what your “site” will look like, in the terminal type: | ||
Ligne 68: | Ligne 120: | ||
- License: license.md | - License: license.md | ||
- | theme: readthedocs | + | theme: readthedocs** |
- | You can quickly see that the site_name section relates to the name at the upper left of the screen shot. The nav: section contains a list of all of the pages you created and want to be seen on your site. In the example above, there are three pages, the home page, an about page and a license page. Finally you can see that my test site uses the readthedocs theme, which is built into MkDocs. | + | Le fichier mkdocs.yml est le fichier de configuration. Le dossier docs contient toutes les pages de votre site. La page principale est déjà créée. |
- | Speaking of themes, the original screenshot is created using the default theme for MkDocs. | + | Pour visualiser l' |
+ | mkdocs serve | ||
+ | Plusieurs actions se dérouleront alors, toutes affichées sur votre terminal. Lorsque vous verrez « Serving on http:// | ||
+ | Retournons un instant en arrière et parlons du fichier mkdocs.yml. C'est là que sont stockées toutes les informations de configuration de votre site. Voici un exemple du site de test que j'ai conçu : | ||
+ | |||
+ | site_name: My Docs | ||
+ | |||
+ | nav: | ||
+ | - Home: index.md | ||
+ | - About: about.md | ||
+ | - License: license.md | ||
+ | |||
+ | theme: readthedocs | ||
+ | |||
+ | |||
+ | **You can quickly see that the site_name section relates to the name at the upper left of the screen shot. The nav: section contains a list of all of the pages you created and want to be seen on your site. In the example above, there are three pages, the home page, an about page and a license page. Finally you can see that my test site uses the readthedocs theme, which is built into MkDocs. | ||
+ | |||
+ | Speaking of themes, the original screenshot is created using the default theme for MkDocs. | ||
You can find information on the two built-in themes at https:// | You can find information on the two built-in themes at https:// | ||
Ligne 86: | Ligne 155: | ||
Deploying | Deploying | ||
- | This is the big decision maker, in my mind. How and where you can put your project documentation can make or break the entire system. | + | This is the big decision maker, in my mind. How and where you can put your project documentation can make or break the entire system. |
- | Bottom line | + | Vous pouvez rapidement constater que la section « site_name » correspond au nom en haut à gauche de la capture d' |
+ | |||
+ | À propos des thèmes, la capture d' | ||
+ | |||
+ | Vous trouverez des informations sur les deux thèmes intégrés sur https:// | ||
+ | |||
+ | Prise en charge de Markdown | ||
+ | |||
+ | Cela peut poser un problème majeur pour certains, compte tenu de la multitude de versions différentes des spécifications Markdown. | ||
+ | https:// | ||
+ | |||
+ | Déploiement | ||
+ | |||
+ | À mon avis, c'est la décision la plus importante. La manière et l' | ||
+ | |||
+ | |||
+ | **Bottom line | ||
While there are a few small “gotchas” that at first glance look like major roadblocks, the customization capabilities of MkDocs offers, MkDocs seems like a good tool to create your project documentation. | While there are a few small “gotchas” that at first glance look like major roadblocks, the customization capabilities of MkDocs offers, MkDocs seems like a good tool to create your project documentation. | ||
Ligne 102: | Ligne 187: | ||
As always; stay safe, healthy, positive, creative and most importantly, | As always; stay safe, healthy, positive, creative and most importantly, | ||
- | Crazy Uncle Greggggie | + | Crazy Uncle Greggggie** |
+ | |||
+ | En résumé | ||
+ | |||
+ | Malgré quelques petits pièges qui, à première vue, semblent être des obstacles majeurs, les possibilités de personnalisation offertes par MkDocs semblent en faire un bon outil pour créer la documentation de votre projet. Dans sa configuration actuelle, il ne convient pas à tous ceux qui souhaitent un site statique, car il n' | ||
+ | |||
+ | Le plus important pour moi est que plus de 80 % du projet est écrit en Python. Une grande partie du projet utilise Python-Markdown (https:// | ||
+ | |||
+ | C'est, à mon humble avis, un excellent projet dont tout programmeur Python pourrait tirer de précieuses compétences. | ||
+ | |||
+ | Conclusion | ||
+ | |||
+ | Je ne sais pas à quelle fréquence je pourrai vous tenir au courant (vous tous les Texaciens), car il y a un effort important pour installer un nouveau système de communication quantique par intrication (QEComms) ici à Decturian Station. | ||
+ | |||
+ | Comme toujours ; restez en sécurité, en bonne santé, positifs, créatifs et surtout, croyez aux miracles ! | ||
+ | |||
+ | Oncle Greggggie le fou | ||
issue216/python.1745820941.txt.gz · Dernière modification : 2025/04/28 08:15 de d52fr