initales commit Northside Studio Page
This commit is contained in:
@@ -0,0 +1,568 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="author" content="map[name:Hugo Authors]">
|
||||
<meta name="description" content="Déplacez le contenu statique vers static Jekyll a une règle comme quoi tout répertoire qui ne commence pas par _ sera copié tel-quel dans le répertoire _site. Hugo garde tout le contenu statique dans le répertoire static. Vous devez donc déplacer tout ce type de contenu là-dedans. Avec Jekylll, l’arborescence ressemblant à ceci :
|
||||
▾ <root>/ ▾ images/ logo.png " />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="robots" content="noodp" />
|
||||
<meta name="theme-color" content="" />
|
||||
<link rel="canonical" href="http://localhost:1313/fr/posts/2014/03/migrer-vers-hugo-depuis-jekyll/" />
|
||||
|
||||
|
||||
<title>
|
||||
|
||||
Migrer vers Hugo depuis Jekyll :: Northside Studio Achim — Hello Friend NG Theme
|
||||
|
||||
</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="http://localhost:1313/main.min.7289daf2e88ea2c7b253a51cc5794c7cc17e7aeb7295a19d978db764a5862f25.css" integrity="sha256-cona8uiOoseyU6UcxXlMfMF+eutylaGdl423ZKWGLyU=" crossorigin="anonymous">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="http://localhost:1313/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="http://localhost:1313/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="http://localhost:1313/favicon-16x16.png">
|
||||
<link rel="manifest" href="http://localhost:1313/site.webmanifest">
|
||||
<link rel="mask-icon" href="http://localhost:1313/safari-pinned-tab.svg" color="">
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="">
|
||||
|
||||
|
||||
|
||||
<meta itemprop="name" content="Migrer vers Hugo depuis Jekyll">
|
||||
<meta itemprop="description" content="Déplacez le contenu statique vers static Jekyll a une règle comme quoi tout répertoire qui ne commence pas par _ sera copié tel-quel dans le répertoire _site. Hugo garde tout le contenu statique dans le répertoire static. Vous devez donc déplacer tout ce type de contenu là-dedans. Avec Jekylll, l’arborescence ressemblant à ceci :
|
||||
▾ <root>/ ▾ images/ logo.png">
|
||||
<meta itemprop="datePublished" content="2014-03-10T00:00:00+00:00">
|
||||
<meta itemprop="dateModified" content="2014-03-10T00:00:00+00:00">
|
||||
<meta itemprop="wordCount" content="864">
|
||||
<meta itemprop="image" content="http://localhost:1313/">
|
||||
<meta itemprop="keywords" content="Hugo,Jekyll">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="http://localhost:1313/">
|
||||
<meta name="twitter:title" content="Migrer vers Hugo depuis Jekyll">
|
||||
<meta name="twitter:description" content="Déplacez le contenu statique vers static Jekyll a une règle comme quoi tout répertoire qui ne commence pas par _ sera copié tel-quel dans le répertoire _site. Hugo garde tout le contenu statique dans le répertoire static. Vous devez donc déplacer tout ce type de contenu là-dedans. Avec Jekylll, l’arborescence ressemblant à ceci :
|
||||
▾ <root>/ ▾ images/ logo.png">
|
||||
|
||||
|
||||
|
||||
<meta property="og:url" content="http://localhost:1313/fr/posts/2014/03/migrer-vers-hugo-depuis-jekyll/">
|
||||
<meta property="og:site_name" content="Northside Studio Achim">
|
||||
<meta property="og:title" content="Migrer vers Hugo depuis Jekyll">
|
||||
<meta property="og:description" content="Déplacez le contenu statique vers static Jekyll a une règle comme quoi tout répertoire qui ne commence pas par _ sera copié tel-quel dans le répertoire _site. Hugo garde tout le contenu statique dans le répertoire static. Vous devez donc déplacer tout ce type de contenu là-dedans. Avec Jekylll, l’arborescence ressemblant à ceci :
|
||||
▾ <root>/ ▾ images/ logo.png">
|
||||
<meta property="og:locale" content="fr">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="article:section" content="posts">
|
||||
<meta property="article:published_time" content="2014-03-10T00:00:00+00:00">
|
||||
<meta property="article:modified_time" content="2014-03-10T00:00:00+00:00">
|
||||
<meta property="og:image" content="http://localhost:1313/">
|
||||
|
||||
|
||||
|
||||
|
||||
<meta property="article:section" content="Hugo" />
|
||||
|
||||
<meta property="article:section" content="Jekyll" />
|
||||
|
||||
|
||||
|
||||
<meta property="article:published_time" content="2014-03-10 00:00:00 +0000 UTC" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<header class="header">
|
||||
<span class="header__inner">
|
||||
<a href="http://localhost:1313/" style="text-decoration: none;">
|
||||
<div class="logo">
|
||||
|
||||
<span class="logo__mark">></span>
|
||||
<span class="logo__text ">
|
||||
$ cd /home/</span>
|
||||
<span class="logo__cursor" style=
|
||||
"
|
||||
|
||||
">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<span class="header__right">
|
||||
<nav class="menu">
|
||||
<ul class="menu__inner">
|
||||
<div class="submenu">
|
||||
<li class="dropdown">
|
||||
<a href="javascript:void(0)" class="dropbtn">About</a>
|
||||
<div class="dropdown-content">
|
||||
|
||||
<a href="about/me/">About Me</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
<li><a href="http://localhost:1313/fr/posts/">Posts</a></li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
<span class="menu-trigger">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<main class="post">
|
||||
|
||||
<div class="post-info">
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock">
|
||||
<circle cx="12" cy="12" r="10"></circle>
|
||||
<polyline points="12 6 12 12 16 14"></polyline>
|
||||
</svg>
|
||||
5 minutes
|
||||
|
||||
|
||||
| Aussi disponible en
|
||||
|
||||
<a href="http://localhost:1313/posts/2014/03/migrate-to-hugo-from-jekyll/"><span class="flag fi fi-gb"></span></a>
|
||||
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h1 class="post-title">
|
||||
<a href="http://localhost:1313/fr/posts/2014/03/migrer-vers-hugo-depuis-jekyll/">Migrer vers Hugo depuis Jekyll</a>
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="post-content">
|
||||
<h2 id="déplacez-le-contenu-statique-vers-static">Déplacez le contenu statique vers <code>static</code></h2>
|
||||
<p>Jekyll a une règle comme quoi tout répertoire qui ne commence pas par <code>_</code> sera
|
||||
copié tel-quel dans le répertoire <code>_site</code>. Hugo garde tout le contenu statique
|
||||
dans le répertoire <code>static</code>. Vous devez donc déplacer tout ce type de contenu
|
||||
là-dedans. Avec Jekylll, l’arborescence ressemblant à ceci :</p>
|
||||
<pre><code>▾ <root>/
|
||||
▾ images/
|
||||
logo.png
|
||||
</code></pre>
|
||||
<p>doit devenir</p>
|
||||
<pre><code>▾ <root>/
|
||||
▾ static/
|
||||
▾ images/
|
||||
logo.png
|
||||
</code></pre>
|
||||
<p>En outre, vous allez devoir déplacer tous les fichiers présents à la racine vers
|
||||
le répertoire <code>static</code>.</p>
|
||||
<h2 id="créez-votre-configuration-hugo">Créez votre configuration Hugo</h2>
|
||||
<p>Hugo peut lire votre fichier de configuration au format JSON, YAML et TOML. Hugo
|
||||
supporte également les paramètres de configuration. Plus d’informations sur la
|
||||
<a href="http://localhost:1313/overview/configuration/">documentation de configuration Hugo</a></p>
|
||||
<h2 id="définiez-votre-répertoire-de-publication-sur-_site">Définiez votre répertoire de publication sur <code>_site</code></h2>
|
||||
<p>La valeur par défaut pour Jekyll est d’utiliser le répertoire <code>_site</code> pour
|
||||
publier le contenu. Pour Hugo, le répertoire de publication est <code>public</code>. Si,
|
||||
comme moi, vous avez [lié <code>_site</code> vers un sous-module git sur la branche
|
||||
<code>gh-pages</code>](<a href="http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.ht">http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.ht</a>
|
||||
ml), vous allez vouloir avoir quelques alternatives :</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Changez votre lien du sous-module <code>gh-pages</code> pour pointer sur public au lieu
|
||||
de <code>_site</code> (recommendé).</p>
|
||||
<pre><code> git submodule deinit _site
|
||||
git rm _site
|
||||
git submodule add -b gh-pages
|
||||
git@github.com:your-username/your-repo.git public
|
||||
</code></pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>Ou modifiez la configuration de Hugo pour utiliser le répertoire <code>_site</code> au
|
||||
lieu de <code>public</code>.</p>
|
||||
<pre><code> {
|
||||
..
|
||||
"publishdir": "_site",
|
||||
..
|
||||
}
|
||||
</code></pre>
|
||||
</li>
|
||||
</ol>
|
||||
<h2 id="convertir-un-thème-jekyll-pour-hugo">Convertir un thème Jekyll pour Hugo</h2>
|
||||
<p>C’est la majeure partie du travail. La documentation est votre ami.
|
||||
Vous devriez vous référer à [la documentation des thèmes de Jekyll]
|
||||
(<a href="http://jekyllrb.com/docs/templates/">http://jekyllrb.com/docs/templates/</a>) si vous devez vous rafraîchir la mémoire
|
||||
sur la façon dont vous avez construit votre blog et [les thèmes de Hugo]
|
||||
(/layout/templates/) pour apprendre la manière de faire sur Hugo.</p>
|
||||
<p>Pour vous donner un point de référence, la conversion du thème pour
|
||||
<a href="http://heyitsalex.net/">heyitsalex.net</a> ne m’a pris que quelques heures.</p>
|
||||
<h2 id="convertir-les-extensions-jekyll-vers-des-shortcodes-hugo">Convertir les extensions Jekyll vers des shortcodes Hugo</h2>
|
||||
<p>Jekyll support les <a href="http://jekyllrb.com/docs/plugins/">extensions</a>; Hugo lui a
|
||||
les <a href="http://localhost:1313/doc/shortcodes/">shortcodes</a>. C’est assez banal les porter.</p>
|
||||
<h3 id="implémentation">Implémentation</h3>
|
||||
<p>Comme exemple, j’utilise une extension pour avoir un [<code>image_tag</code>](https://githu
|
||||
b.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc
|
||||
06908ec/_plugins/image_tag.rb) presonnalisé pour générer les images avec une
|
||||
légende sur Jekyll. J’ai vu que Hugo implémente un shortcode qui fait exactement
|
||||
la même chose.</p>
|
||||
<p>Extension Jekyll :</p>
|
||||
<pre tabindex="0"><code>module Jekyll
|
||||
class ImageTag < Liquid::Tag
|
||||
@url = nil
|
||||
@caption = nil
|
||||
@class = nil
|
||||
@link = nil
|
||||
// Patterns
|
||||
IMAGE_URL_WITH_CLASS_AND_CAPTION =
|
||||
IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK =
|
||||
/(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->
|
||||
((https?:\/\/|\/)(\S+))(\s*)/i
|
||||
IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i
|
||||
IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i
|
||||
IMAGE_URL = /((https?:\/\/|\/)(\S+))/i
|
||||
def initialize(tag_name, markup, tokens)
|
||||
super
|
||||
if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK
|
||||
@class = $1
|
||||
@url = $3
|
||||
@caption = $7
|
||||
@link = $9
|
||||
elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION
|
||||
@class = $1
|
||||
@url = $3
|
||||
@caption = $7
|
||||
elsif markup =~ IMAGE_URL_WITH_CAPTION
|
||||
@url = $1
|
||||
@caption = $5
|
||||
elsif markup =~ IMAGE_URL_WITH_CLASS
|
||||
@class = $1
|
||||
@url = $3
|
||||
elsif markup =~ IMAGE_URL
|
||||
@url = $1
|
||||
end
|
||||
end
|
||||
def render(context)
|
||||
if @class
|
||||
source = "<figure class='#{@class}'>"
|
||||
else
|
||||
source = "<figure>"
|
||||
end
|
||||
if @link
|
||||
source += "<a href=\"#{@link}\">"
|
||||
end
|
||||
source += "<img src=\"#{@url}\">"
|
||||
if @link
|
||||
source += "</a>"
|
||||
end
|
||||
source += "<figcaption>#{@caption}</figcaption>" if @caption
|
||||
source += "</figure>"
|
||||
source
|
||||
end
|
||||
end
|
||||
end
|
||||
Liquid::Template.register_tag('image', Jekyll::ImageTag)
|
||||
</code></pre><p>Écrite en tant que shortcode Hugo:</p>
|
||||
<pre tabindex="0"><code><!-- image -->
|
||||
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
|
||||
{{ with .Get "link"}}<a href="{{.}}">{{ end }}
|
||||
<img src="{{ .Get "src" }}"
|
||||
{{ if or (.Get "alt") (.Get "caption") }}
|
||||
alt="{{ with .Get "alt"}}
|
||||
{{.}}
|
||||
{{else}}
|
||||
{{ .Get "caption" }}
|
||||
{{ end }}"
|
||||
{{ end }} />
|
||||
{{ if .Get "link"}}</a>{{ end }}
|
||||
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
|
||||
<figcaption>{{ if isset .Params "title" }}
|
||||
{{ .Get "title" }}{{ end }}
|
||||
{{ if or (.Get "caption") (.Get "attr")}}<p>
|
||||
{{ .Get "caption" }}
|
||||
{{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
|
||||
{{ .Get "attr" }}
|
||||
{{ if .Get "attrlink"}}</a> {{ end }}
|
||||
</p> {{ end }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
<!-- image -->
|
||||
</code></pre><h3 id="utilisation">Utilisation</h3>
|
||||
<p>J’ai simplement changé :</p>
|
||||
<pre tabindex="0"><code>{% image
|
||||
full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg
|
||||
"One of my favorite touristy-type photos. I secretly waited for the
|
||||
good light while we were "having fun" and took this. Only regret: a
|
||||
stupid pole in the top-left corner of the frame I had to clumsily get
|
||||
rid of at post-processing."
|
||||
->http://www.flickr.com/photos/alexnormand/4829260124/in/
|
||||
set-72157624547713078/ %}
|
||||
</code></pre><p>pour cela (cet exemple utilise une version légèrement étendue nommée <code>fig</code>,
|
||||
différente de la <code>figure</code> intégrée) :</p>
|
||||
<pre tabindex="0"><code>{{% fig class="full"
|
||||
src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg"
|
||||
title="One of my favorite touristy-type photos. I secretly waited for the
|
||||
good light while we were having fun and took this. Only regret: a stupid
|
||||
pole in the top-left corner of the frame I had to clumsily get rid of at
|
||||
post-processing."
|
||||
link="http://www.flickr.com/photos/alexnormand/4829260124/in/
|
||||
set-72157624547713078/" %}}
|
||||
</code></pre><p>Comme bonus, les paramètres nommés des shortcodes sont plus lisibles.</p>
|
||||
<h2 id="touches-finales">Touches finales</h2>
|
||||
<h3 id="corriger-le-contenu">Corriger le contenu</h3>
|
||||
<p>Suivant le nombre de modifications que vous avez effectué sur chaque articles
|
||||
avec Jekyll, cette étape requierra plus ou moins d’efforts. Il n’y a pas de
|
||||
règles rigoureuses ici, si ce n’est que <code>hugo server --watch</code> est votre ami.
|
||||
Testez vos modifications et corrigez les erreurs au besoin.</p>
|
||||
<h3 id="nettoyez-le-tout">Nettoyez le tout</h3>
|
||||
<p>Vous voudrez sûrement supprimer votre configuration Jekyll maintenant que tout
|
||||
est fini. Exact, pensez à supprimer tout ce qui est inutilisé.</p>
|
||||
<h2 id="un-exemple-pratique">Un exemple pratique</h2>
|
||||
<p><a href="http://heyitsalex.net/">Hey, it’s Alex</a> a été migré de Jekyll vers Hugo en
|
||||
moins de temps qu’une journée père enfant. Vous pouvez trouver toutes les
|
||||
modification en regardant ce [diff](<a href="https://github.com/alexandre-normand/alexand">https://github.com/alexandre-normand/alexand</a>
|
||||
re-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a…b7f6605b1265e83b4b
|
||||
81495423294208cc74d610).</p>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-folder meta-icon"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>
|
||||
|
||||
<span class="tag"><a href="http://localhost:1313/fr/categories/hugo/">Hugo</a></span>
|
||||
<span class="tag"><a href="http://localhost:1313/fr/categories/jekyll/">Jekyll</a></span>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text">
|
||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
|
||||
<polyline points="14 2 14 8 20 8"></polyline>
|
||||
<line x1="16" y1="13" x2="8" y2="13"></line>
|
||||
<line x1="16" y1="17" x2="8" y2="17"></line>
|
||||
<polyline points="10 9 9 9 8 9"></polyline>
|
||||
</svg>
|
||||
864 Mots
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar">
|
||||
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
|
||||
<line x1="16" y1="2" x2="16" y2="6"></line>
|
||||
<line x1="8" y1="2" x2="8" y2="6"></line>
|
||||
<line x1="3" y1="10" x2="21" y2="10"></line>
|
||||
</svg>
|
||||
|
||||
2014-03-10 01:00
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="sharing-buttons">
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://facebook.com/sharer/sharer.php?u=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f" target="_blank" rel="noopener" aria-label="" title="Share on facebook">
|
||||
<div class="resp-sharing-button resp-sharing-button--facebook resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://twitter.com/intent/tweet/?url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f" target="_blank" rel="noopener" aria-label="" title="Share on twitter">
|
||||
<div class="resp-sharing-button resp-sharing-button--twitter resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://www.tumblr.com/widgets/share/tool?posttype=link&title=Migrer%20vers%20Hugo%20depuis%20Jekyll&caption=Migrer%20vers%20Hugo%20depuis%20Jekyll&canonicalUrl=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f" target="_blank" rel="noopener" aria-label="" title="Share on tumblr">
|
||||
<div class="resp-sharing-button resp-sharing-button--tumblr resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.563 24c-5.093 0-7.031-3.756-7.031-6.411V9.747H5.116V6.648c3.63-1.313 4.512-4.596 4.71-6.469C9.84.051 9.941 0 9.999 0h3.517v6.114h4.801v3.633h-4.82v7.47c.016 1.001.375 2.371 2.207 2.371h.09c.631-.02 1.486-.205 1.936-.419l1.156 3.425c-.436.636-2.4 1.374-4.156 1.404h-.178l.011.002z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="mailto:?subject=Migrer%20vers%20Hugo%20depuis%20Jekyll&body=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f" target="_self" rel="noopener" aria-label="" title="Share via email">
|
||||
<div class="resp-sharing-button resp-sharing-button--email resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://pinterest.com/pin/create/button/?url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f&media=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f;description=Migrer%20vers%20Hugo%20depuis%20Jekyll" target="_blank" rel="noopener" aria-label="" title="Share on pinterest">
|
||||
<div class="resp-sharing-button resp-sharing-button--pinterest resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://www.linkedin.com/shareArticle?mini=true&url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f&title=Migrer%20vers%20Hugo%20depuis%20Jekyll&summary=Migrer%20vers%20Hugo%20depuis%20Jekyll&source=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f" target="_blank" rel="noopener" aria-label="" title="Share on linkedin">
|
||||
<div class="resp-sharing-button resp-sharing-button--linkedin resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://reddit.com/submit/?url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f&resubmit=true&title=Migrer%20vers%20Hugo%20depuis%20Jekyll" target="_blank" rel="noopener" aria-label="" title="Share on reddit">
|
||||
<div class="resp-sharing-button resp-sharing-button--reddit resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://www.xing.com/app/user?op=share;url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f;title=Migrer%20vers%20Hugo%20depuis%20Jekyll" target="_blank" rel="noopener" aria-label="" title="Share on xing">
|
||||
<div class="resp-sharing-button resp-sharing-button--xing resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M18.188 0c-.517 0-.741.325-.927.66 0 0-7.455 13.224-7.702 13.657.015.024 4.919 9.023 4.919 9.023.17.308.436.66.967.66h3.454c.211 0 .375-.078.463-.22.089-.151.089-.346-.009-.536l-4.879-8.916c-.004-.006-.004-.016 0-.022L22.139.756c.095-.191.097-.387.006-.535C22.056.078 21.894 0 21.686 0h-3.498zM3.648 4.74c-.211 0-.385.074-.473.216-.09.149-.078.339.02.531l2.34 4.05c.004.01.004.016 0 .021L1.86 16.051c-.099.188-.093.381 0 .529.085.142.239.234.45.234h3.461c.518 0 .766-.348.945-.667l3.734-6.609-2.378-4.155c-.172-.315-.434-.659-.962-.659H3.648v.016z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="whatsapp://send?text=Migrer%20vers%20Hugo%20depuis%20Jekyll%20http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f" target="_blank" rel="noopener" aria-label="" title="Share on whatsapp">
|
||||
<div class="resp-sharing-button resp-sharing-button--whatsapp resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://news.ycombinator.com/submitlink?u=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f&t=Migrer%20vers%20Hugo%20depuis%20Jekyll" target="_blank" rel="noopener" aria-label="" title="Share on hacker news">
|
||||
<div class="resp-sharing-button resp-sharing-button--hackernews resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M0 24V0h24v24H0zM6.951 5.896l4.112 7.708v5.064h1.583v-4.972l4.148-7.799h-1.749l-2.457 4.875c-.372.745-.688 1.434-.688 1.434s-.297-.708-.651-1.434L8.831 5.896h-1.88z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://telegram.me/share/url?text=Migrer%20vers%20Hugo%20depuis%20Jekyll&url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f03%2fmigrer-vers-hugo-depuis-jekyll%2f" target="_blank" rel="noopener" aria-label="" title="Share on telegram">
|
||||
<div class="resp-sharing-button resp-sharing-button--telegram resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pagination">
|
||||
|
||||
|
||||
<div class="pagination__buttons">
|
||||
|
||||
<span class="button previous">
|
||||
<a href="http://localhost:1313/fr/posts/2014/04/introduction-aux-mod%C3%A8les-hugo/">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">Introduction aux modèles (Hu)go</span>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer class="footer">
|
||||
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>© 2026</span>
|
||||
<span><a href="http://localhost:1313/">Thomas Sindt</a></span>
|
||||
<span><a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a></span>
|
||||
<span><a href="http://localhost:1313/fr/posts/index.xml" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>Powered by <a href="http://gohugo.io">Hugo</a> and the Hello Friend NG Theme</span><span>Made with ❤ by <a href="https://thomassindt.de">Thomas Sindt</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="http://localhost:1313/bundle.min.08b680078a3cf9c69e3dd217a5aa52cfddd4a1d850f8cdff127fdd7421a71f8b2b474be69386f67819edace92273916e7230c9054f38107db9dc6730b3530ab5.js" integrity="sha512-CLaAB4o8+caePdIXpapSz93UodhQ+M3/En/ddCGnH4srR0vmk4b2eBntrOkic5FucjDJBU84EH253Gcws1MKtQ=="></script>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
296
nss/public/fr/posts/2014/04/débuter-avec-hugo/index.html
Normal file
296
nss/public/fr/posts/2014/04/débuter-avec-hugo/index.html
Normal file
@@ -0,0 +1,296 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="author" content="map[name:Hugo Authors]">
|
||||
<meta name="description" content="Étape 1. Installer Hugo Allez sur la page de téléchargements de hugo et téléchargez la version appropriée à votre système d’exploitation et votre architecture.
|
||||
Sauvegardez le fichier téléchargé à un endroit précis, afin de l’utiliser dans l’étape suivante.
|
||||
Des informations plus complètes sont disponibles sur la page installing hugo
|
||||
" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="robots" content="noodp" />
|
||||
<meta name="theme-color" content="" />
|
||||
<link rel="canonical" href="http://localhost:1313/fr/posts/2014/04/d%C3%A9buter-avec-hugo/" />
|
||||
|
||||
|
||||
<title>
|
||||
|
||||
Débuter avec Hugo :: Northside Studio Achim — Hello Friend NG Theme
|
||||
|
||||
</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="http://localhost:1313/main.min.7289daf2e88ea2c7b253a51cc5794c7cc17e7aeb7295a19d978db764a5862f25.css" integrity="sha256-cona8uiOoseyU6UcxXlMfMF+eutylaGdl423ZKWGLyU=" crossorigin="anonymous">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="http://localhost:1313/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="http://localhost:1313/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="http://localhost:1313/favicon-16x16.png">
|
||||
<link rel="manifest" href="http://localhost:1313/site.webmanifest">
|
||||
<link rel="mask-icon" href="http://localhost:1313/safari-pinned-tab.svg" color="">
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="">
|
||||
|
||||
|
||||
|
||||
<meta itemprop="name" content="Débuter avec Hugo">
|
||||
<meta itemprop="description" content="Étape 1. Installer Hugo Allez sur la page de téléchargements de hugo et téléchargez la version appropriée à votre système d’exploitation et votre architecture.
|
||||
Sauvegardez le fichier téléchargé à un endroit précis, afin de l’utiliser dans l’étape suivante.
|
||||
Des informations plus complètes sont disponibles sur la page installing hugo">
|
||||
<meta itemprop="datePublished" content="2014-04-02T00:00:00+00:00">
|
||||
<meta itemprop="dateModified" content="2014-04-02T00:00:00+00:00">
|
||||
<meta itemprop="wordCount" content="399">
|
||||
<meta itemprop="image" content="http://localhost:1313/">
|
||||
<meta itemprop="keywords" content="Hugo">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="http://localhost:1313/">
|
||||
<meta name="twitter:title" content="Débuter avec Hugo">
|
||||
<meta name="twitter:description" content="Étape 1. Installer Hugo Allez sur la page de téléchargements de hugo et téléchargez la version appropriée à votre système d’exploitation et votre architecture.
|
||||
Sauvegardez le fichier téléchargé à un endroit précis, afin de l’utiliser dans l’étape suivante.
|
||||
Des informations plus complètes sont disponibles sur la page installing hugo">
|
||||
|
||||
|
||||
|
||||
<meta property="og:url" content="http://localhost:1313/fr/posts/2014/04/d%C3%A9buter-avec-hugo/">
|
||||
<meta property="og:site_name" content="Northside Studio Achim">
|
||||
<meta property="og:title" content="Débuter avec Hugo">
|
||||
<meta property="og:description" content="Étape 1. Installer Hugo Allez sur la page de téléchargements de hugo et téléchargez la version appropriée à votre système d’exploitation et votre architecture.
|
||||
Sauvegardez le fichier téléchargé à un endroit précis, afin de l’utiliser dans l’étape suivante.
|
||||
Des informations plus complètes sont disponibles sur la page installing hugo">
|
||||
<meta property="og:locale" content="fr">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="article:section" content="posts">
|
||||
<meta property="article:published_time" content="2014-04-02T00:00:00+00:00">
|
||||
<meta property="article:modified_time" content="2014-04-02T00:00:00+00:00">
|
||||
<meta property="og:image" content="http://localhost:1313/">
|
||||
|
||||
|
||||
|
||||
|
||||
<meta property="article:section" content="Hugo" />
|
||||
|
||||
|
||||
|
||||
<meta property="article:published_time" content="2014-04-02 00:00:00 +0000 UTC" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<header class="header">
|
||||
<span class="header__inner">
|
||||
<a href="http://localhost:1313/" style="text-decoration: none;">
|
||||
<div class="logo">
|
||||
|
||||
<span class="logo__mark">></span>
|
||||
<span class="logo__text ">
|
||||
$ cd /home/</span>
|
||||
<span class="logo__cursor" style=
|
||||
"
|
||||
|
||||
">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<span class="header__right">
|
||||
<nav class="menu">
|
||||
<ul class="menu__inner">
|
||||
<div class="submenu">
|
||||
<li class="dropdown">
|
||||
<a href="javascript:void(0)" class="dropbtn">About</a>
|
||||
<div class="dropdown-content">
|
||||
|
||||
<a href="about/me/">About Me</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
<li><a href="http://localhost:1313/fr/posts/">Posts</a></li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
<span class="menu-trigger">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<main class="post">
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
Aussi disponible en
|
||||
|
||||
<a href="http://localhost:1313/posts/2014/04/getting-started-with-hugo/"><span class="flag fi fi-gb"></span></a>
|
||||
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2 class="post-title"><a href="http://localhost:1313/fr/posts/2014/04/d%C3%A9buter-avec-hugo/">Débuter avec Hugo</a></h2>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="post-content">
|
||||
<h2 id="étape-1-installer-hugo">Étape 1. Installer Hugo</h2>
|
||||
<p>Allez sur la page de téléchargements de
|
||||
<a href="https://github.com/spf13/hugo/releases">hugo</a> et téléchargez la version
|
||||
appropriée à votre système d’exploitation et votre architecture.</p>
|
||||
<p>Sauvegardez le fichier téléchargé à un endroit précis, afin de l’utiliser dans
|
||||
l’étape suivante.</p>
|
||||
<p>Des informations plus complètes sont disponibles sur la page
|
||||
<a href="http://localhost:1313/overview/installing/">installing hugo</a></p>
|
||||
<h2 id="étape-2-compilez-la-documentation">Étape 2. Compilez la documentation</h2>
|
||||
<p>Hugo possède son propre site d’exemple qui se trouve être également le site que
|
||||
vous lisez actuellement.</p>
|
||||
<p>Suivez les instructions suivante :</p>
|
||||
<ol>
|
||||
<li>Clonez le <a href="http://github.com/spf13/hugo">dépôt de hugo</a></li>
|
||||
<li>Allez dans ce dépôt</li>
|
||||
<li>Lancez Hugo en mode serveur et compilez la documentation</li>
|
||||
<li>Ouvrez votre navigateur sur http://localhost:1313</li>
|
||||
</ol>
|
||||
<p>Voici les commandes génériques correspondantes :</p>
|
||||
<pre><code>git clone https://github.com/spf13/hugo
|
||||
cd hugo
|
||||
/chemin/ou/vous/avez/installe/hugo server --source=./docs
|
||||
> 29 pages created
|
||||
> 0 tags index created
|
||||
> in 27 ms
|
||||
> Web Server is available at http://localhost:1313
|
||||
> Press ctrl+c to stop
|
||||
</code></pre>
|
||||
<p>Lorsque vous avez cela, continuez le reste de ce guide sur votre version locale.</p>
|
||||
<h2 id="étape-3-changer-le-site-de-documentation">Étape 3. Changer le site de documentation</h2>
|
||||
<p>Arrêtez le processus de Hugo en pressant ctrl+c.</p>
|
||||
<p>Maintenant, nous allons relancer hugo, mais cette fois avec Hugo en mode de
|
||||
surveillance.</p>
|
||||
<pre><code>/chemin/vers/hugo/de/l-etape/1/hugo server --source=./docs --watch
|
||||
> 29 pages created
|
||||
> 0 tags index created
|
||||
> in 27 ms
|
||||
> Web Server is available at http://localhost:1313
|
||||
> Watching for changes in /Users/spf13/Code/hugo/docs/content
|
||||
> Press ctrl+c to stop
|
||||
</code></pre>
|
||||
<p>Ouvrez votre <a href="https://vim.spf13.com">éditeur favori</a> et changer l’une des
|
||||
sources des pages de contenu.
|
||||
Open your <a href="http://vim.spf13.com">favorite editor</a> and change one of the source
|
||||
content pages. Que diriez-vous de modifier ce fichier pour <em>résoudre une faute
|
||||
de typo</em>.</p>
|
||||
<p>Les fichiers de contenu peuvent être trouvés dans <code>docs/content/</code>. Sauf
|
||||
indication contraire, les fichiers sont situés au même emplacement relatif que
|
||||
l’URL, dans notre cas <code>docs/content/overview/quickstart.md</code>.</p>
|
||||
<p>Modifiez et sauvegardez ce fichier. Notez ce qu’il se passe dans le terminal.</p>
|
||||
<pre><code>> Change detected, rebuilding site
|
||||
|
||||
> 29 pages created
|
||||
> 0 tags index created
|
||||
> in 26 ms
|
||||
</code></pre>
|
||||
<p>Rechargez la page dans votre navigateur et voyez que le problème de typo est
|
||||
maintenant résolu.</p>
|
||||
<p>Notez à quel point cela a été rapide. Essayez de recharger le site avant qu’il
|
||||
soit fini de compiler.
|
||||
Notice how quick that was. Try to refresh the site before it’s finished
|
||||
building. Je paris que vous n’y arrivez pas.
|
||||
Le fait d’avoir des réactions presque instantanées vous permet d’avoir votre
|
||||
créativité fluide sans avoir à attendre de longues compilations.</p>
|
||||
<h2 id="step-4-amusez-vous">Step 4. Amusez-vous</h2>
|
||||
<p>Le meilleur moyen d’apprendre quelque chose est de s’amuser avec.</p>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-folder meta-icon"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>
|
||||
|
||||
<span class="tag"><a href="http://localhost:1313/fr/categories/hugo/">Hugo</a></span>
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer class="footer">
|
||||
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>© 2026</span>
|
||||
<span><a href="http://localhost:1313/">Thomas Sindt</a></span>
|
||||
<span><a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a></span>
|
||||
<span><a href="http://localhost:1313/fr/posts/index.xml" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>Powered by <a href="http://gohugo.io">Hugo</a> and the Hello Friend NG Theme</span><span>Made with ❤ by <a href="https://thomassindt.de">Thomas Sindt</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="http://localhost:1313/bundle.min.08b680078a3cf9c69e3dd217a5aa52cfddd4a1d850f8cdff127fdd7421a71f8b2b474be69386f67819edace92273916e7230c9054f38107db9dc6730b3530ab5.js" integrity="sha512-CLaAB4o8+caePdIXpapSz93UodhQ+M3/En/ddCGnH4srR0vmk4b2eBntrOkic5FucjDJBU84EH253Gcws1MKtQ=="></script>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,628 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="author" content="map[name:Michael Henderson]">
|
||||
<meta name="description" content="Hugo utilise l’excellente librairie go html/template pour son moteur de modèles. c’est un moteur extrêmement léger qui offre un très petit nombre de fonctions logiques. À notre expérience, c’est juste ce qu’il faut pour créer un bon site web statique. Si vous avez déjà utilisé d’autre moteurs de modèles pour différents langages ou frameworks, vous allez retrouver beaucoup de similitudes avec les modèles go.
|
||||
Ce document est une introduction sur l’utilisation de Go templates. La documentation go fourni plus de détails.
|
||||
" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="robots" content="noodp" />
|
||||
<meta name="theme-color" content="" />
|
||||
<link rel="canonical" href="http://localhost:1313/fr/posts/2014/04/introduction-aux-mod%C3%A8les-hugo/" />
|
||||
|
||||
|
||||
<title>
|
||||
|
||||
Introduction aux modèles (Hu)go :: Northside Studio Achim — Hello Friend NG Theme
|
||||
|
||||
</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="http://localhost:1313/main.min.7289daf2e88ea2c7b253a51cc5794c7cc17e7aeb7295a19d978db764a5862f25.css" integrity="sha256-cona8uiOoseyU6UcxXlMfMF+eutylaGdl423ZKWGLyU=" crossorigin="anonymous">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="http://localhost:1313/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="http://localhost:1313/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="http://localhost:1313/favicon-16x16.png">
|
||||
<link rel="manifest" href="http://localhost:1313/site.webmanifest">
|
||||
<link rel="mask-icon" href="http://localhost:1313/safari-pinned-tab.svg" color="">
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="">
|
||||
|
||||
|
||||
|
||||
<meta itemprop="name" content="Introduction aux modèles (Hu)go">
|
||||
<meta itemprop="description" content="Hugo utilise l’excellente librairie go html/template pour son moteur de modèles. c’est un moteur extrêmement léger qui offre un très petit nombre de fonctions logiques. À notre expérience, c’est juste ce qu’il faut pour créer un bon site web statique. Si vous avez déjà utilisé d’autre moteurs de modèles pour différents langages ou frameworks, vous allez retrouver beaucoup de similitudes avec les modèles go.
|
||||
Ce document est une introduction sur l’utilisation de Go templates. La documentation go fourni plus de détails.">
|
||||
<meta itemprop="datePublished" content="2014-04-02T00:00:00+00:00">
|
||||
<meta itemprop="dateModified" content="2014-04-02T00:00:00+00:00">
|
||||
<meta itemprop="wordCount" content="1508">
|
||||
<meta itemprop="image" content="http://localhost:1313/">
|
||||
<meta itemprop="keywords" content="Go">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="http://localhost:1313/">
|
||||
<meta name="twitter:title" content="Introduction aux modèles (Hu)go">
|
||||
<meta name="twitter:description" content="Hugo utilise l’excellente librairie go html/template pour son moteur de modèles. c’est un moteur extrêmement léger qui offre un très petit nombre de fonctions logiques. À notre expérience, c’est juste ce qu’il faut pour créer un bon site web statique. Si vous avez déjà utilisé d’autre moteurs de modèles pour différents langages ou frameworks, vous allez retrouver beaucoup de similitudes avec les modèles go.
|
||||
Ce document est une introduction sur l’utilisation de Go templates. La documentation go fourni plus de détails.">
|
||||
|
||||
|
||||
|
||||
<meta property="og:url" content="http://localhost:1313/fr/posts/2014/04/introduction-aux-mod%C3%A8les-hugo/">
|
||||
<meta property="og:site_name" content="Northside Studio Achim">
|
||||
<meta property="og:title" content="Introduction aux modèles (Hu)go">
|
||||
<meta property="og:description" content="Hugo utilise l’excellente librairie go html/template pour son moteur de modèles. c’est un moteur extrêmement léger qui offre un très petit nombre de fonctions logiques. À notre expérience, c’est juste ce qu’il faut pour créer un bon site web statique. Si vous avez déjà utilisé d’autre moteurs de modèles pour différents langages ou frameworks, vous allez retrouver beaucoup de similitudes avec les modèles go.
|
||||
Ce document est une introduction sur l’utilisation de Go templates. La documentation go fourni plus de détails.">
|
||||
<meta property="og:locale" content="fr">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="article:section" content="posts">
|
||||
<meta property="article:published_time" content="2014-04-02T00:00:00+00:00">
|
||||
<meta property="article:modified_time" content="2014-04-02T00:00:00+00:00">
|
||||
<meta property="og:image" content="http://localhost:1313/">
|
||||
|
||||
|
||||
|
||||
|
||||
<meta property="article:section" content="Go" />
|
||||
|
||||
|
||||
|
||||
<meta property="article:published_time" content="2014-04-02 00:00:00 +0000 UTC" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<header class="header">
|
||||
<span class="header__inner">
|
||||
<a href="http://localhost:1313/" style="text-decoration: none;">
|
||||
<div class="logo">
|
||||
|
||||
<span class="logo__mark">></span>
|
||||
<span class="logo__text ">
|
||||
$ cd /home/</span>
|
||||
<span class="logo__cursor" style=
|
||||
"
|
||||
|
||||
">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<span class="header__right">
|
||||
<nav class="menu">
|
||||
<ul class="menu__inner">
|
||||
<div class="submenu">
|
||||
<li class="dropdown">
|
||||
<a href="javascript:void(0)" class="dropbtn">About</a>
|
||||
<div class="dropdown-content">
|
||||
|
||||
<a href="about/me/">About Me</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
<li><a href="http://localhost:1313/fr/posts/">Posts</a></li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
<span class="menu-trigger">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<main class="post">
|
||||
|
||||
<div class="post-info">
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock">
|
||||
<circle cx="12" cy="12" r="10"></circle>
|
||||
<polyline points="12 6 12 12 16 14"></polyline>
|
||||
</svg>
|
||||
8 minutes
|
||||
|
||||
|
||||
| Aussi disponible en
|
||||
|
||||
<a href="http://localhost:1313/posts/2014/04/hugo-template-primer/"><span class="flag fi fi-gb"></span></a>
|
||||
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h1 class="post-title">
|
||||
<a href="http://localhost:1313/fr/posts/2014/04/introduction-aux-mod%C3%A8les-hugo/">Introduction aux modèles (Hu)go</a>
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="post-content">
|
||||
<p>Hugo utilise l’excellente librairie <a href="http://golang.org/">go</a> <a href="http://golang.org/pkg/html/template/">html/template</a> pour
|
||||
son moteur de modèles. c’est un moteur extrêmement léger qui offre un très petit
|
||||
nombre de fonctions logiques. À notre expérience, c’est juste ce qu’il faut pour
|
||||
créer un bon site web statique. Si vous avez déjà utilisé d’autre moteurs de
|
||||
modèles pour différents langages ou frameworks, vous allez retrouver beaucoup de
|
||||
similitudes avec les modèles go.</p>
|
||||
<p>Ce document est une introduction sur l’utilisation de Go templates. La
|
||||
<a href="http://golang.org/pkg/html/template/">documentation go</a> fourni plus de détails.</p>
|
||||
<h2 id="introduction-aux-modèles-go">Introduction aux modèles Go</h2>
|
||||
<p>Go templates fournit un langage de modèles très simple. Il adhère à la
|
||||
conviction que les modèles ou les vues doivent avoir une logique des plus
|
||||
élémentaires. L’une des conséquences de cette simplicité est que les modèles
|
||||
seront plus rapides a être analysés.</p>
|
||||
<p>Une caractéristique unique de Go templates est qu’il est conscient du contenu.
|
||||
Les variables et le contenu va être nettoyé suivant le contexte d’utilisation.
|
||||
Plus de détails sont disponibles dans la <a href="http://golang.org/pkg/html/template/">documentation go</a>.</p>
|
||||
<h2 id="syntaxe-basique">Syntaxe basique</h2>
|
||||
<p>Les modèles en langage Go sont des fichiers HTML avec l’ajout de variables et
|
||||
fonctions.</p>
|
||||
<p><strong>Les variables Go et les fonctions sont accessibles avec {{ }}</strong></p>
|
||||
<p>Accès à une variable prédéfinie “foo”:</p>
|
||||
<pre><code>{{ foo }}
|
||||
</code></pre>
|
||||
<p><strong>Les paramètres sont séparés par des espaces</strong></p>
|
||||
<p>Appel de la fonction add avec 1 et 2 en argument**</p>
|
||||
<pre><code>{{ add 1 2 }}
|
||||
</code></pre>
|
||||
<p><strong>Les méthodes et les champs sont accessibles par un point</strong></p>
|
||||
<p>Accès au paramètre de la page “bar”</p>
|
||||
<pre><code>{{ .Params.bar }}
|
||||
</code></pre>
|
||||
<p><strong>Les parenthèses peuvent être utilisées pour grouper des éléments ensemble</strong></p>
|
||||
<pre tabindex="0"><code>{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
|
||||
</code></pre><h2 id="variables">Variables</h2>
|
||||
<p>Chaque modèle go a une structure (objet) mis à sa disposition. Avec Hugo, à
|
||||
chaque modèle est passé soit une page, soit une structure de nœud, suivant quel
|
||||
type de page vous rendez. Plus de détails sont disponibles sur la page des
|
||||
<a href="http://localhost:1313/layout/variables">variables</a>.</p>
|
||||
<p>Une variable est accessible par son nom.</p>
|
||||
<pre><code><title>{{ .Title }}</title>
|
||||
</code></pre>
|
||||
<p>Les variables peuvent également être définies et appelées.</p>
|
||||
<pre><code>{{ $address := "123 Main St."}}
|
||||
{{ $address }}
|
||||
</code></pre>
|
||||
<h2 id="functions">Functions</h2>
|
||||
<p>Go templace est livré avec quelques fonctions qui fournissent des
|
||||
fonctionnalités basiques. Le système de Go template fourni également un
|
||||
mécanisme permettant aux applications d’étendre les fonctions disponible. Les
|
||||
<a href="http://localhost:1313/layout/functions">fonctions de modèle Hugo</a> fourni quelques fonctionnalités
|
||||
supplémentaires que nous espérons qu’elles seront utiles pour vos sites web.
|
||||
Les functions sont appelées en utilisant leur nom suivi par les paramètres
|
||||
requis séparés par des espaces. Des fonctions de modèles ne peuvent pas être
|
||||
ajoutées sans recompiler Hugo.</p>
|
||||
<p><strong>Exemple:</strong></p>
|
||||
<pre><code>{{ add 1 2 }}
|
||||
</code></pre>
|
||||
<h2 id="inclusions">Inclusions</h2>
|
||||
<p>Lorsque vous incluez un autre modèle, vous devez y passer les données qu’il sera
|
||||
en mesure d’accèder. Pour passer le contexte actuel, pensez à ajouter un point.
|
||||
La localisation du modèle sera toujours à partir du répertoire /layout/ dans
|
||||
Hugo.</p>
|
||||
<p><strong>Exemple:</strong></p>
|
||||
<pre><code>{{ template "chrome/header.html" . }}
|
||||
</code></pre>
|
||||
<h2 id="logique">Logique</h2>
|
||||
<p>Go templates fourni les itérations et la logique conditionnèle des plus basique.</p>
|
||||
<h3 id="itération">Itération</h3>
|
||||
<p>Comme en go, les modèles go utilisent fortement <em>range</em> pour itérer dans une
|
||||
map, un array ou un slice. Les exemples suivant montre différentes façons
|
||||
d’utiliser <em>range</em></p>
|
||||
<p><strong>Exemple 1: En utilisant le context</strong></p>
|
||||
<pre><code>{{ range array }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
</code></pre>
|
||||
<p><strong>Exemple 2: En déclarant un nom de variable</strong></p>
|
||||
<pre><code>{{range $element := array}}
|
||||
{{ $element }}
|
||||
{{ end }}
|
||||
</code></pre>
|
||||
<p><strong>Exemple 2: En déclarant un nom de varialbe pour la clé et la valeur</strong></p>
|
||||
<pre><code>{{range $index, $element := array}}
|
||||
{{ $index }}
|
||||
{{ $element }}
|
||||
{{ end }}
|
||||
</code></pre>
|
||||
<h3 id="conditions">Conditions</h3>
|
||||
<p><em>If</em>, <em>else</em>, <em>with</em>, <em>or</em>, <em>&</em>, <em>and</em> fournissent la base pour la logique
|
||||
conditionnelle avec Go templates. Comme <em>range</em>, chaque déclaration est fermé
|
||||
avec <code>end</code>.</p>
|
||||
<p>Go templates considère les valeurs suivante comme <em>false</em> :</p>
|
||||
<ul>
|
||||
<li>false</li>
|
||||
<li>0</li>
|
||||
<li>tout array, slice, map ou chaine d’une longueur de zéro</li>
|
||||
</ul>
|
||||
<p><strong>Exemple 1: If</strong></p>
|
||||
<pre><code>{{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
|
||||
</code></pre>
|
||||
<p><strong>Exemple 2: If -> Else</strong></p>
|
||||
<pre><code>{{ if isset .Params "alt" }}
|
||||
{{ index .Params "alt" }}
|
||||
{{else}}
|
||||
{{ index .Params "caption" }}
|
||||
{{ end }}
|
||||
</code></pre>
|
||||
<p><strong>Exemple 3: And & Or</strong></p>
|
||||
<pre tabindex="0"><code>{{ if and (or (isset .Params "title") (isset .Params "caption"))
|
||||
(isset .Params "attr")}}
|
||||
</code></pre><p><strong>Exemple 4: With</strong></p>
|
||||
<p>Une manière alternative d’écrire un “if” et de référencer cette même valeur est
|
||||
d’utiliser “with”. Cela permet de remplacer le contexte <code>.</code> par cet valeur et
|
||||
saute le bloc si la variable est absente.</p>
|
||||
<p>Le premier exemple peut être simplifié à ceci :</p>
|
||||
<pre><code>{{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
|
||||
</code></pre>
|
||||
<p><strong>Exemple 5: If -> Else If</strong></p>
|
||||
<pre><code>{{ if isset .Params "alt" }}
|
||||
{{ index .Params "alt" }}
|
||||
{{ else if isset .Params "caption" }}
|
||||
{{ index .Params "caption" }}
|
||||
{{ end }}
|
||||
</code></pre>
|
||||
<h2 id="pipes"><em>Pipes</em></h2>
|
||||
<p>L’un des composants le plus puissant de Go templates est la capacité d’empiler
|
||||
les action l’une après l’autre. Cela est fait en utilisant les <em>pipes</em>.
|
||||
Empruntés aux <em>pipes</em> unix, le concept est simple. Chaque sortie de <em>pipeline</em>
|
||||
devient l’entrée du <em>pipe</em> suivant.</p>
|
||||
<p>À cause de la syntaxe très simple de Go templates, le <em>pipe</em> est essentiel pour
|
||||
être capable d’enchainer les appels de fonctions. Une limitation des <em>pipes</em>
|
||||
est qu’il ne peuvent fonctionner seulement avec une seule valeur et cette valeur
|
||||
devient le dernier paramètre du prochain <em>pipeline</em>.</p>
|
||||
<p>Quelques exemples simple devrait vous aider à comprendre comment utiliser les
|
||||
<em>pipes</em>.</p>
|
||||
<p><strong>Exemple 1 :</strong></p>
|
||||
<pre><code>{{ if eq 1 1 }} Same {{ end }}
|
||||
</code></pre>
|
||||
<p>est identique à</p>
|
||||
<pre><code>{{ eq 1 1 | if }} Same {{ end }}
|
||||
</code></pre>
|
||||
<p>Il semble étrange de placer le <em>if</em> à la fin, mais il fournit une bonne
|
||||
illustration de la façon d’utiliser les tuyaux.</p>
|
||||
<p><strong>Exemple 2 :</strong></p>
|
||||
<pre><code>{{ index .Params "disqus_url" | html }}
|
||||
</code></pre>
|
||||
<p>Accès au paramètre de page nommé “disqus_url” et échappement du HTML</p>
|
||||
<p><strong>Exemple 3 :</strong></p>
|
||||
<pre tabindex="0"><code>{{ if or (or (isset .Params "title") (isset .Params "caption"))
|
||||
(isset .Params "attr")}}
|
||||
Stuff Here
|
||||
{{ end }}
|
||||
</code></pre><p>Peut être réécrit en</p>
|
||||
<pre tabindex="0"><code>{{ isset .Params "caption" | or isset .Params "title" |
|
||||
or isset .Params "attr" | if }}
|
||||
Stuff Here
|
||||
{{ end }}
|
||||
</code></pre><h2 id="contexte-alias-le-point">Contexte (alias. le point)</h2>
|
||||
<p>Le concept le plus facilement négligé pour comprendre les modèles go est que
|
||||
{{ . }} fait toujours référence au contexte actuel. Dans le plus haut niveau de
|
||||
votre modèle, ce sera l’ensemble des données mis à votre disposition. Dans une
|
||||
itération, ce sera la valeur de l’élément actuel. Enfin, dans une boucle, le
|
||||
contexte change. . ne fera plus référence aux données disponibles dans la page
|
||||
entière. Si vous avez besoin y d’accèder depuis l’intérieur d’une boucle, il est
|
||||
judicieux d’y définir comme variable au lieu de dépendre du contexte.</p>
|
||||
<p><strong>Exemple:</strong></p>
|
||||
<pre tabindex="0"><code>{{ $title := .Site.Title }}
|
||||
{{ range .Params.tags }}
|
||||
<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">
|
||||
{{ . }}</a> - {{ $title }} </li>
|
||||
{{ end }}
|
||||
</code></pre><p>Notez que, une fois que nous sommes entrés dans la boucle, la valeur de
|
||||
{{ . }} a changée. Nous avons défini une variable en dehors de la boucle, afin
|
||||
d’y avoir accès dans la boucle.</p>
|
||||
<h1 id="les-paramètres-dhugo">Les Paramètres d’Hugo</h1>
|
||||
<p>Hugo fournit l’option de passer des valeurs au modèle depuis la configuration du
|
||||
site, ou depuis les métadonnées de chaque partie du contenu. Vous pouvez définir
|
||||
n’importe quelle valeur de n’importe quel type (supporté par votre section
|
||||
liminaire / format de configuration) et les utiliser comme vous le souhaitez
|
||||
dans votre modèle.</p>
|
||||
<h2 id="utiliser-les-paramètres-de-contenu-page">Utiliser les paramètres de contenu (page)</h2>
|
||||
<p>Dans chaque partie du contenu, vous pouvez fournir des variables pour être
|
||||
utilisées par le modèle. Cela se passe dans la
|
||||
<a href="http://localhost:1313/content/front-matter">section liminaire</a>.</p>
|
||||
<p>Un exemple de cela est utilisé par ce site de documentation. La plupart des
|
||||
pages bénéficient de la présentation de la table des matières. Quelques fois,
|
||||
la table des matières n’a pas beaucoup de sens. Nous avons défini une variable
|
||||
dans notre section liminaire de quelques pages pour désactiver la table des
|
||||
matières.</p>
|
||||
<p>Ceci est un exemple de section liminaire :</p>
|
||||
<pre tabindex="0"><code>---
|
||||
title: "Permalinks"
|
||||
date: "2013-11-18"
|
||||
aliases:
|
||||
- "/doc/permalinks/"
|
||||
groups: ["extras"]
|
||||
groups_weight: 30
|
||||
notoc: true
|
||||
---
|
||||
</code></pre><p>Ceci est le code correspondant dans le modèle :</p>
|
||||
<pre><code> {{ if not .Params.notoc }}
|
||||
<div id="toc" class="well col-md-4 col-sm-6">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</code></pre>
|
||||
<h2 id="utiliser-les-paramètres-de-site-config">Utiliser les paramètres de site (config)</h2>
|
||||
<p>Dans votre configuration de plus haut niveau (ex <code>config.yaml</code>), vous pouvez
|
||||
définir des paramètres de site, dont les valeurs vous seront accessibles.</p>
|
||||
<p>Pour les instances, vous pourriez délarer :</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">params</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">CopyrightHTML</span>: <span style="color:#e6db74">"Copyright &#xA9; 2013 John Doe. All Rights Reserved."</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">TwitterUser</span>: <span style="color:#e6db74">"spf13"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">SidebarRecentLimit</span>: <span style="color:#ae81ff">5</span>
|
||||
</span></span></code></pre></div><p>Avec un pied de page, vous devriez déclarer un <code><footer></code> qui est affiché
|
||||
seulement si le paramètre <code>CopyrightHTML</code> est déclaré, et si il l’est, vous
|
||||
devriez le déclarer comme HTML-safe, afin d’éviter d’échapper les entités HTML.
|
||||
Cela vous permettra de le modifier facilement dans votre configuration au lieu
|
||||
de le chercher dans votre modèle.</p>
|
||||
<pre tabindex="0"><code>{{if .Site.Params.CopyrightHTML}}<footer>
|
||||
<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
|
||||
</footer>{{end}}
|
||||
</code></pre><p>Une alternative au “if” et d’appeler la même valeur est d’utiliser “with”. Cela
|
||||
modifiera le contexte et passera le bloc si la variable est absente :</p>
|
||||
<pre tabindex="0"><code>{{with .Site.Params.TwitterUser}}<span class="twitter">
|
||||
<a href="https://twitter.com/{{.}}" rel="author">
|
||||
<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
|
||||
alt="Twitter"></a>
|
||||
</span>{{end}}
|
||||
</code></pre><p>Enfin, si vous souhaitez extraire des “constantes magiques” de vos mises en
|
||||
page, vous pouvez le faire comme dans l’exemple suivant :</p>
|
||||
<pre tabindex="0"><code><nav class="recent">
|
||||
<h1>Recent Posts</h1>
|
||||
<ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
|
||||
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
|
||||
{{end}}</ul>
|
||||
</nav>
|
||||
</code></pre>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-folder meta-icon"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>
|
||||
|
||||
<span class="tag"><a href="http://localhost:1313/fr/categories/go/">Go</a></span>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text">
|
||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
|
||||
<polyline points="14 2 14 8 20 8"></polyline>
|
||||
<line x1="16" y1="13" x2="8" y2="13"></line>
|
||||
<line x1="16" y1="17" x2="8" y2="17"></line>
|
||||
<polyline points="10 9 9 9 8 9"></polyline>
|
||||
</svg>
|
||||
1508 Mots
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar">
|
||||
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
|
||||
<line x1="16" y1="2" x2="16" y2="6"></line>
|
||||
<line x1="8" y1="2" x2="8" y2="6"></line>
|
||||
<line x1="3" y1="10" x2="21" y2="10"></line>
|
||||
</svg>
|
||||
|
||||
2014-04-02 02:00
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="sharing-buttons">
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://facebook.com/sharer/sharer.php?u=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f" target="_blank" rel="noopener" aria-label="" title="Share on facebook">
|
||||
<div class="resp-sharing-button resp-sharing-button--facebook resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://twitter.com/intent/tweet/?url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f" target="_blank" rel="noopener" aria-label="" title="Share on twitter">
|
||||
<div class="resp-sharing-button resp-sharing-button--twitter resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://www.tumblr.com/widgets/share/tool?posttype=link&title=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go&caption=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go&canonicalUrl=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f" target="_blank" rel="noopener" aria-label="" title="Share on tumblr">
|
||||
<div class="resp-sharing-button resp-sharing-button--tumblr resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.563 24c-5.093 0-7.031-3.756-7.031-6.411V9.747H5.116V6.648c3.63-1.313 4.512-4.596 4.71-6.469C9.84.051 9.941 0 9.999 0h3.517v6.114h4.801v3.633h-4.82v7.47c.016 1.001.375 2.371 2.207 2.371h.09c.631-.02 1.486-.205 1.936-.419l1.156 3.425c-.436.636-2.4 1.374-4.156 1.404h-.178l.011.002z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="mailto:?subject=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go&body=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f" target="_self" rel="noopener" aria-label="" title="Share via email">
|
||||
<div class="resp-sharing-button resp-sharing-button--email resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://pinterest.com/pin/create/button/?url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f&media=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f;description=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go" target="_blank" rel="noopener" aria-label="" title="Share on pinterest">
|
||||
<div class="resp-sharing-button resp-sharing-button--pinterest resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://www.linkedin.com/shareArticle?mini=true&url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f&title=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go&summary=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go&source=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f" target="_blank" rel="noopener" aria-label="" title="Share on linkedin">
|
||||
<div class="resp-sharing-button resp-sharing-button--linkedin resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://reddit.com/submit/?url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f&resubmit=true&title=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go" target="_blank" rel="noopener" aria-label="" title="Share on reddit">
|
||||
<div class="resp-sharing-button resp-sharing-button--reddit resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://www.xing.com/app/user?op=share;url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f;title=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go" target="_blank" rel="noopener" aria-label="" title="Share on xing">
|
||||
<div class="resp-sharing-button resp-sharing-button--xing resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M18.188 0c-.517 0-.741.325-.927.66 0 0-7.455 13.224-7.702 13.657.015.024 4.919 9.023 4.919 9.023.17.308.436.66.967.66h3.454c.211 0 .375-.078.463-.22.089-.151.089-.346-.009-.536l-4.879-8.916c-.004-.006-.004-.016 0-.022L22.139.756c.095-.191.097-.387.006-.535C22.056.078 21.894 0 21.686 0h-3.498zM3.648 4.74c-.211 0-.385.074-.473.216-.09.149-.078.339.02.531l2.34 4.05c.004.01.004.016 0 .021L1.86 16.051c-.099.188-.093.381 0 .529.085.142.239.234.45.234h3.461c.518 0 .766-.348.945-.667l3.734-6.609-2.378-4.155c-.172-.315-.434-.659-.962-.659H3.648v.016z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="whatsapp://send?text=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go%20http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f" target="_blank" rel="noopener" aria-label="" title="Share on whatsapp">
|
||||
<div class="resp-sharing-button resp-sharing-button--whatsapp resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://news.ycombinator.com/submitlink?u=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f&t=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go" target="_blank" rel="noopener" aria-label="" title="Share on hacker news">
|
||||
<div class="resp-sharing-button resp-sharing-button--hackernews resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M0 24V0h24v24H0zM6.951 5.896l4.112 7.708v5.064h1.583v-4.972l4.148-7.799h-1.749l-2.457 4.875c-.372.745-.688 1.434-.688 1.434s-.297-.708-.651-1.434L8.831 5.896h-1.88z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="resp-sharing-button__link" href="https://telegram.me/share/url?text=Introduction%20aux%20mod%c3%a8les%20%28Hu%29go&url=http%3a%2f%2flocalhost%3a1313%2ffr%2fposts%2f2014%2f04%2fintroduction-aux-mod%25C3%25A8les-hugo%2f" target="_blank" rel="noopener" aria-label="" title="Share on telegram">
|
||||
<div class="resp-sharing-button resp-sharing-button--telegram resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pagination">
|
||||
|
||||
|
||||
<div class="pagination__buttons">
|
||||
|
||||
<span class="button previous">
|
||||
<a href="http://localhost:1313/fr/posts/2014/04/d%C3%A9buter-avec-hugo/">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">Débuter avec Hugo</span>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
<span class="button next">
|
||||
<a href="http://localhost:1313/fr/posts/2014/03/migrer-vers-hugo-depuis-jekyll/">
|
||||
<span class="button__text">Migrer vers Hugo depuis Jekyll</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer class="footer">
|
||||
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>© 2026</span>
|
||||
<span><a href="http://localhost:1313/">Thomas Sindt</a></span>
|
||||
<span><a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a></span>
|
||||
<span><a href="http://localhost:1313/fr/posts/index.xml" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>Powered by <a href="http://gohugo.io">Hugo</a> and the Hello Friend NG Theme</span><span>Made with ❤ by <a href="https://thomassindt.de">Thomas Sindt</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="http://localhost:1313/bundle.min.08b680078a3cf9c69e3dd217a5aa52cfddd4a1d850f8cdff127fdd7421a71f8b2b474be69386f67819edace92273916e7230c9054f38107db9dc6730b3530ab5.js" integrity="sha512-CLaAB4o8+caePdIXpapSz93UodhQ+M3/En/ddCGnH4srR0vmk4b2eBntrOkic5FucjDJBU84EH253Gcws1MKtQ=="></script>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1070
nss/public/fr/posts/2014/09/création-dun-nouveau-thème/index.html
Normal file
1070
nss/public/fr/posts/2014/09/création-dun-nouveau-thème/index.html
Normal file
File diff suppressed because it is too large
Load Diff
244
nss/public/fr/posts/index.html
Normal file
244
nss/public/fr/posts/index.html
Normal file
@@ -0,0 +1,244 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="author" content="Thomas Sindt ">
|
||||
<meta name="description" content="" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="robots" content="noodp" />
|
||||
<meta name="theme-color" content="" />
|
||||
<link rel="canonical" href="http://localhost:1313/fr/posts/" />
|
||||
|
||||
|
||||
<title>
|
||||
|
||||
Posts :: Northside Studio Achim — Hello Friend NG Theme
|
||||
|
||||
</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="http://localhost:1313/main.min.7289daf2e88ea2c7b253a51cc5794c7cc17e7aeb7295a19d978db764a5862f25.css" integrity="sha256-cona8uiOoseyU6UcxXlMfMF+eutylaGdl423ZKWGLyU=" crossorigin="anonymous">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="http://localhost:1313/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="http://localhost:1313/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="http://localhost:1313/favicon-16x16.png">
|
||||
<link rel="manifest" href="http://localhost:1313/site.webmanifest">
|
||||
<link rel="mask-icon" href="http://localhost:1313/safari-pinned-tab.svg" color="">
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="">
|
||||
|
||||
|
||||
|
||||
<meta itemprop="name" content="Posts">
|
||||
<meta itemprop="description" content="Home of the AI free comment">
|
||||
<meta itemprop="datePublished" content="2014-09-28T00:00:00+00:00">
|
||||
<meta itemprop="dateModified" content="2014-09-28T00:00:00+00:00">
|
||||
<meta itemprop="image" content="http://localhost:1313/">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="http://localhost:1313/">
|
||||
<meta name="twitter:title" content="Posts">
|
||||
<meta name="twitter:description" content="Home of the AI free comment">
|
||||
|
||||
|
||||
|
||||
<meta property="og:url" content="http://localhost:1313/fr/posts/">
|
||||
<meta property="og:site_name" content="Northside Studio Achim">
|
||||
<meta property="og:title" content="Posts">
|
||||
<meta property="og:description" content="Home of the AI free comment">
|
||||
<meta property="og:locale" content="fr">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:image" content="http://localhost:1313/">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/fr/posts/index.xml" title="Northside Studio Achim" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<header class="header">
|
||||
<span class="header__inner">
|
||||
<a href="http://localhost:1313/" style="text-decoration: none;">
|
||||
<div class="logo">
|
||||
|
||||
<span class="logo__mark">></span>
|
||||
<span class="logo__text ">
|
||||
$ cd /home/</span>
|
||||
<span class="logo__cursor" style=
|
||||
"
|
||||
|
||||
">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
<span class="header__right">
|
||||
<nav class="menu">
|
||||
<ul class="menu__inner">
|
||||
<div class="submenu">
|
||||
<li class="dropdown">
|
||||
<a href="javascript:void(0)" class="dropbtn">About</a>
|
||||
<div class="dropdown-content">
|
||||
|
||||
<a href="about/me/">About Me</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
<li><a href="http://localhost:1313/fr/posts/">Posts</a></li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
<span class="menu-trigger">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<main class="posts">
|
||||
<h1>Posts</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="posts-group">
|
||||
<div class="post-year">2014</div>
|
||||
|
||||
<ul class="posts-list">
|
||||
|
||||
<li class="post-item">
|
||||
<a href="http://localhost:1313/fr/posts/2014/09/cr%C3%A9ation-dun-nouveau-th%C3%A8me/" class="post-item-inner">
|
||||
<span class="post-title">Création d'un nouveau thème</span>
|
||||
<span class="post-day">
|
||||
|
||||
sept. 28
|
||||
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="post-item">
|
||||
<a href="http://localhost:1313/fr/posts/2014/04/introduction-aux-mod%C3%A8les-hugo/" class="post-item-inner">
|
||||
<span class="post-title">Introduction aux modèles (Hu)go</span>
|
||||
<span class="post-day">
|
||||
|
||||
avr. 2
|
||||
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="post-item">
|
||||
<a href="http://localhost:1313/fr/posts/2014/04/d%C3%A9buter-avec-hugo/" class="post-item-inner">
|
||||
<span class="post-title">Débuter avec Hugo</span>
|
||||
<span class="post-day">
|
||||
|
||||
avr. 2
|
||||
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="post-item">
|
||||
<a href="http://localhost:1313/fr/posts/2014/03/migrer-vers-hugo-depuis-jekyll/" class="post-item-inner">
|
||||
<span class="post-title">Migrer vers Hugo depuis Jekyll</span>
|
||||
<span class="post-day">
|
||||
|
||||
mars 10
|
||||
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="pagination">
|
||||
<div class="pagination__buttons">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer class="footer">
|
||||
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>© 2026</span>
|
||||
<span><a href="http://localhost:1313/">Thomas Sindt</a></span>
|
||||
<span><a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a></span>
|
||||
<span><a href="http://localhost:1313/fr/posts/index.xml" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>Powered by <a href="http://gohugo.io">Hugo</a> and the Hello Friend NG Theme</span><span>Made with ❤ by <a href="https://thomassindt.de">Thomas Sindt</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="http://localhost:1313/bundle.min.08b680078a3cf9c69e3dd217a5aa52cfddd4a1d850f8cdff127fdd7421a71f8b2b474be69386f67819edace92273916e7230c9054f38107db9dc6730b3530ab5.js" integrity="sha512-CLaAB4o8+caePdIXpapSz93UodhQ+M3/En/ddCGnH4srR0vmk4b2eBntrOkic5FucjDJBU84EH253Gcws1MKtQ=="></script>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1409
nss/public/fr/posts/index.xml
Normal file
1409
nss/public/fr/posts/index.xml
Normal file
File diff suppressed because it is too large
Load Diff
9
nss/public/fr/posts/page/1/index.html
Normal file
9
nss/public/fr/posts/page/1/index.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>http://localhost:1313/fr/posts/</title>
|
||||
<link rel="canonical" href="http://localhost:1313/fr/posts/">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0; url=http://localhost:1313/fr/posts/">
|
||||
</head>
|
||||
</html>
|
||||
Reference in New Issue
Block a user