<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Opération De Blog on kenji.blog</title><link>http://kenji.blog/fr/categories/op%C3%A9ration-de-blog/</link><description>Recent content in Opération De Blog on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>fr</language><copyright>kenjinote</copyright><lastBuildDate>Fri, 31 May 2024 01:36:00 +0900</lastBuildDate><atom:link href="http://kenji.blog/fr/categories/op%C3%A9ration-de-blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Liste des Commandes Hugo</title><link>http://kenji.blog/fr/p/hugo%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E4%B8%80%E8%A6%A7/</link><pubDate>Fri, 31 May 2024 01:36:00 +0900</pubDate><guid>http://kenji.blog/fr/p/hugo%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E4%B8%80%E8%A6%A7/</guid><description>&lt;img src="http://kenji.blog/p/hugo%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E4%B8%80%E8%A6%A7/img.png" alt="Featured image of post Liste des Commandes Hugo" />&lt;h1 id="quest-ce-que-hugo">Qu&amp;rsquo;est-ce que Hugo
&lt;/h1>&lt;p>Hugo est l&amp;rsquo;un des générateurs de sites statiques. Vous pouvez créer un site Web en convertissant des fichiers Markdown en HTML. Hugo est écrit en langage Go et fonctionne très rapidement.&lt;/p>
&lt;p>Ce blog est également créé avec Hugo.&lt;/p>
&lt;h1 id="installation-de-la-cli-hugo">Installation de la CLI Hugo
&lt;/h1>&lt;p>Pour installer la CLI Hugo, exécutez la commande ci-dessous.&lt;/p>
&lt;p>※ Ceci est un exemple pour macOS. Pour les autres systèmes d&amp;rsquo;exploitation, veuillez vous référer à la documentation officielle.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">brew install hugo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Vous pouvez l&amp;rsquo;installer en utilisant Homebrew.&lt;/p>
&lt;h1 id="liste-des-commandes-hugo">Liste des Commandes Hugo
&lt;/h1>&lt;p>Hugo propose diverses commandes. Les commandes fréquemment utilisées sont résumées ci-dessous.&lt;/p>
&lt;h2 id="créer-un-nouveau-site">Créer un nouveau site
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo new site &amp;lt;nom-du-site&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour créer un nouveau site. Dans &lt;code>&amp;lt;nom-du-site&amp;gt;&lt;/code>, spécifiez le nom du site.&lt;/p>
&lt;h2 id="créer-un-nouvel-article">Créer un nouvel article
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo new &amp;lt;nom-de-l&lt;span class="err">&amp;#39;&lt;/span>article&amp;gt;.md
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour créer un nouvel article. Dans &lt;code>&amp;lt;nom-de-l'article&amp;gt;&lt;/code>, spécifiez le nom de l&amp;rsquo;article.&lt;/p>
&lt;h2 id="démarrer-le-serveur">Démarrer le serveur
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo server
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour démarrer le serveur local. Il est accessible à l&amp;rsquo;adresse &lt;code>http://localhost:1313&lt;/code>.&lt;/p>
&lt;h2 id="construire-build">Construire (Build)
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour construire le site. Les fichiers HTML seront générés dans le répertoire &lt;code>public&lt;/code>.&lt;/p>
&lt;h2 id="déployer">Déployer
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo deploy
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour déployer le site. Les paramètres de destination du déploiement sont configurés dans le fichier &lt;code>config.toml&lt;/code>.&lt;/p>
&lt;h2 id="afficher-la-liste-des-articles">Afficher la liste des articles
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo list all
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour afficher la liste des articles.&lt;/p>
&lt;h2 id="vérifier-la-configuration">Vérifier la configuration
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo config
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour vérifier la configuration.&lt;/p>
&lt;h2 id="afficher-laide">Afficher l&amp;rsquo;aide
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo &lt;span class="nb">help&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour afficher l&amp;rsquo;aide.&lt;/p>
&lt;h2 id="afficher-la-version">Afficher la version
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo version
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Commande pour afficher la version.&lt;/p>
&lt;p>Ceci est la liste des commandes Hugo. Comme il existe de nombreuses autres commandes disponibles, veuillez vous référer à la documentation officielle.&lt;/p>
&lt;h1 id="référence">Référence
&lt;/h1>&lt;ul>
&lt;li>&lt;a class="link" href="https://gohugo.io/documentation/" target="_blank" rel="noopener"
>Documentation Officielle Hugo&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>【HUGO】Aperçu de l'affichage dans l'environnement local</title><link>http://kenji.blog/fr/p/hugoaper%C3%A7u-de-laffichage-dans-lenvironnement-local/</link><pubDate>Mon, 05 Sep 2022 12:28:01 +0900</pubDate><guid>http://kenji.blog/fr/p/hugoaper%C3%A7u-de-laffichage-dans-lenvironnement-local/</guid><description>&lt;img src="http://kenji.blog/p/hugo%E3%83%AD%E3%83%BC%E3%82%AB%E3%83%AB%E3%81%A7%E7%92%B0%E5%A2%83%E3%81%A7%E8%A1%A8%E7%A4%BA%E3%83%97%E3%83%AC%E3%83%93%E3%83%A5%E3%83%BC/img.png" alt="Featured image of post 【HUGO】Aperçu de l'affichage dans l'environnement local" />&lt;h1 id="installation-de-hugo">Installation de HUGO
&lt;/h1>&lt;h2 id="téléchargement">Téléchargement
&lt;/h2>&lt;p>&lt;a class="link" href="https://github.com/gohugoio/hugo/releases" target="_blank" rel="noopener"
>Téléchargement de HUGO&lt;/a>&lt;/p>
&lt;p>À partir du site ci-dessus, téléchargez et extrayez le module Windows adapté à votre environnement.
Dans mon cas, j&amp;rsquo;ai téléchargé &amp;ldquo;hugo_0.102.3_Windows-64bit.zip&amp;rdquo;.&lt;/p>
&lt;h2 id="extraction">Extraction
&lt;/h2>&lt;p>Extrayez le fichier zip téléchargé, et copiez le fichier hugo.exe qui s&amp;rsquo;y trouve dans un dossier que vous avez créé, par exemple C:\bin.&lt;/p>
&lt;h2 id="enregistrer-dans-les-variables-denvironnement">Enregistrer dans les variables d&amp;rsquo;environnement
&lt;/h2>&lt;p>Enregistrez-le dans les variables d&amp;rsquo;environnement pour pouvoir exécuter hugo.exe de n&amp;rsquo;importe où.
Les opérations ci-dessous concernent Windows 11, mais vous devriez pouvoir l&amp;rsquo;enregistrer avec une procédure similaire :&lt;/p>
&lt;ol>
&lt;li>Appuyez sur Win+Pause pour ouvrir les informations de version&lt;/li>
&lt;li>Cliquez sur Paramètres système avancés&lt;/li>
&lt;li>Cliquez sur Variables d&amp;rsquo;environnement&lt;/li>
&lt;li>Sélectionnez Path et cliquez sur Modifier&lt;/li>
&lt;li>Cliquez sur Nouveau, entrez &amp;ldquo;C:\bin&amp;rdquo; sur une nouvelle ligne, puis cliquez sur OK pour fermer la boîte de dialogue&lt;/li>
&lt;/ol>
&lt;h1 id="prévisualiser-le-blog">Prévisualiser le blog
&lt;/h1>&lt;p>Dans l&amp;rsquo;invite de commandes, accédez au dossier du blog HUGO et exécutez la commande ci-dessous.&lt;/p>
&lt;p>&lt;code>hugo server -D&lt;/code>&lt;/p>
&lt;p>Le résultat de l&amp;rsquo;exécution est ci-dessous. (-D est une option pour afficher les articles en brouillon.)&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">C:\Users\win11\IdeaProjects\kenji.blog&amp;gt;hugo server -D
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Start building sites …
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc windows/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> | JA
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">-------------------+-----
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Pages | 39
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Paginator pages | 0
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Non-page files | 7
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Static files | 0
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Processed images | 0
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Aliases | 13
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Sitemaps | 1
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Cleaned | 0
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Built in 161 ms
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Watching for changes in C:\Users\win11\IdeaProjects\kenji.blog\{archetypes,content,themes}
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Watching for config changes in C:\Users\win11\IdeaProjects\kenji.blog\config.toml
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Environment: &amp;#34;development&amp;#34;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Serving pages from memory
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Press Ctrl+C to stop
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Puisque l&amp;rsquo;adresse est affichée lors de l&amp;rsquo;exécution (dans l&amp;rsquo;exemple ci-dessus, &lt;code>http://localhost:1313/&lt;/code>), copiez cette adresse dans votre navigateur.
L&amp;rsquo;aperçu est mis à jour automatiquement à chaque fois que le fichier est enregistré.
Pour terminer l&amp;rsquo;aperçu, tapez Ctrl+C dans l&amp;rsquo;invite de commandes.&lt;/p></description></item></channel></rss>