<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Markdown on kenji.blog</title><link>http://kenji.blog/de/tags/markdown/</link><description>Recent content in Markdown on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>de</language><copyright>kenjinote</copyright><lastBuildDate>Sun, 13 Sep 2026 02:00:00 +0900</lastBuildDate><atom:link href="http://kenji.blog/de/tags/markdown/index.xml" rel="self" type="application/rss+xml"/><item><title>Einführung in den Static Site Generator mit Hugo (Migrationsanleitung von WordPress)</title><link>http://kenji.blog/de/p/hugo-static-site-generator-wordpress-migration/</link><pubDate>Sun, 13 Sep 2026 02:00:00 +0900</pubDate><guid>http://kenji.blog/de/p/hugo-static-site-generator-wordpress-migration/</guid><description>&lt;img src="http://kenji.blog/p/hugo-static-site-generator-wordpress-migration/img/eyecatch.jpg" alt="Featured image of post Einführung in den Static Site Generator mit Hugo (Migrationsanleitung von WordPress)" />&lt;p>In der modernen Webentwicklung und beim Betrieb von Blogs sind Ladegeschwindigkeit, Sicherheit und Wartbarkeit von entscheidender Bedeutung. &amp;ldquo;WordPress&amp;rdquo;, das lange Zeit einen überwältigenden Marktanteil als Basis für Blogs und Unternehmenswebsites hatte, wird von vielen Nutzern wegen seines flexiblen Plugin-Ökosystems und seiner intuitiven Verwaltungsoberfläche geschätzt. Da es jedoch die Kommunikation mit einer Datenbank und die dynamische Seitengenerierung auf der Serverseite (Verarbeitung durch PHP) erfordert, weist es Schwachstellen wie Anfälligkeit bei plötzlichen Traffic-Spitzen und Anzeigeverzögerungen (Latenz) auf.&lt;/p>
&lt;p>Aus diesem Grund erfreuen sich &amp;ldquo;Static Site Generators (SSG)&amp;rdquo; in den letzten Jahren rasant wachsender Beliebtheit. In diesem Artikel werden wir uns eingehend mit &amp;ldquo;&lt;strong>Hugo&lt;/strong>&amp;rdquo; befassen, einem der vielen SSGs, der auf der Programmiersprache Go basiert und für seine unglaubliche Build-Geschwindigkeit bekannt ist. Wir werden alles im Detail erklären, angefangen bei einem Vergleich der technischen Architektur mit dynamischen CMS (Content Management Systemen) wie WordPress, über konkrete Migrationsschritte und Leistungsbewertungen mithilfe mathematischer Modelle, bis hin zu Hugos spezifischer Verzeichnisstruktur und der Suchreihenfolge von Vorlagen (Template Lookup Order).&lt;/p>
&lt;hr>
&lt;h2 id="1-technische-unterschiede-zwischen-dynamischem-cms-wordpress-und-static-site-generator-hugo">1. Technische Unterschiede zwischen dynamischem CMS (WordPress) und Static Site Generator (Hugo)
&lt;/h2>&lt;p>Wenn es um die Bereitstellung einer Website geht, verfolgen WordPress und Hugo grundlegend unterschiedliche Ansätze.&lt;/p>
&lt;h3 id="11-die-architektur-von-wordpress-dynamische-generierung">1.1 Die Architektur von WordPress (Dynamische Generierung)
&lt;/h3>&lt;p>WordPress ist ein typisches dynamisches CMS, das Seiten bei jeder Anfrage (Request) serverseitig zusammenstellt. Wenn ein Benutzer (Browser) auf eine Seite zugreift, führt der Webserver (z. B. Apache, Nginx) ein PHP-Skript aus und sendet eine Anfrage (Query) an eine relationale Datenbank wie MySQL (oder MariaDB). Der aus der Datenbank abgerufene Inhalt (Artikeldaten, Kategorien, Tags, Website-Einstellungen usw.) wird mit Vorlagendateien (Templates) kombiniert, um den endgültigen HTML-Code zu generieren und an den Client zurückzugeben.&lt;/p>
&lt;p>Dieser Mechanismus hat den Vorteil, dass für jeden Besucher individuelle Inhalte in Echtzeit generiert werden können (z. B. Warenkörbe auf E-Commerce-Websites, exklusive Seiten für eingeloggte Benutzer). Ohne eine angemessen gestaltete Caching-Infrastruktur (wie Reverse-Proxys oder Plugins) verbraucht er jedoch massiv Serverressourcen.&lt;/p>
&lt;h3 id="12-die-architektur-von-hugo-vorab-generierung-zur-build-zeit">1.2 Die Architektur von Hugo (Vorab-Generierung zur Build-Zeit)
&lt;/h3>&lt;p>Andererseits generiert Hugo, wie der Name &amp;ldquo;Static Site Generator&amp;rdquo; schon sagt, Inhalte nicht zur &amp;ldquo;Anfragezeit&amp;rdquo;, sondern zur &amp;ldquo;Build-Zeit&amp;rdquo;. Die Inhalte werden nicht in einer Datenbank, sondern als lokale &amp;ldquo;Markdown-Dateien&amp;rdquo; verwaltet, die mit Versionskontrollsystemen wie Git versioniert werden.
Wenn der Entwickler den Befehl (&lt;code>hugo&lt;/code>) ausführt, liest Hugo die Markdown-Dateien ein, fügt die Daten in die angegebenen HTML-Vorlagen (Layout-Dateien) ein und generiert eine Sammlung vollständiger, reiner HTML/CSS/JS-Dateien.&lt;/p>
&lt;p>Die generierten Dateien (statische Assets) können einfach durch Platzieren in einer &amp;ldquo;statischen Hosting-Umgebung&amp;rdquo; wie Amazon S3, Cloudflare Pages, Netlify, Vercel oder einem einfachen Nginx-Server bereitgestellt werden. Da weder eine Datenbank noch eine serverseitige Sprache (wie PHP) erforderlich sind, werden Sicherheitsrisiken (wie SQL-Injection oder PHP-Schwachstellen) drastisch reduziert, und die Auslieferungsgeschwindigkeit wird extrem maximiert, da die Daten auf Edge-Nodes eines CDN (Content Delivery Network) zwischengespeichert (gecacht) werden.&lt;/p>
&lt;p>Nachfolgend veranschaulicht ein Mermaid-Diagramm die Unterschiede zwischen den beiden Architekturen.&lt;/p>
&lt;pre class="mermaid">
flowchart TD
subgraph WordPress[&amp;#34;Dynamisches CMS (WordPress)&amp;#34;]
direction TB
Req1[&amp;#34;Benutzeranfrage&amp;#34;] --&amp;gt; WebServer1[&amp;#34;Webserver (Nginx/Apache)&amp;#34;]
WebServer1 --&amp;gt; PHP[&amp;#34;PHP-Verarbeitung&amp;#34;]
PHP &amp;lt;--&amp;gt; DB[&amp;#34;Datenbank (MySQL)&amp;#34;]
PHP --&amp;gt; HTML1[&amp;#34;HTML-Generierung&amp;#34;]
HTML1 --&amp;gt; Res1[&amp;#34;Antwortrückgabe&amp;#34;]
end
subgraph Hugo[&amp;#34;Static Site Generator (Hugo)&amp;#34;]
direction TB
Dev[&amp;#34;Entwickler / CI・CD&amp;#34;] --&amp;gt; HugoBuild[&amp;#34;Hugo-Build-Prozess&amp;#34;]
Markdown[&amp;#34;Markdown-Dateien&amp;#34;] --&amp;gt; HugoBuild
Templates[&amp;#34;Vorlagen (HTML)&amp;#34;] --&amp;gt; HugoBuild
HugoBuild --&amp;gt; StaticFiles[&amp;#34;Statische Dateien (HTML/CSS/JS)&amp;#34;]
StaticFiles --&amp;gt; CDN[&amp;#34;CDN / Statisches Hosting&amp;#34;]
Req2[&amp;#34;Benutzeranfrage&amp;#34;] --&amp;gt; CDN
CDN --&amp;gt; Res2[&amp;#34;Sofortige Antwortrückgabe&amp;#34;]
end
&lt;/pre>
&lt;hr>
&lt;h2 id="2-leistungsbewertung-anhand-eines-mathematischen-modells">2. Leistungsbewertung anhand eines mathematischen Modells
&lt;/h2>&lt;p>Einer der größten Vorteile der Migration von WordPress zu Hugo ist die Verbesserung der Leistung (Ladegeschwindigkeit). Um dies quantitativ zu verstehen, wollen wir es mit einem einfachen mathematischen Modell ausdrücken.&lt;/p>
&lt;p>Die Zeit bis zum Abschluss des Ladens einer Seite (Load Time: $T_{load}$) lässt sich grob in die Antwortzeit des Servers (TTFB: Time To First Byte) und die Zeit für Rendering und Ressourcenbeschaffung durch den Browser ($T_{render}$) unterteilen.&lt;/p>
$$ T_{load} = T_{ttfb} + T_{render} $$&lt;p>Bei einem dynamischen CMS (WordPress) ist $T_{ttfb}$ die Summe der folgenden Faktoren: Netzwerkverzögerung ($T_{network}$), Skriptausführungszeit auf der Serverseite ($T_{php}$) und Abfrageverarbeitungszeit der Datenbank ($T_{db}$).&lt;/p>
$$ T_{ttfb\_wp} = T_{network} + T_{php} + T_{db} $$&lt;p>Bei hoher Zugriffsrate (hoher Last) steigen $T_{php}$ und $T_{db}$ nichtlinear an, und das gesamte System kann zum Engpass werden. Mathematisch ausgedrückt zeigt sich bei einer Anzahl von Anfragen ($N$) die folgende Verschlechterung der Antwortzeit ($k$ ist der Overhead-Koeffizient der Verarbeitung).&lt;/p>
$$ T_{php}(N) \approx O(N^k), \quad T_{db}(N) \approx O(N^k) \quad \text{where } k > 1 $$&lt;p>Andererseits gibt es bei einer Architektur, die einen Static Site Generator (Hugo) mit einem CDN kombiniert, keine serverseitige dynamische Verarbeitung (PHP oder DB-Abfragen). Da die Inhalte auf weltweit verteilten Edge-Servern zwischengespeichert werden, hängt $T_{ttfb}$ rein von der Netzwerkverzögerung zum nächstgelegenen Edge-Server des Clients ab ($T_{edge}$).&lt;/p>
$$ T_{ttfb\_hugo} = T_{edge} $$&lt;p>Dadurch gilt $T_{edge} \ll (T_{network} + T_{php} + T_{db})$, und die TTFB wird drastisch auf wenige bis einige Dutzend Millisekunden verkürzt. Darüber hinaus bleibt die Antwortzeit aufgrund der Lastausgleichsfunktion der Edge-Server nahezu konstant ($O(1)$), selbst wenn die Anzahl der Anfragen $N$ steigt.&lt;/p>
$$ \lim_{N \to \infty} T_{ttfb\_hugo}(N) \approx \text{Konstant} $$&lt;p>Dies ist die mathematische Grundlage dafür, warum Hugo (eine statische Website) extrem robust gegenüber Traffic-Spitzen (z. B. wenn ein Beitrag viral geht) ist.&lt;/p>
&lt;hr>
&lt;h2 id="3-grundstruktur-und-funktionsprinzip-von-hugo">3. Grundstruktur und Funktionsprinzip von Hugo
&lt;/h2>&lt;p>Um Hugo zu beherrschen, ist es unerlässlich, seine einzigartige Verzeichnisstruktur und die Konzepte von &amp;ldquo;Front Matter&amp;rdquo; und &amp;ldquo;Template Lookup Order&amp;rdquo; zu verstehen.&lt;/p>
&lt;h3 id="31-detaillierte-erklärung-der-verzeichnisstruktur">3.1 Detaillierte Erklärung der Verzeichnisstruktur
&lt;/h3>&lt;p>Wenn Sie ein neues Hugo-Projekt erstellen (&lt;code>hugo new site mysite&lt;/code>), wird die folgende Verzeichnisstruktur generiert:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">mysite/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── archetypes/ # Vorlagen beim Erstellen neuer Inhalte (Front Matter-Vorlagen)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── assets/ # Dateien, die von Hugo Pipes verarbeitet werden (SCSS/Sass, JavaScript usw.)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── content/ # Der tatsächliche Website-Inhalt (Markdown-Dateien). Dies ersetzt die DB.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── data/ # Externe Daten und Einstellungen, die site-weit verwendet werden (JSON, TOML, YAML, CSV usw.)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── layouts/ # HTML-Vorlagen, die das Aussehen der Site bestimmen (verwendet Go html/template)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── public/ # Der Ort, an dem die generierten statischen Dateien nach der Build-Ausführung ausgegeben werden
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── static/ # Statische Dateien, die unverändert veröffentlicht werden (Bilder, Favicons, robots.txt usw.)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── themes/ # Verzeichnis für Themes von Drittanbietern oder selbst erstellte Themes
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">└── hugo.toml # Die site-weite Konfigurationsdatei (früher war config.toml üblich)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>In WordPress werden Inhalte in der &lt;code>wp_posts&lt;/code>-Tabelle von MySQL gespeichert, aber in Hugo werden alle als Textdateien (hauptsächlich Markdown) im &lt;code>content/&lt;/code>-Verzeichnis verwaltet. Dies macht die Versionskontrolle von Inhalten (Git) einfach.&lt;/p>
&lt;h3 id="32-inhaltsverwaltung-markdown-und-front-matter">3.2 Inhaltsverwaltung: Markdown und Front Matter
&lt;/h3>&lt;p>Jede Artikeldatei in Hugo besteht aus einem Metadatenblock namens &amp;ldquo;Front Matter&amp;rdquo; ganz oben, gefolgt vom Haupttext (Markdown) darunter. Front Matter kann in TOML, YAML oder JSON geschrieben werden, aber YAML ist am weitesten verbreitet.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nn">---&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">title&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;Die Taxonomie von Hugo verstehen&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">date&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="ld">2026-09-13T10:00:00&lt;/span>&lt;span class="m">+09&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="m">00&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">draft&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kc">false&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">categories&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="s2">&amp;#34;Technische Erklärung&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">tags&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="s2">&amp;#34;Hugo&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="s2">&amp;#34;Go&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">aliases&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="s2">&amp;#34;/old-category/hugo-taxonomy/&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nn">---&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">Hier beginnt der Haupttext. Er ist in **Markdown** geschrieben.&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">Wir werden die leistungsstarken Funktionen von Hugo erklären...&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Bemerkenswert ist hier der &lt;code>aliases&lt;/code>-Schlüssel. Bei der Migration von WordPress ist es für SEO-Zwecke ein großer Nachteil, wenn sich Permalinks (URLs) ändern. Durch die Verwendung der Alias-Funktion von Hugo generiert Hugo automatisch HTML für Weiterleitungen (Transfer durch Meta-Refresh), indem Sie einfach die alte URL angeben. Dies ist äußerst praktisch, da serverseitige Weiterleitungseinstellungen (wie .htaccess) nicht mehr erforderlich sind.&lt;/p>
&lt;h3 id="33-vorlagen-suchreihenfolge-template-lookup-order">3.3 Vorlagen-Suchreihenfolge (Template Lookup Order)
&lt;/h3>&lt;p>Eine der leistungsstärksten Funktionen von Hugo ist sein flexibler Vorlagen-Suchmechanismus (Template Lookup Order). Beim Rendern einer bestimmten Seite durchsucht Hugo Verzeichnisse und Dateinamen in einer bestimmten Reihenfolge, um die optimale Vorlage zu finden.&lt;/p>
&lt;p>Wenn beispielsweise ein einzelner Artikel (Single Page) namens &lt;code>content/post/hello-world.md&lt;/code> gerendert wird, sucht Hugo im Allgemeinen in der folgenden Reihenfolge nach Layoutdateien:&lt;/p>
&lt;ol>
&lt;li>&lt;code>layouts/post/single.html&lt;/code>&lt;/li>
&lt;li>&lt;code>layouts/post/list.html&lt;/code> (Nicht falsch, aber normalerweise für Listen)&lt;/li>
&lt;li>&lt;code>layouts/_default/single.html&lt;/code>&lt;/li>
&lt;li>&lt;code>themes/&amp;lt;THEME_NAME&amp;gt;/layouts/post/single.html&lt;/code>&lt;/li>
&lt;li>&lt;code>themes/&amp;lt;THEME_NAME&amp;gt;/layouts/_default/single.html&lt;/code>&lt;/li>
&lt;/ol>
&lt;p>Entwickler können die Vorlagen eines Themes &lt;strong>überschreiben (overriden)&lt;/strong>, indem sie einfach eine gleichnamige Datei im &lt;code>layouts/&lt;/code>-Verzeichnis ihres eigenen Projekts erstellen, ohne den Quellcode des Themes direkt zu ändern. Auf diese Weise können Sie eigene Anpassungen vornehmen, ohne zukünftige Updates des zugrunde liegenden Themes zu behindern.&lt;/p>
&lt;h3 id="34-taxonomie-taxonomy">3.4 Taxonomie (Taxonomy)
&lt;/h3>&lt;p>Das Klassifizierungssystem, das in WordPress den &amp;ldquo;Kategorien&amp;rdquo; und &amp;ldquo;Tags&amp;rdquo; entspricht, wird in Hugo als &amp;ldquo;Taxonomie (Taxonomy)&amp;rdquo; bezeichnet.
Hugo unterstützt standardmäßig die Taxonomien &lt;code>categories&lt;/code> und &lt;code>tags&lt;/code>, aber durch Bearbeiten der &lt;code>hugo.toml&lt;/code> können Sie nach Belieben benutzerdefinierte Taxonomien (z. B. &lt;code>series&lt;/code>, &lt;code>authors&lt;/code> usw.) hinzufügen.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-toml" data-lang="toml">&lt;span class="line">&lt;span class="cl">&lt;span class="c"># Beispiel für hugo.toml&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">[&lt;/span>&lt;span class="nx">taxonomies&lt;/span>&lt;span class="p">]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">category&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="s2">&amp;#34;categories&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">tag&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="s2">&amp;#34;tags&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">series&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="s2">&amp;#34;series&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">author&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="s2">&amp;#34;authors&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Dies ermöglicht es, Inhalte auf vielfältige Weise zu organisieren und aufzulisten.&lt;/p>
&lt;hr>
&lt;h2 id="4-migrationsprozess-von-wordpress-zu-hugo-migration">4. Migrationsprozess von WordPress zu Hugo (Migration)
&lt;/h2>&lt;p>Der Schlüssel zu einer erfolgreichen Migration von WordPress zu Hugo liegt darin, wie man die dynamischen Inhalte in der Datenbank sauber in statische Dateien (Markdown + Front Matter) konvertiert und dabei die vorhandene URL-Struktur beibehält.&lt;/p>
&lt;p>Im Folgenden ist der Ablauf einer typischen Migrations-Pipeline dargestellt.&lt;/p>
&lt;pre class="mermaid">
flowchart LR
WPDB[&amp;#34;WP-Datenbank&amp;#34;] --&amp;gt;|Plugin| Exporter[&amp;#34;Export-Tool&amp;#34;]
Exporter --&amp;gt;|&amp;#34;Extrahiert Text, \nMetadaten, Bilder&amp;#34;| ZipFile[&amp;#34;Zip / Ordner&amp;#34;]
ZipFile --&amp;gt;|Entpacken| MarkdownFiles[&amp;#34;Markdown-Dateien \n(content/)&amp;#34;]
ZipFile --&amp;gt;|Entpacken| ImageFiles[&amp;#34;Bilder \n(static/wp-content/)&amp;#34;]
MarkdownFiles --&amp;gt; Formatting[&amp;#34;Überprüfen &amp;amp; Formatieren \n(Shortcodes reparieren)&amp;#34;]
Formatting --&amp;gt; Git[&amp;#34;An Git übergeben&amp;#34;]
&lt;/pre>
&lt;h3 id="41-datenextraktion-und-markdown-konvertierung">4.1 Datenextraktion und Markdown-Konvertierung
&lt;/h3>&lt;p>Um WordPress-Daten für Hugo auszugeben, ist die Verwendung eines dedizierten Plugins der einfachste und zuverlässigste Weg. Hier sind einige typische Ansätze.&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Verwendung des Jekyll Exporter-Plugins&lt;/strong>
Da Hugo eine sehr ähnliche Datenstruktur wie Jekyll, ein anderer SSG, aufweist, ist die Verwendung des &amp;ldquo;Jekyll Exporter&amp;rdquo;-Plugins für WordPress eine gängige Methode. Wenn Sie dieses Plugin installieren und ausführen, werden alle Beiträge und statischen Seiten in Markdown-Dateien mit Front Matter konvertiert und können zusammen mit den Bilddateien als ZIP-Datei heruntergeladen werden.&lt;/li>
&lt;li>&lt;strong>Eigenes Skript mit der WordPress API&lt;/strong>
Dies ist eine Methode, bei der Sie mit Python, Node.js usw. auf die WordPress REST API (&lt;code>/wp-json/wp/v2/posts&lt;/code>) zugreifen, die JSON-Daten parsen und Ihr eigenes Skript erstellen, um die Markdown-Dateien selbst zu generieren. Dies ist effektiv für Websites, die intensiv komplexe benutzerdefinierte Felder (wie ACF) verwenden, die nicht vollständig von Plugins verarbeitet werden können.&lt;/li>
&lt;li>&lt;strong>Nutzung des wp2hugo-Tools&lt;/strong>
Es gibt auch einen Ansatz, ein in Go geschriebenes CLI-Tool zu verwenden, um direkt von einer WordPress-Export-XML-Datei (WXR) in das Hugo-Format zu konvertieren.&lt;/li>
&lt;/ol>
&lt;h3 id="42-beibehaltung-der-permalink-url-struktur">4.2 Beibehaltung der Permalink-(URL)-Struktur
&lt;/h3>&lt;p>Um die SEO-Bewertung aufrechtzuerhalten, ist es extrem wichtig, die URL aus der WordPress-Ära unverändert zu übernehmen. Wenn Ihre Permalink-Einstellung in WordPress &lt;code>https://example.com/2026/09/13/my-post/&lt;/code> war, geben Sie diese Permalink-Struktur in der &lt;code>hugo.toml&lt;/code> von Hugo an.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-toml" data-lang="toml">&lt;span class="line">&lt;span class="cl">&lt;span class="p">[&lt;/span>&lt;span class="nx">permalinks&lt;/span>&lt;span class="p">]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">post&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="s2">&amp;#34;/:year/:month/:day/:slug/&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Alternativ ist es auch möglich, die URL zwangsweise zu fixieren, indem Sie den &lt;code>url&lt;/code>-Parameter direkt im Front Matter jedes Artikels angeben.
Zusätzlich richten Sie für Seiten, deren URL sich ändert, Weiterleitungen mithilfe der zuvor erwähnten &lt;code>aliases&lt;/code> ein.&lt;/p>
&lt;h3 id="43-konvertierung-von-shortcodes">4.3 Konvertierung von Shortcodes
&lt;/h3>&lt;p>WordPress-spezifische Shortcodes (z. B. &lt;code>[gallery]&lt;/code>, &lt;code>[caption]&lt;/code>, benutzerdefinierte Codes verschiedener Plugins) bleiben beim Export oft als bloße Zeichenfolgen erhalten, daher muss dies behoben werden.
Diese werden entweder in großen Mengen mithilfe von Ersetzungsskripten (sed oder Python) gelöscht oder Sie verwenden Hugos leistungsstarke &lt;strong>Custom Shortcode-Funktion&lt;/strong> (erstellen Sie benutzerdefinierte Layouts in &lt;code>layouts/shortcodes/&lt;/code>), um sie so zu migrieren, dass sie auf der Hugo-Seite korrekt gerendert werden.&lt;/p>
&lt;hr>
&lt;h2 id="5-hugos-cli-tool-und-builddeploy">5. Hugos CLI-Tool und Build/Deploy
&lt;/h2>&lt;p>Sobald die Migrationsarbeit abgeschlossen ist, ist es endlich Zeit, die Website mit Hugo zu erstellen und sie der Welt zu präsentieren. Hugo, bereitgestellt als Go-Binärdatei, rühmt sich einer unglaublichen Geschwindigkeit, mit der Builds selbst für Websites mit Tausenden oder Zehntausenden von Seiten in nur wenigen Sekunden abgeschlossen werden.&lt;/p>
&lt;h3 id="51-starten-des-lokalen-entwicklungsservers">5.1 Starten des lokalen Entwicklungsservers
&lt;/h3>&lt;p>Wenn Sie Artikel schreiben oder das Design anpassen, starten Sie den lokalen Server.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Befehl zum Starten des Entwicklungsservers (verwenden Sie -D, um Entwürfe einzuschließen)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hugo server -D
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Wenn Sie diesen Befehl ausführen, kann die Website unter &lt;code>http://localhost:1313/&lt;/code> in der Vorschau angezeigt werden. Hugo verfügt über eine integrierte, leistungsstarke &amp;ldquo;LiveReload&amp;rdquo;-Funktion. In dem Moment, in dem Sie eine Markdown-Datei, eine Vorlage oder CSS bearbeiten und speichern, wird der Browserbildschirm automatisch in hoher Geschwindigkeit aktualisiert. Dadurch wird das Schreib- und Entwicklungserlebnis weitaus komfortabler als die Verwaltungsoberfläche von WordPress.&lt;/p>
&lt;h3 id="52-produktions-build-und-leistungsoptimierung">5.2 Produktions-Build und Leistungsoptimierung
&lt;/h3>&lt;p>Um die statischen Dateien für die Bereitstellung in der Produktionsumgebung zu generieren, geben Sie einfach &lt;code>hugo&lt;/code> ein.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Produktions-Build ausführen. Die Option --minify minimiert HTML/CSS/JS&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hugo --minify
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Mit diesem Befehl werden alle Dateien der gesamten Website im &lt;code>public/&lt;/code>-Verzeichnis ausgegeben. Durch Hinzufügen der Option &lt;code>--minify&lt;/code> werden unnötige Zeilenumbrüche und Leerzeichen entfernt, was die Dateigröße weiter reduziert. Dies trägt direkt zur Reduzierung der Netzwerkverzögerung ($T_{network}$) im zuvor erwähnten mathematischen Modell bei.&lt;/p>
&lt;h3 id="53-bereitstellungsautomatisierung-cicd">5.3 Bereitstellungsautomatisierung (CI/CD)
&lt;/h3>&lt;p>Es ist ineffizient, jedes Mal statische Dateien auf einem lokalen PC zu generieren und per FTP oder Ähnlichem hochzuladen. Im modernen SSG-Betrieb ist es die beste Vorgehensweise (Best Practice), eine CI/CD-Umgebung aufzubauen, die automatisch Builds und Bereitstellungen (Deployments) durchführt, ausgelöst durch einen Push in ein Git-Repository (wie GitHub).&lt;/p>
&lt;p>Die Grundform einer Konfiguration (YAML-Datei) für die Bereitstellung auf Cloudflare Pages oder GitHub Pages mithilfe von GitHub Actions sieht beispielsweise wie folgt aus.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;span class="lnt">26
&lt;/span>&lt;span class="lnt">27
&lt;/span>&lt;span class="lnt">28
&lt;/span>&lt;span class="lnt">29
&lt;/span>&lt;span class="lnt">30
&lt;/span>&lt;span class="lnt">31
&lt;/span>&lt;span class="lnt">32
&lt;/span>&lt;span class="lnt">33
&lt;/span>&lt;span class="lnt">34
&lt;/span>&lt;span class="lnt">35
&lt;/span>&lt;span class="lnt">36
&lt;/span>&lt;span class="lnt">37
&lt;/span>&lt;span class="lnt">38
&lt;/span>&lt;span class="lnt">39
&lt;/span>&lt;span class="lnt">40
&lt;/span>&lt;span class="lnt">41
&lt;/span>&lt;span class="lnt">42
&lt;/span>&lt;span class="lnt">43
&lt;/span>&lt;span class="lnt">44
&lt;/span>&lt;span class="lnt">45
&lt;/span>&lt;span class="lnt">46
&lt;/span>&lt;span class="lnt">47
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="c"># Beispiel für .github/workflows/hugo.yml&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Deploy Hugo site to GitHub Pages&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">on&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">push&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">branches&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s2">&amp;#34;main&amp;#34;&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">workflow_dispatch&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">permissions&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">contents&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">read&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">pages&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">write&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">id-token&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">write&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">jobs&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">build&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">runs-on&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">ubuntu-latest&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">steps&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Checkout&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">uses&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">actions/checkout@v3&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">with&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">submodules&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">recursive&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="c"># Wenn Themes als Submodule verwaltet werden&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">fetch-depth&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Setup Hugo&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">uses&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">peaceiris/actions-hugo@v2&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">with&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">hugo-version&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s1">&amp;#39;latest&amp;#39;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">extended&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kc">true&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Build&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">run&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">hugo --minify&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Upload artifact&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">uses&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">actions/upload-pages-artifact@v2&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">with&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">path&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">./public&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">deploy&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">environment&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">github-pages&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">url&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">${{ steps.deployment.outputs.page_url }}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">runs-on&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">ubuntu-latest&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">needs&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">build&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">steps&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Deploy to GitHub Pages&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">id&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">deployment&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">uses&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">actions/deploy-pages@v2&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Durch diese Einrichtung wird eine automatisierte Pipeline erstellt, bei der allein die Aktion &amp;ldquo;Einen Artikel in Markdown schreiben und zu GitHub pushen&amp;rdquo; ausreicht, um die neueste Website in wenigen Minuten in der Produktionsumgebung zu veröffentlichen.&lt;/p>
&lt;hr>
&lt;h2 id="6-seo-und-betriebliche-vorteile-nach-der-migration">6. SEO und betriebliche Vorteile nach der Migration
&lt;/h2>&lt;p>Website-Betreiber, die die Migration von WordPress zu Hugo abgeschlossen haben, erleben in den meisten Fällen die folgenden drei signifikanten Vorteile.&lt;/p>
&lt;h3 id="61-drastische-verbesserung-der-website-geschwindigkeit-und-core-web-vitals">6.1 Drastische Verbesserung der Website-Geschwindigkeit und Core Web Vitals
&lt;/h3>&lt;p>Durch den Wegfall von Datenbankabfragen und serverseitigem Rendering wird die Ladezeit von Seiten auf Millisekunden reduziert. Dies führt direkt zu einer deutlichen Verbesserung der &amp;ldquo;Core Web Vitals&amp;rdquo;-Werte (LCP, FID/INP, CLS), die Google als Ranking-Faktoren verwendet. Ein Rückgang der Absprungrate der Nutzer und eine Verbesserung der SEO-Bewertung sind zu erwarten.&lt;/p>
&lt;h3 id="62-befreiung-von-sicherheitsbedrohungen">6.2 Befreiung von Sicherheitsbedrohungen
&lt;/h3>&lt;p>Da WordPress weltweit weit verbreitet ist, ist es ein ständiges Ziel von Angriffen. Es bestehen immer Risiken wie Verfälschungen durch das Ausnutzen von Plugin-Schwachstellen oder das Knacken von Logins durch Brute-Force-Angriffe.
Auf einer mit Hugo generierten statischen Website gibt es jedoch weder eine Datenbank noch eine PHP-Umgebung oder gar einen Verwaltungsbildschirm (Login-Formular). Hacker haben keine Möglichkeit, in den Server einzudringen und die Datenbank umzuschreiben, sodass das Sicherheitsrisiko extrem nahe an Null herankommt.&lt;/p>
&lt;h3 id="63-wartungsfreier-betrieb">6.3 Wartungsfreier Betrieb
&lt;/h3>&lt;p>Der Betrieb von WordPress erfordert ständige Wartungsarbeiten, einschließlich Updates des Core-Systems, Plugin-Aktualisierungen und das Nachverfolgen von PHP-Versionen. Sie müssen immer die Angst haben, dass die Website aufgrund von Kompatibilitätsproblemen zusammenbricht.
Bei Hugo müssen Updates des Tools selbst nur bei Bedarf durchgeführt werden, und da der Code der Website selbst aus einer Reihe unabhängiger Textdateien besteht, herrscht das überwältigende Gefühl der Sicherheit, dass &amp;ldquo;es nicht kaputt geht, selbst wenn man es in Ruhe lässt&amp;rdquo;.&lt;/p>
&lt;hr>
&lt;h2 id="7-zusammenfassung">7. Zusammenfassung
&lt;/h2>&lt;p>In diesem Artikel haben wir die Migration von einem dynamischen CMS wie WordPress zu &amp;ldquo;Hugo&amp;rdquo;, einem leistungsstarken, auf der Programmiersprache Go basierenden Static Site Generator, im Detail erläutert – von den Unterschieden in der technischen Architektur über den mathematischen Leistungsnachweis bis hin zu konkreten Migrationsschritten.&lt;/p>
&lt;p>Der Umstieg auf einen Static Site Generator erfordert zunächst eine gewisse Lernkurve (Git-Operationen, Markdown-Syntax, Ausführen von CLI-Befehlen über das Terminal, Verständnis der Spezifikationen der Template-Engine usw.), bringt aber im Gegenzug &amp;ldquo;überwältigende Anzeigegeschwindigkeit&amp;rdquo;, &amp;ldquo;robuste Sicherheit&amp;rdquo; und &amp;ldquo;wartungsfreien&amp;rdquo; Betrieb, was diese Mühe mehr als aufwiegt.&lt;/p>
&lt;p>Wenn Ihre Website keine häufigen Designänderungen oder komplexe dynamische Verarbeitung (wie Funktionen nur für Mitglieder oder erweiterte E-Commerce-Funktionen) erfordert und der Hauptzweck die Informationsverbreitung ist (Blogs, Medien, Unternehmenswebsites), dann ist die Migration zu Hugo eine der effektivsten technischen Investitionen. Wir hoffen, dass Sie diesen Artikel als Referenz nutzen, um den ersten Schritt in Richtung der nächsten Generation des Website-Managements mit Hugo zu machen.&lt;/p></description></item><item><title>Technik-Blogs in Markdown schreiben: Editor-Einstellungen, die die Schreibgeschwindigkeit verdoppeln</title><link>http://kenji.blog/de/p/markdown-editor-setup-for-tech-blogs/</link><pubDate>Sat, 12 Sep 2026 12:00:00 +0900</pubDate><guid>http://kenji.blog/de/p/markdown-editor-setup-for-tech-blogs/</guid><description>&lt;img src="http://kenji.blog/p/markdown-editor-setup-for-tech-blogs/img/eyecatch.jpg" alt="Featured image of post Technik-Blogs in Markdown schreiben: Editor-Einstellungen, die die Schreibgeschwindigkeit verdoppeln" />&lt;p>Um kontinuierlich einen Technik-Blog zu schreiben, ist die Optimierung der Schreibumgebung unerlässlich. In diesem Artikel gehen wir tief auf fortgeschrittene Editor-Einstellungen ein, um die Schreibgeschwindigkeit für Technik-Blogs mit Markdown drastisch zu erhöhen. Wir behandeln alles von extremen Anpassungen in Visual Studio Code (VS Code) und Neovim, der Nutzung von Snippets, der Einführung von textlint als Werkzeug zur Grammatikprüfung, bis hin zur Automatisierung in CI/CD-Pipelines und modernsten Schreibtechniken mithilfe von LLMs wie GitHub Copilot.&lt;/p>
&lt;h2 id="1-das-mathematische-modell-der-schreibgeschwindigkeit">1. Das mathematische Modell der Schreibgeschwindigkeit
&lt;/h2>&lt;p>Lassen Sie uns zunächst mit einer einfachen Formel modellieren, wie sehr die Optimierung der Editor-Einstellungen die Schreibzeit beeinflusst. Die Gesamteingabezeit zum Schreiben eines Blogartikels sei $T_{total}$.&lt;/p>
$$
T_{total} = T_{think} + T_{type} + T_{format} + T_{review}
$$&lt;p>Hierbei ist $T_{think}$ die Denkzeit, $T_{type}$ die Tippzeit, $T_{format}$ die Zeit für Formatanpassungen wie Markdown und $T_{review}$ die Zeit für Überarbeitung und Korrekturlesen.&lt;/p>
&lt;p>Die eingesparte Zeit $T_{saved}$ durch Editor-Anpassungen (wie die Einführung von Snippets oder Linter-Einstellungen) lässt sich wie folgt ausdrücken, wobei $N$ die Anzahl des Auftretens eines bestimmten Musters (z.B. Hugo-Shortcodes oder Markdown-Tabellen), $t_{manual}$ die Zeit für die manuelle Eingabe und $t_{snippet}$ die Zeit durch Automatisierung wie Snippets ist.&lt;/p>
$$
T_{saved} = \sum_{i=1}^{k} N_i \times (t_{manual, i} - t_{snippet, i}) + T_{review\_saved}
$$&lt;p>Darüber hinaus wird durch die Einführung von automatischen Formatierern und Lint-Tools die Zeit für die visuelle Überprüfung durch den Menschen $T_{review}$ erheblich reduziert. Die Maximierung dieser $T_{saved}$ ist genau das Ziel dieses Artikels.&lt;/p>
&lt;h2 id="2-die-ultimativen-einstellungen-für-visual-studio-code-vs-code">2. Die ultimativen Einstellungen für Visual Studio Code (VS Code)
&lt;/h2>&lt;p>VS Code ist derzeit einer der am weitesten verbreiteten Editoren und verfügt über ein starkes Ökosystem an Erweiterungen, auch für das Schreiben in Markdown.&lt;/p>
&lt;h3 id="empfohlene-erweiterungen">Empfohlene Erweiterungen
&lt;/h3>&lt;p>Um das Schreiben zu beschleunigen, wird die Installation der folgenden Erweiterungen dringend empfohlen:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Markdown All in One&lt;/strong>: Bietet alle grundlegenden Funktionen, die für das Schreiben in Markdown erforderlich sind, wie z.B. Tastenkombinationen für Fett- und Kursivdruck, automatische Fortsetzung von Listen und automatische Generierung von Inhaltsverzeichnissen (TOC).&lt;/li>
&lt;li>&lt;strong>markdownlint&lt;/strong>: Warnt in Echtzeit vor Syntaxfehlern und Stilverstößen in Markdown.&lt;/li>
&lt;li>&lt;strong>vscode-textlint&lt;/strong>: Wendet Regelsätze für technische Dokumentationen an, um inkonsistente Schreibweisen und Grammatikfehler zu vermeiden.&lt;/li>
&lt;/ol>
&lt;h3 id="eigene-snippet-einstellungen-für-hugo-markdownjson">Eigene Snippet-Einstellungen für Hugo (&lt;code>markdown.json&lt;/code>)
&lt;/h3>&lt;p>Wenn Sie statische Website-Generatoren wie Hugo oder Docusaurus für Ihren Technik-Blog verwenden, müssen Sie häufig Frontmatter oder eigene Shortcodes eingeben. Mit der Snippet-Funktion von VS Code können diese im Handumdrehen eingefügt werden.&lt;/p>
&lt;p>Wählen Sie in der Befehlspalette &lt;code>Preferences: Configure User Snippets&lt;/code> und fügen Sie der Datei &lt;code>markdown.json&lt;/code> die folgenden Einstellungen hinzu:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;span class="lnt">26
&lt;/span>&lt;span class="lnt">27
&lt;/span>&lt;span class="lnt">28
&lt;/span>&lt;span class="lnt">29
&lt;/span>&lt;span class="lnt">30
&lt;/span>&lt;span class="lnt">31
&lt;/span>&lt;span class="lnt">32
&lt;/span>&lt;span class="lnt">33
&lt;/span>&lt;span class="lnt">34
&lt;/span>&lt;span class="lnt">35
&lt;/span>&lt;span class="lnt">36
&lt;/span>&lt;span class="lnt">37
&lt;/span>&lt;span class="lnt">38
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;Hugo Frontmatter&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;prefix&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;frontmatter&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;body&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">[&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;---&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;title: \&amp;#34;${1:Titel}\&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;slug: \&amp;#34;${2:slug-name}\&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;date: \&amp;#34;$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE T$CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND+09:00\&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;image: \&amp;#34;img/eyecatch.jpg\&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;math: true&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;mermaid: true&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;categories: [\&amp;#34;${3:Kategorie}\&amp;#34;]&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;tags: [\&amp;#34;${4:Tag1}\&amp;#34;, \&amp;#34;${5:Tag2}\&amp;#34;]&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;---&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;${0}&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">],&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;description&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;Erweitert den YAML Frontmatter für Hugo&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">},&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;Hugo Figure Shortcode&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;prefix&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;hfig&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;body&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">[&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;{{&amp;lt; figure src=\&amp;#34;${1:image.jpg}\&amp;#34; title=\&amp;#34;${2:Bildtitel}\&amp;#34; &amp;gt;}}&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">],&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;description&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;Figure-Shortcode für Hugo&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">},&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;Markdown Table&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;prefix&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;mtable&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;body&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">[&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;| ${1:Header 1} | ${2:Header 2} | ${3:Header 3} |&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;| :--- | :---: | ---: |&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;| ${4:Row 1} | ${5:Data} | ${6:Data} |&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;| ${7:Row 2} | ${8:Data} | ${9:Data} |&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;$0&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">],&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;description&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;Erstellt eine 3-spaltige Markdown-Tabelle&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Mit dieser Einstellung wird durch bloßes Eintippen von &lt;code>frontmatter&lt;/code> und Drücken der Tab-Taste sofort ein YAML-Frontmatter einschließlich der aktuellen Uhrzeit eingefügt, was die Anfangsgeschwindigkeit beim Schreiben drastisch erhöht.&lt;/p>
&lt;h3 id="schreibunterstützung-mit-github-copilot">Schreibunterstützung mit GitHub Copilot
&lt;/h3>&lt;p>Wenn GitHub Copilot in VS Code aktiviert ist, funktioniert die kontextbezogene KI-Vervollständigung auch in Markdown. Besonders bei Technik-Blogs liest die KI den &amp;ldquo;als nächstes zu erklärenden Aufbau&amp;rdquo; oder &amp;ldquo;relevante Codeblöcke&amp;rdquo; voraus und schlägt diese vor, wodurch die Tippzeit $T_{type}$ erheblich reduziert werden kann.&lt;/p>
&lt;h2 id="3-extreme-anpassungen-in-neovim">3. Extreme Anpassungen in Neovim
&lt;/h2>&lt;p>Während die GUI von VS Code ausgezeichnet ist, ist Neovim für Terminal-Liebhaber und Vimmer die ultimative Wahl, da man alles erledigen kann, ohne jemals die Hände von der Tastatur zu nehmen.&lt;/p>
&lt;h3 id="neovim-lsp-architektur">Neovim LSP-Architektur
&lt;/h3>&lt;p>Die Architektur von LSP (Language Server Protocol) und Lintern in Neovim für die Markdown-Umgebung sieht wie folgt aus:&lt;/p>
&lt;pre class="mermaid">
classDiagram
class Neovim {
+&amp;#34;Textpuffer&amp;#34;
+&amp;#34;Tastenkombinationen&amp;#34;
}
class nvim_lspconfig {
+&amp;#34;marksman (Markdown LSP)&amp;#34;
}
class null_ls_or_none_ls {
+&amp;#34;markdownlint&amp;#34;
+&amp;#34;textlint&amp;#34;
}
class LuaSnip {
+&amp;#34;Dynamische Snippets&amp;#34;
}
class CMP {
+&amp;#34;Automatische Vervollständigungs-Engine&amp;#34;
}
Neovim --&amp;gt; nvim_lspconfig : &amp;#34;Bietet semantische Funktionen&amp;#34;
Neovim --&amp;gt; null_ls_or_none_ls : &amp;#34;Diagnostik &amp;amp; Formatierung&amp;#34;
Neovim --&amp;gt; CMP : &amp;#34;Vervollständigungsanfrage&amp;#34;
CMP --&amp;gt; nvim_lspconfig : &amp;#34;LSP-Quelle&amp;#34;
CMP --&amp;gt; LuaSnip : &amp;#34;Snippet-Quelle&amp;#34;
&lt;/pre>
&lt;h3 id="fortgeschrittene-snippet-einfügung-mit-luasnip">Fortgeschrittene Snippet-Einfügung mit LuaSnip
&lt;/h3>&lt;p>Noch mächtiger als die JSON-Snippets in VS Code ist das Neovim-Plugin &lt;code>LuaSnip&lt;/code>. Mithilfe der Lua-Logik lassen sich die Inhalte der Snippets dynamisch berechnen und einfügen.&lt;/p>
&lt;p>Hier ist ein Konfigurationsbeispiel für LuaSnip, das das aktuelle Datum und die Uhrzeit dynamisch abruft und das Hugo-Frontmatter einfügt.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-lua" data-lang="lua">&lt;span class="line">&lt;span class="cl">&lt;span class="kd">local&lt;/span> &lt;span class="n">ls&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">require&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;luasnip&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kd">local&lt;/span> &lt;span class="n">s&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">ls.snippet&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kd">local&lt;/span> &lt;span class="n">t&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">ls.text_node&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kd">local&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">ls.insert_node&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kd">local&lt;/span> &lt;span class="n">f&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">ls.function_node&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">-- Funktion zum Abrufen der aktuellen JST-Zeit&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kd">local&lt;/span> &lt;span class="kr">function&lt;/span> &lt;span class="nf">get_current_date_jst&lt;/span>&lt;span class="p">()&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kr">return&lt;/span> &lt;span class="n">os.date&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;!%Y-%m-%dT%H:%M:%S&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="o">..&lt;/span> &lt;span class="s2">&amp;#34;+09:00&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kr">end&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">ls.add_snippets&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;markdown&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">s&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;frontmatter&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34;---&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;title: &lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">1&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;Title&amp;#34;&lt;/span>&lt;span class="p">),&lt;/span> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;slug: &lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">2&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;slug-name&amp;#34;&lt;/span>&lt;span class="p">),&lt;/span> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;date: &lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">f&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kr">function&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="kr">return&lt;/span> &lt;span class="p">{&lt;/span>&lt;span class="n">get_current_date_jst&lt;/span>&lt;span class="p">()}&lt;/span> &lt;span class="kr">end&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="p">{}),&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;image: &lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">img/eyecatch.jpg&lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;math: true&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;mermaid: true&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;categories: [&lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">3&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;Kategorie&amp;#34;&lt;/span>&lt;span class="p">),&lt;/span> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">]&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;tags: [&lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">4&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;Tag&amp;#34;&lt;/span>&lt;span class="p">),&lt;/span> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="se">\&amp;#34;&lt;/span>&lt;span class="s2">]&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;---&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">0&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}),&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">s&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;mtable&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34;| &amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">1&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;Header 1&amp;#34;&lt;/span>&lt;span class="p">),&lt;/span> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34; | &amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">2&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;Header 2&amp;#34;&lt;/span>&lt;span class="p">),&lt;/span> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34; |&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;|---|---|&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;| &amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">3&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;Cell 1&amp;#34;&lt;/span>&lt;span class="p">),&lt;/span> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34; | &amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">4&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s2">&amp;#34;Cell 2&amp;#34;&lt;/span>&lt;span class="p">),&lt;/span> &lt;span class="n">t&lt;/span>&lt;span class="p">({&lt;/span>&lt;span class="s2">&amp;#34; |&amp;#34;&lt;/span>&lt;span class="p">}),&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">})&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">})&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Durch die Nutzung der Programmiersprache (Lua) ist es auf diese Weise möglich, nicht nur feste Zeichenfolgen, sondern auch Rückgabewerte von Funktionen einzubetten oder extrem komplexe Snippets zu erstellen, bei denen die Anzahl der Tabellenspalten dynamisch anhand der Anzahl der eingegebenen Zeichen erhöht oder verringert wird.&lt;/p>
&lt;h2 id="4-statische-analyse-für-qualität-und-geschwindigkeit-beim-schreiben-textlint-und-reguläre-ausdrücke">4. Statische Analyse für Qualität und Geschwindigkeit beim Schreiben (textlint und reguläre Ausdrücke)
&lt;/h2>&lt;p>Um die Qualität des Blogs zu gewährleisten, müssen Tippfehler und inkonsistente Schreibweisen vermieden werden. Wenn dies manuell durchgeführt wird, steigt $T_{review}$ explosionsartig an, weshalb die statische Analyse mit &lt;code>textlint&lt;/code> eingeführt wird.&lt;/p>
&lt;h3 id="einführung-von-textlint-und-dem-japanischen-regelsatz">Einführung von textlint und dem japanischen Regelsatz
&lt;/h3>&lt;p>Installieren Sie textlint in einer Node.js-Umgebung.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">npm install -D textlint textlint-rule-preset-ja-technical-writing textlint-rule-prh textlint-filter-rule-comments
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Erstellen Sie eine &lt;code>.textlintrc.json&lt;/code> im Projektstammverzeichnis und konfigurieren Sie sie wie folgt:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;filters&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;comments&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="kc">true&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">},&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;rules&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;preset-ja-technical-writing&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;ja-no-mixed-period&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;periodMark&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;。&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">},&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;sentence-length&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;max&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="mi">100&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">},&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;prh&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;rulePaths&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">[&lt;/span>&lt;span class="s2">&amp;#34;./prh.yml&amp;#34;&lt;/span>&lt;span class="p">]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Erstellen Sie die &lt;code>prh.yml&lt;/code> und definieren Sie inkonsistente Schreibweisen von Fachbegriffen. Zum Beispiel vereinheitlichen wir &amp;ldquo;E-Mail&amp;rdquo; und &amp;ldquo;Email&amp;rdquo;, &amp;ldquo;Javascript&amp;rdquo; und &amp;ldquo;JavaScript&amp;rdquo; usw.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;span class="lnt">8
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">version&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">1&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">rules&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">expected&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;JavaScript&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">pattern&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;Javascript&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">expected&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;E-Mail&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">pattern&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;Email&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">expected&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;Schnittstelle&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">pattern&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;Interface&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Dadurch wird bei jedem Tastendruck im Editor in Echtzeit vor inkonsistenten Schreibweisen gewarnt, und die Zeit für das Korrekturlesen sinkt auf nahezu null.&lt;/p>
&lt;h3 id="massenersetzung-und-strukturierungsmuster-mit-regulären-ausdrücken">Massenersetzung und Strukturierungsmuster mit regulären Ausdrücken
&lt;/h3>&lt;p>Wenn Sie bestehende Artikel in Markdown migrieren oder Text von externen Quellen importieren, ist die Massenersetzung durch reguläre Ausdrücke sehr nützlich.&lt;/p>
&lt;p>Zum Beispiel der reguläre Ausdruck zur Konvertierung von HTML-Tags &lt;code>&amp;lt;b&amp;gt;Hervorhebung&amp;lt;/b&amp;gt;&lt;/code> in Markdown &lt;code>**Hervorhebung**&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Suchmuster&lt;/strong>: &lt;code>&amp;lt;b&amp;gt;(.*?)&amp;lt;/b&amp;gt;&lt;/code>&lt;/li>
&lt;li>&lt;strong>Ersetzungsmuster&lt;/strong>: &lt;code>**$1**&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Wenn Sie unnötige aufeinanderfolgende Zeilenumbrüche zu einem einzigen zusammenfassen möchten:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Suchmuster&lt;/strong>: &lt;code>\n{3,}&lt;/code>&lt;/li>
&lt;li>&lt;strong>Ersetzungsmuster&lt;/strong>: &lt;code>\n\n&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Indem Sie diese in der Such- und Ersetzungsfunktion von VS Code (Regulärer-Ausdruck-Modus) oder mit dem &lt;code>%s&lt;/code>-Befehl in Neovim (&lt;code>:%s/&amp;lt;b&amp;gt;\(.*?\)&amp;lt;\/b&amp;gt;/**\1**/g&lt;/code>) ausführen, können Sie das Format im Handumdrehen vereinheitlichen.&lt;/p>
&lt;h3 id="automatische-überprüfung-durch-cicd-pipelines">Automatische Überprüfung durch CI/CD-Pipelines
&lt;/h3>&lt;p>Darüber hinaus verwenden wir GitHub Actions, um eine CI-Pipeline aufzubauen, bei der textlint automatisch beim Pushen von Blogartikeln ausgeführt wird. Dadurch kann die Bereitstellung von Artikeln mit Regelverstößen von vornherein verhindert werden.&lt;/p>
&lt;pre class="mermaid">
flowchart TD
A[&amp;#34;Autor&amp;#34;] --&amp;gt;|Änderungen pushen| B[&amp;#34;GitHub-Repository&amp;#34;]
B --&amp;gt; C{&amp;#34;GitHub Actions ausgelöst&amp;#34;}
C --&amp;gt; D[&amp;#34;Repository auschecken&amp;#34;]
D --&amp;gt; E[&amp;#34;Node.js einrichten&amp;#34;]
E --&amp;gt; F[&amp;#34;npm install&amp;#34;]
F --&amp;gt; G[&amp;#34;textlint ausführen&amp;#34;]
G --&amp;gt;|Bestanden| H[&amp;#34;Hugo-Website erstellen&amp;#34;]
G --&amp;gt;|Fehlgeschlagen| I[&amp;#34;Fehler an PR/Commit melden&amp;#34;]
H --&amp;gt; J[&amp;#34;Auf Hosting bereitstellen (Vercel/Netlify)&amp;#34;]
&lt;/pre>
&lt;h2 id="5-markdown-schreibtechniken-im-zeitalter-der-llms">5. Markdown-Schreibtechniken im Zeitalter der LLMs
&lt;/h2>&lt;p>Beim modernen Schreiben von Technik-Blogs ist die Nutzung von LLMs (Large Language Models) unumgänglich. Durch den Einsatz in Editoren integrierter KI-Tools wird die Schreibgeschwindigkeit weiter verdoppelt.&lt;/p>
&lt;h3 id="prompt-engineering-im-editor">Prompt Engineering im Editor
&lt;/h3>&lt;p>Mit GitHub Copilot Chat in VS Code oder &lt;code>ChatGPT.nvim&lt;/code> und &lt;code>Copilot.vim&lt;/code> in Neovim können Sie beispielsweise den folgenden Prompt absenden, ohne den Editor zu verlassen:&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;Erstelle für die folgenden technologischen Elemente einen Gliederungsentwurf in einer hierarchischen Markdown-Struktur für Anfänger: Docker, Kubernetes, CI/CD&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>Sofort wird ein Markdown mit Überschriften und Aufzählungspunkten generiert. Wir müssen dieses Grundgerüst nur noch mit Inhalten füllen.&lt;/p>
&lt;p>Darüber hinaus generiert die KI auch bei komplexen Mermaid-Diagrammen oder mathematischen Formeln (LaTeX) die genaue Syntax, wenn man ihr Anweisungen gibt. Beispielsweise wurde auch die Grundlage für das Layout der mathematischen Formeln und Diagramme in diesem Artikel durch Pair-Writing mit einem LLM beschleunigt.&lt;/p>
&lt;h2 id="6-zusammenfassung">6. Zusammenfassung
&lt;/h2>&lt;p>Wir haben die Editor-Einstellungen erläutert, die die Schreibgeschwindigkeit beim Verfassen von Technik-Blogs in Markdown verdoppeln.&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Bewusstsein für das mathematische Modell&lt;/strong>: Wiederkehrende Aufgaben eliminieren, um $T_{saved}$ zu maximieren.&lt;/li>
&lt;li>&lt;strong>Nutzung von VS Code&lt;/strong>: Eingaben durch Erweiterungen und Snippets in &lt;code>markdown.json&lt;/code> verkürzen.&lt;/li>
&lt;li>&lt;strong>Extreme Anpassungen in Neovim&lt;/strong>: Dynamische Snippets mit &lt;code>LuaSnip&lt;/code> und vollständige Tastaturbedienung.&lt;/li>
&lt;li>&lt;strong>textlint und statische Analyse&lt;/strong>: Integration von CI/CD und lokalen Lintern, um die Korrekturzeit nahezu auf null zu reduzieren.&lt;/li>
&lt;li>&lt;strong>Integration von LLMs&lt;/strong>: Die KI direkt im Editor Markdown-Strukturen und Diagramm-Codes ausgeben lassen.&lt;/li>
&lt;/ol>
&lt;p>Indem Sie diese Einstellungen in Ihre eigene Umgebung übernehmen, verschwindet die &amp;ldquo;Lästigkeit&amp;rdquo; des Schreibens, und die Quantität und Qualität Ihres technischen Outputs wird sich drastisch verbessern. Warum fangen Sie nicht gleich mit der Registrierung eines einzigen kleinen Snippets an?&lt;/p></description></item></channel></rss>