269 lines
72 KiB
HTML
269 lines
72 KiB
HTML
<!doctype html><html lang="en" ><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7" /><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e" /><meta name="mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /><meta name="viewport" content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover" /><meta name="generator" content="Jekyll v4.3.4" /><meta property="og:title" content="Writing a New Post" /><meta name="author" content="cotes" /><meta property="og:locale" content="en" /><meta name="description" content="This tutorial will guide you how to write a post in the Chirpy template, and it’s worth reading even if you’ve used Jekyll before, as many features require specific variables to be set." /><meta property="og:description" content="This tutorial will guide you how to write a post in the Chirpy template, and it’s worth reading even if you’ve used Jekyll before, as many features require specific variables to be set." /><link rel="canonical" href="https://asandikci.com/posts/write-a-new-post/" /><meta property="og:url" content="https://asandikci.com/posts/write-a-new-post/" /><meta property="og:site_name" content="Aliberk Sandıkçı" /><meta property="og:type" content="article" /><meta property="article:published_time" content="2019-08-08T09:10:00+03:00" /><meta name="twitter:card" content="summary" /><meta property="twitter:title" content="Writing a New Post" /> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"cotes"},"dateModified":"2024-07-02T01:00:39+03:00","datePublished":"2019-08-08T09:10:00+03:00","description":"This tutorial will guide you how to write a post in the Chirpy template, and it’s worth reading even if you’ve used Jekyll before, as many features require specific variables to be set.","headline":"Writing a New Post","mainEntityOfPage":{"@type":"WebPage","@id":"https://asandikci.com/posts/write-a-new-post/"},"url":"https://asandikci.com/posts/write-a-new-post/"}</script><title>Writing a New Post | Aliberk Sandıkçı</title><link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicons/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicons/favicon-16x16.png"><link rel="manifest" href="/assets/img/favicons/site.webmanifest"><link rel="shortcut icon" href="/assets/img/favicons/favicon.ico"><meta name="apple-mobile-web-app-title" content="Aliberk Sandıkçı"><meta name="application-name" content="Aliberk Sandıkçı"><meta name="msapplication-TileColor" content="#da532c"><meta name="msapplication-config" content="/assets/img/favicons/browserconfig.xml"><meta name="theme-color" content="#ffffff"><link rel="preconnect" href="https://fonts.googleapis.com" ><link rel="dns-prefetch" href="https://fonts.googleapis.com" ><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="dns-prefetch" href="https://fonts.gstatic.com" ><link rel="preconnect" href="https://cdn.jsdelivr.net" ><link rel="dns-prefetch" href="https://cdn.jsdelivr.net" ><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-logos@1/assets/font-logos.css" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/all.min.css" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous" /><link rel="stylesheet" href="https://unpkg.com/balloon-css/balloon.min.css" /><link rel="stylesheet" href="/assets/css/jekyll-theme-chirpy.css" /><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400&family=Source+Sans+Pro:wght@400;600;700;900&display=swap" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tocbot@4.29.0/dist/tocbot.min.css" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.min.css" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox@3.3.0/dist/css/glightbox.min.css" /> <script type="text/javascript"> class ModeToggle { static get MODE_KEY() { return 'mode'; } static get MODE_ATTR() { return 'data-mode'; } static get DARK_MODE() { return 'dark'; } static get LIGHT_MODE() { return 'light'; } static get ID() { return 'mode-toggle'; } constructor() { let self = this;this.sysDarkPrefers.addEventListener('change', () => { if (self.hasMode) { self.clearMode(); } self.notify(); }); if (!this.hasMode) { return; } if (this.isDarkMode) { this.setDark(); } else { this.setLight(); } } get sysDarkPrefers() { return window.matchMedia('(prefers-color-scheme: dark)'); } get isPreferDark() { return this.sysDarkPrefers.matches; } get isDarkMode() { return this.mode === ModeToggle.DARK_MODE; } get hasMode() { return this.mode != null; } get mode() { return sessionStorage.getItem(ModeToggle.MODE_KEY); }get modeStatus() { if (this.hasMode) { return this.mode; } else { return this.isPreferDark ? ModeToggle.DARK_MODE : ModeToggle.LIGHT_MODE; } } setDark() { document.documentElement.setAttribute(ModeToggle.MODE_ATTR, ModeToggle.DARK_MODE); sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.DARK_MODE); } setLight() { document.documentElement.setAttribute(ModeToggle.MODE_ATTR, ModeToggle.LIGHT_MODE); sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.LIGHT_MODE); } clearMode() { document.documentElement.removeAttribute(ModeToggle.MODE_ATTR); sessionStorage.removeItem(ModeToggle.MODE_KEY); }notify() { window.postMessage( { direction: ModeToggle.ID, message: this.modeStatus }, '*' ); } flipMode() { if (this.hasMode) { this.clearMode(); } else { if (this.isPreferDark) { this.setLight(); } else { this.setDark(); } } this.notify(); } } const modeToggle = new ModeToggle(); </script><body><aside aria-label="Sidebar" id="sidebar" class="d-flex flex-column align-items-end"><header class="profile-wrapper"> <a href="/" id="avatar" class="rounded-circle"><img src="https://asandikci.com/assets/img/pp.png" width="112" height="112" alt="avatar" onerror="this.style.display='none'"></a> <a class="site-title d-block" href="/">Aliberk Sandıkçı</a><p class="site-subtitle fst-italic mb-0">Personal Website & Blog</p></header><nav class="flex-column flex-grow-1 w-100 ps-0"><ul class="nav"><li class="nav-item"> <a href="/about/" class="nav-link"> <i class="fa-fw fas fa-info-circle"></i> <span>ABOUT</span> </a><li class="nav-item"> <a href="/now/" class="nav-link"> <i class="fa-fw fa-solid fa-clock"></i> <span>NOW</span> </a><li class="nav-item"> <a href="/categories/" class="nav-link"> <i class="fa-fw fas fa-stream"></i> <span>CATEGORIES</span> </a><li class="nav-item"> <a href="/tags/" class="nav-link"> <i class="fa-fw fas fa-tags"></i> <span>TAGS</span> </a><li class="nav-item"> <a href="/archives/" class="nav-link"> <i class="fa-fw fas fa-archive"></i> <span>ARCHIVES</span> </a><li class="nav-item"> <a href="/donate/" class="nav-link"> <i class="fa-fw fa-solid fa-mug-hot"></i> <span>DONATE</span> </a></ul></nav><div class="sidebar-bottom d-flex flex-wrap align-items-center w-100"> <button type="button" class="btn btn-link nav-link" aria-label="Switch Mode" id="mode-toggle"> <i class="fas fa-adjust"></i> </button> <span class="icon-border"></span> <a href="https://git.asandikci.com/asandikci" aria-label="forgejo" target="_blank" rel="noopener noreferrer" > <i class="fa-solid fa-code-branch"></i> </a> <a href="xmpp:asandikci@aliberksandikci.com.tr" aria-label="xmpp" target="_blank" rel="noopener noreferrer" > <i class="fa fa-xmpp"></i> </a> <a href="javascript:location.href = 'mailto:' + ['contact','aliberksandikci.com.tr'].join('@')" aria-label="email" target="_blank" rel="noopener noreferrer" > <i class="fas fa-envelope"></i> </a> <a href="https://mastodon.social/@asandikci/" aria-label="mastodon" target="_blank" rel="noopener noreferrer me" > <i class="fa fa-mastodon"></i> </a> <a href="https://linkedin.com/in/asandikci" aria-label="linkedin" target="_blank" rel="noopener noreferrer" > <i class="fab fa-linkedin"></i> </a> <a href="https://discord.com/users/987999573479944222" aria-label="discord" target="_blank" rel="noopener noreferrer" > <i class="fa fa-discord"></i> </a> <a href="https://instagram.com/aliberksandikci" aria-label="instagram" target="_blank" rel="noopener noreferrer" > <i class="fa fa-instagram"></i> </a> <a href="https://codeberg.org/asandikci" aria-label="codeberg" target="_blank" rel="noopener noreferrer" > <i class="fl-codeberg"></i> </a> <a href="https://github.com/asandikci" aria-label="github" target="_blank" rel="noopener noreferrer" > <i class="fa-github"></i> </a> <a href="/feed.xml" aria-label="rss" > <i class="fas fa-rss"></i> </a></div></aside><div id="main-wrapper" class="d-flex justify-content-center"><div class="container d-flex flex-column px-xxl-5"><header id="topbar-wrapper" aria-label="Top Bar"><div id="topbar" class="d-flex align-items-center justify-content-between px-lg-3 h-100" ><nav id="breadcrumb" aria-label="Breadcrumb"> <span> <a href="/">Home</a> </span> <span>Writing a New Post</span></nav><button type="button" id="sidebar-trigger" class="btn btn-link"> <i class="fas fa-bars fa-fw"></i> </button><div id="topbar-title"> Post</div><button type="button" id="search-trigger" class="btn btn-link"> <i class="fas fa-search fa-fw"></i> </button> <search id="search" class="align-items-center ms-3 ms-lg-0"> <i class="fas fa-search fa-fw"></i> <input class="form-control" id="search-input" type="search" aria-label="search" autocomplete="off" placeholder="Search..." > </search> <button type="button" class="btn btn-link text-decoration-none" id="search-cancel">Cancel</button></div></header><div class="row flex-grow-1"><main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4"><article class="px-1" data-toc="true"><header><h1 data-toc-skip>Writing a New Post</h1><div class="post-meta text-muted"> <span> Posted <time data-ts="1565244600" data-df="ll" data-bs-toggle="tooltip" data-bs-placement="bottom" > Aug 8, 2019 </time> </span> <span> Updated <time data-ts="1719871239" data-df="ll" data-bs-toggle="tooltip" data-bs-placement="bottom" > Jul 2, 2024 </time> </span><div class="d-flex justify-content-between"> <span> By <em> </em> </span><div> <span class="readtime" data-bs-toggle="tooltip" data-bs-placement="bottom" title="2145 words" > <em>11 min</em> read</span></div></div></div></header><div id="toc-bar" class="d-flex align-items-center justify-content-between invisible"> <span class="label text-truncate">Writing a New Post</span> <button type="button" class="toc-trigger btn me-1"> <i class="fa-solid fa-list-ul fa-fw"></i> </button></div><button id="toc-solo-trigger" type="button" class="toc-trigger btn btn-outline-secondary btn-sm"> <span class="label ps-2 pe-1">Contents</span> <i class="fa-solid fa-angle-right fa-fw"></i> </button> <dialog id="toc-popup" class="p-0"><div class="header d-flex flex-row align-items-center justify-content-between"><div class="label text-truncate py-2 ms-4">Writing a New Post</div><button id="toc-popup-close" type="button" class="btn mx-1 my-1 opacity-75"> <i class="fas fa-close"></i> </button></div><div id="toc-popup-content" class="px-4 py-3 pb-4"></div></dialog><div class="content"><p>This tutorial will guide you how to write a post in the <em>Chirpy</em> template, and it’s worth reading even if you’ve used Jekyll before, as many features require specific variables to be set.</p><h2 id="naming-and-path"><span class="me-2">Naming and Path</span><a href="#naming-and-path" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>Create a new file named <code class="language-plaintext filepath highlighter-rouge">YYYY-MM-DD-TITLE.EXTENSION</code> and put it in the <code class="language-plaintext filepath highlighter-rouge">_posts</code> of the root directory. Please note that the <code class="language-plaintext filepath highlighter-rouge">EXTENSION</code> must be one of <code class="language-plaintext filepath highlighter-rouge">md</code> and <code class="language-plaintext filepath highlighter-rouge">markdown</code>. If you want to save time of creating files, please consider using the plugin <a href="https://github.com/jekyll/jekyll-compose"><code class="language-plaintext highlighter-rouge">Jekyll-Compose</code></a> to accomplish this.</p><h2 id="front-matter"><span class="me-2">Front Matter</span><a href="#front-matter" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>Basically, you need to fill the <a href="https://jekyllrb.com/docs/front-matter/">Front Matter</a> as below at the top of the post:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">title</span><span class="pi">:</span> <span class="s">TITLE</span>
|
||
<span class="na">date</span><span class="pi">:</span> <span class="s">YYYY-MM-DD HH:MM:SS +/-TTTT</span>
|
||
<span class="na">categories</span><span class="pi">:</span> <span class="pi">[</span><span class="nv">TOP_CATEGORIE</span><span class="pi">,</span> <span class="nv">SUB_CATEGORIE</span><span class="pi">]</span>
|
||
<span class="na">tags</span><span class="pi">:</span> <span class="pi">[</span><span class="nv">TAG</span><span class="pi">]</span> <span class="c1"># TAG names should always be lowercase</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><blockquote class="prompt-tip"><p>The posts’ <em>layout</em> has been set to <code class="language-plaintext highlighter-rouge">post</code> by default, so there is no need to add the variable <em>layout</em> in the Front Matter block.</p></blockquote><h3 id="timezone-of-date"><span class="me-2">Timezone of Date</span><a href="#timezone-of-date" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><p>To accurately record the release date of a post, you should not only set up the <code class="language-plaintext highlighter-rouge">timezone</code> of <code class="language-plaintext filepath highlighter-rouge">_config.yml</code> but also provide the post’s timezone in variable <code class="language-plaintext highlighter-rouge">date</code> of its Front Matter block. Format: <code class="language-plaintext highlighter-rouge">+/-TTTT</code>, e.g. <code class="language-plaintext highlighter-rouge">+0800</code>.</p><h3 id="categories-and-tags"><span class="me-2">Categories and Tags</span><a href="#categories-and-tags" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><p>The <code class="language-plaintext highlighter-rouge">categories</code> of each post are designed to contain up to two elements, and the number of elements in <code class="language-plaintext highlighter-rouge">tags</code> can be zero to infinity. For instance:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">categories</span><span class="pi">:</span> <span class="pi">[</span><span class="nv">Animal</span><span class="pi">,</span> <span class="nv">Insect</span><span class="pi">]</span>
|
||
<span class="na">tags</span><span class="pi">:</span> <span class="pi">[</span><span class="nv">bee</span><span class="pi">]</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><h3 id="author-information"><span class="me-2">Author Information</span><a href="#author-information" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><p>The author information of the post usually does not need to be filled in the <em>Front Matter</em> , they will be obtained from variables <code class="language-plaintext highlighter-rouge">social.name</code> and the first entry of <code class="language-plaintext highlighter-rouge">social.links</code> of the configuration file by default. But you can also override it as follows:</p><p>Adding author information in <code class="language-plaintext highlighter-rouge">_data/authors.yml</code> (If your website doesn’t have this file, don’t hesitate to create one).</p><div file="_data/authors.yml" class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="_data/authors.yml"><i class="far fa-file-code fa-fw"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
</pre><td class="rouge-code"><pre><span class="na"><author_id></span><span class="pi">:</span>
|
||
<span class="na">name</span><span class="pi">:</span> <span class="s"><full name></span>
|
||
<span class="na">twitter</span><span class="pi">:</span> <span class="s"><twitter_of_author></span>
|
||
<span class="na">url</span><span class="pi">:</span> <span class="s"><homepage_of_author></span>
|
||
</pre></table></code></div></div><p>And then use <code class="language-plaintext highlighter-rouge">author</code> to specify a single entry or <code class="language-plaintext highlighter-rouge">authors</code> to specify multiple entries:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">author</span><span class="pi">:</span> <span class="s"><author_id></span> <span class="c1"># for single entry</span>
|
||
<span class="c1"># or</span>
|
||
<span class="na">authors</span><span class="pi">:</span> <span class="pi">[</span><span class="nv"><author1_id></span><span class="pi">,</span> <span class="nv"><author2_id></span><span class="pi">]</span> <span class="c1"># for multiple entries</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><p>Having said that, the key <code class="language-plaintext highlighter-rouge">author</code> can also identify multiple entries.</p><blockquote class="prompt-info"><p>The benefit of reading the author information from the file <code class="language-plaintext filepath highlighter-rouge">_data/authors.yml</code> is that the page will have the meta tag <code class="language-plaintext highlighter-rouge">twitter:creator</code>, which enriches the <a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started#card-and-content-attribution">Twitter Cards</a> and is good for SEO.</p></blockquote><h3 id="post-description"><span class="me-2">Post Description</span><a href="#post-description" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><p>By default, the first words of the post are used to display on the home page for a list of posts, in the <em>Further Reading</em> section, and in the XML of the RSS feed. If you don’t want to display the auto-generated description for the post, you can customize it using the <code class="language-plaintext highlighter-rouge">description</code> field in the <em>Front Matter</em> as follows:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">description</span><span class="pi">:</span> <span class="s">Short summary of the post.</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><p>Additionally, the <code class="language-plaintext highlighter-rouge">description</code> text will also be displayed under the post title on the post’s page.</p><h2 id="table-of-contents"><span class="me-2">Table of Contents</span><a href="#table-of-contents" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>By default, the <strong>T</strong>able <strong>o</strong>f <strong>C</strong>ontents (TOC) is displayed on the right panel of the post. If you want to turn it off globally, go to <code class="language-plaintext filepath highlighter-rouge">_config.yml</code> and set the value of variable <code class="language-plaintext highlighter-rouge">toc</code> to <code class="language-plaintext highlighter-rouge">false</code>. If you want to turn off TOC for a specific post, add the following to the post’s <a href="https://jekyllrb.com/docs/front-matter/">Front Matter</a>:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">toc</span><span class="pi">:</span> <span class="kc">false</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><h2 id="comments"><span class="me-2">Comments</span><a href="#comments" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>The global switch of comments is defined by variable <code class="language-plaintext highlighter-rouge">comments.active</code> in the file <code class="language-plaintext filepath highlighter-rouge">_config.yml</code>. After selecting a comment system for this variable, comments will be turned on for all posts.</p><p>If you want to close the comment for a specific post, add the following to the <strong>Front Matter</strong> of the post:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">comments</span><span class="pi">:</span> <span class="kc">false</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><h2 id="media"><span class="me-2">Media</span><a href="#media" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>We refer to images, audio and video as media resources in <em>Chirpy</em>.</p><h3 id="url-prefix"><span class="me-2">URL Prefix</span><a href="#url-prefix" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><p>From time to time we have to define duplicate URL prefixes for multiple resources in a post, which is a boring task that you can avoid by setting two parameters.</p><ul><li><p>If you are using a CDN to host media files, you can specify the <code class="language-plaintext highlighter-rouge">cdn</code> in <code class="language-plaintext filepath highlighter-rouge">_config.yml</code>. The URLs of media resources for site avatar and posts are then prefixed with the CDN domain name.</p><div class="language-yaml nolineno highlighter-rouge" file="_config.yml"><div class="code-header"> <span data-label-text="_config.yml"><i class="far fa-file-code fa-fw"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="na">cdn</span><span class="pi">:</span> <span class="s">https://cdn.com</span>
|
||
</pre></table></code></div></div><li><p>To specify the resource path prefix for the current post/page range, set <code class="language-plaintext highlighter-rouge">media_subpath</code> in the <em>front matter</em> of the post:</p><div class="language-yaml nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">media_subpath</span><span class="pi">:</span> <span class="s">/path/to/media/</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div></ul><p>The option <code class="language-plaintext highlighter-rouge">site.cdn</code> and <code class="language-plaintext highlighter-rouge">page.media_subpath</code> can be used individually or in combination to flexibly compose the final resource URL: <code class="language-plaintext highlighter-rouge">[site.cdn/][page.media_subpath/]file.ext</code></p><h3 id="images"><span class="me-2">Images</span><a href="#images" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><h4 id="caption"><span class="me-2">Caption</span><a href="#caption" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>Add italics to the next line of an image, then it will become the caption and appear at the bottom of the image:</p><div class="language-markdown nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">img-description</span><span class="p">](</span><span class="sx">/path/to/image</span><span class="p">)</span>
|
||
<span class="ge">_Image Caption_</span>
|
||
</pre></table></code></div></div><h4 id="size"><span class="me-2">Size</span><a href="#size" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>To prevent the page content layout from shifting when the image is loaded, we should set the width and height for each image.</p><div class="language-markdown nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">Desktop View</span><span class="p">](</span><span class="sx">/assets/img/sample/mockup.png</span><span class="p">)</span>{: width="700" height="400" }
|
||
</pre></table></code></div></div><blockquote class="prompt-info"><p>For an SVG, you have to at least specify its <em>width</em>, otherwise it won’t be rendered.</p></blockquote><p>Starting from <em>Chirpy v5.0.0</em>, <code class="language-plaintext highlighter-rouge">height</code> and <code class="language-plaintext highlighter-rouge">width</code> support abbreviations (<code class="language-plaintext highlighter-rouge">height</code> → <code class="language-plaintext highlighter-rouge">h</code>, <code class="language-plaintext highlighter-rouge">width</code> → <code class="language-plaintext highlighter-rouge">w</code>). The following example has the same effect as the above:</p><div class="language-markdown nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">Desktop View</span><span class="p">](</span><span class="sx">/assets/img/sample/mockup.png</span><span class="p">)</span>{: w="700" h="400" }
|
||
</pre></table></code></div></div><h4 id="position"><span class="me-2">Position</span><a href="#position" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>By default, the image is centered, but you can specify the position by using one of the classes <code class="language-plaintext highlighter-rouge">normal</code>, <code class="language-plaintext highlighter-rouge">left</code>, and <code class="language-plaintext highlighter-rouge">right</code>.</p><blockquote class="prompt-warning"><p>Once the position is specified, the image caption should not be added.</p></blockquote><ul><li><p><strong>Normal position</strong></p><p>Image will be left aligned in below sample:</p><div class="language-markdown nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">Desktop View</span><span class="p">](</span><span class="sx">/assets/img/sample/mockup.png</span><span class="p">)</span>{: .normal }
|
||
</pre></table></code></div></div><li><p><strong>Float to the left</strong></p><div class="language-markdown nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">Desktop View</span><span class="p">](</span><span class="sx">/assets/img/sample/mockup.png</span><span class="p">)</span>{: .left }
|
||
</pre></table></code></div></div><li><p><strong>Float to the right</strong></p><div class="language-markdown nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">Desktop View</span><span class="p">](</span><span class="sx">/assets/img/sample/mockup.png</span><span class="p">)</span>{: .right }
|
||
</pre></table></code></div></div></ul><h4 id="darklight-mode"><span class="me-2">Dark/Light mode</span><a href="#darklight-mode" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>You can make images follow theme preferences in dark/light mode. This requires you to prepare two images, one for dark mode and one for light mode, and then assign them a specific class (<code class="language-plaintext highlighter-rouge">dark</code> or <code class="language-plaintext highlighter-rouge">light</code>):</p><div class="language-markdown highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">Light mode only</span><span class="p">](</span><span class="sx">/path/to/light-mode.png</span><span class="p">)</span>{: .light }
|
||
<span class="p">![</span><span class="nv">Dark mode only</span><span class="p">](</span><span class="sx">/path/to/dark-mode.png</span><span class="p">)</span>{: .dark }
|
||
</pre></table></code></div></div><h4 id="shadow"><span class="me-2">Shadow</span><a href="#shadow" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>The screenshots of the program window can be considered to show the shadow effect:</p><div class="language-markdown nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">Desktop View</span><span class="p">](</span><span class="sx">/assets/img/sample/mockup.png</span><span class="p">)</span>{: .shadow }
|
||
</pre></table></code></div></div><h4 id="preview-image"><span class="me-2">Preview Image</span><a href="#preview-image" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>If you want to add an image at the top of the post, please provide an image with a resolution of <code class="language-plaintext highlighter-rouge">1200 x 630</code>. Please note that if the image aspect ratio does not meet <code class="language-plaintext highlighter-rouge">1.91 : 1</code>, the image will be scaled and cropped.</p><p>Knowing these prerequisites, you can start setting the image’s attribute:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">image</span><span class="pi">:</span>
|
||
<span class="na">path</span><span class="pi">:</span> <span class="s">/path/to/image</span>
|
||
<span class="na">alt</span><span class="pi">:</span> <span class="s">image alternative text</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><p>Note that the <a href="#url-prefix"><code class="language-plaintext highlighter-rouge">media_subpath</code></a> can also be passed to the preview image, that is, when it has been set, the attribute <code class="language-plaintext highlighter-rouge">path</code> only needs the image file name.</p><p>For simple use, you can also just use <code class="language-plaintext highlighter-rouge">image</code> to define the path.</p><div class="language-yml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">image</span><span class="pi">:</span> <span class="s">/path/to/image</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><h4 id="lqip"><span class="me-2">LQIP</span><a href="#lqip" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>For preview images:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">image</span><span class="pi">:</span>
|
||
<span class="na">lqip</span><span class="pi">:</span> <span class="s">/path/to/lqip-file</span> <span class="c1"># or base64 URI</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><blockquote><p>You can observe LQIP in the preview image of post "<a href="../text-and-typography/">Text and Typography</a>".</p></blockquote><p>For normal images:</p><div class="language-markdown nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="p">![</span><span class="nv">Image description</span><span class="p">](</span><span class="sx">/path/to/image</span><span class="p">)</span>{: lqip="/path/to/lqip-file" }
|
||
</pre></table></code></div></div><h3 id="video"><span class="me-2">Video</span><a href="#video" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><h4 id="social-media-platform"><span class="me-2">Social Media Platform</span><a href="#social-media-platform" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>You can embed videos from social media platforms with the following syntax:</p><div class="language-liquid highlighter-rouge"><div class="code-header"> <span data-label-text="Liquid"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="cp">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>embed/{Platform}.html<span class="w"> </span><span class="na">id</span><span class="o">=</span><span class="s1">'{ID}'</span><span class="w"> </span><span class="cp">%}</span>
|
||
</pre></table></code></div></div><p>Where <code class="language-plaintext highlighter-rouge">Platform</code> is the lowercase of the platform name, and <code class="language-plaintext highlighter-rouge">ID</code> is the video ID.</p><p>The following table shows how to get the two parameters we need in a given video URL, and you can also know the currently supported video platforms.</p><div class="table-wrapper"><table><thead><tr><th>Video URL<th>Platform<th style="text-align: left">ID<tbody><tr><td><a href="https://www.youtube.com/watch?v=H-B46URT4mg">https://www.<strong>youtube</strong>.com/watch?v=<strong>H-B46URT4mg</strong></a><td><code class="language-plaintext highlighter-rouge">youtube</code><td style="text-align: left"><code class="language-plaintext highlighter-rouge">H-B46URT4mg</code><tr><td><a href="https://www.twitch.tv/videos/1634779211">https://www.<strong>twitch</strong>.tv/videos/<strong>1634779211</strong></a><td><code class="language-plaintext highlighter-rouge">twitch</code><td style="text-align: left"><code class="language-plaintext highlighter-rouge">1634779211</code><tr><td><a href="https://www.bilibili.com/video/BV1Q44y1B7Wf">https://www.<strong>bilibili</strong>.com/video/<strong>BV1Q44y1B7Wf</strong></a><td><code class="language-plaintext highlighter-rouge">bilibili</code><td style="text-align: left"><code class="language-plaintext highlighter-rouge">BV1Q44y1B7Wf</code></table></div><h4 id="video-files"><span class="me-2">Video Files</span><a href="#video-files" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>If you want to embed a video file directly, use the following syntax:</p><div class="language-liquid highlighter-rouge"><div class="code-header"> <span data-label-text="Liquid"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="cp">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>embed/video.html<span class="w"> </span><span class="na">src</span><span class="o">=</span><span class="s1">'{URL}'</span><span class="w"> </span><span class="cp">%}</span>
|
||
</pre></table></code></div></div><p>Where <code class="language-plaintext highlighter-rouge">URL</code> is a URL to a video file e.g. <code class="language-plaintext highlighter-rouge">/path/to/sample/video.mp4</code>.</p><p>You can also specify additional attributes for the embedded video file. Here is a full list of attributes allowed.</p><ul><li><code class="language-plaintext highlighter-rouge">poster='/path/to/poster.png'</code> — poster image for a video that is shown while video is downloading<li><code class="language-plaintext highlighter-rouge">title='Text'</code> — title for a video that appears below the video and looks same as for images<li><code class="language-plaintext highlighter-rouge">autoplay=true</code> — video automatically begins to play back as soon as it can<li><code class="language-plaintext highlighter-rouge">loop=true</code> — automatically seek back to the start upon reaching the end of the video<li><code class="language-plaintext highlighter-rouge">muted=true</code> — audio will be initially silenced<li><code class="language-plaintext highlighter-rouge">types</code> — specify the extensions of additional video formats separated by <code class="language-plaintext highlighter-rouge">|</code>. Ensure these files exist in the same directory as your primary video file.</ul><p>Consider an example using all of the above:</p><div class="language-liquid highlighter-rouge"><div class="code-header"> <span data-label-text="Liquid"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
7
|
||
8
|
||
9
|
||
10
|
||
</pre><td class="rouge-code"><pre><span class="cp">{%</span><span class="w">
|
||
</span><span class="nt">include</span><span class="w"> </span>embed/video.html<span class="w">
|
||
</span><span class="na">src</span><span class="o">=</span><span class="s1">'/path/to/video.mp4'</span><span class="w">
|
||
</span><span class="na">types</span><span class="o">=</span><span class="s1">'ogg|mov'</span><span class="w">
|
||
</span><span class="na">poster</span><span class="o">=</span><span class="s1">'poster.png'</span><span class="w">
|
||
</span><span class="na">title</span><span class="o">=</span><span class="s1">'Demo video'</span><span class="w">
|
||
</span><span class="na">autoplay</span><span class="o">=</span><span class="kc">true</span><span class="w">
|
||
</span><span class="na">loop</span><span class="o">=</span><span class="kc">true</span><span class="w">
|
||
</span><span class="na">muted</span><span class="o">=</span><span class="kc">true</span><span class="w">
|
||
</span><span class="cp">%}</span>
|
||
</pre></table></code></div></div><h3 id="audios"><span class="me-2">Audios</span><a href="#audios" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><p>If you want to embed an audio file directly, use the following syntax:</p><div class="language-liquid highlighter-rouge"><div class="code-header"> <span data-label-text="Liquid"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="cp">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>embed/audio.html<span class="w"> </span><span class="na">src</span><span class="o">=</span><span class="s1">'{URL}'</span><span class="w"> </span><span class="cp">%}</span>
|
||
</pre></table></code></div></div><p>Where <code class="language-plaintext highlighter-rouge">URL</code> is a URL to an audio file e.g. <code class="language-plaintext highlighter-rouge">/path/to/audio.mp3</code>.</p><p>You can also specify additional attributes for the embedded audio file. Here is a full list of attributes allowed.</p><ul><li><code class="language-plaintext highlighter-rouge">title='Text'</code> — title for an audio that appears below the audio and looks same as for images<li><code class="language-plaintext highlighter-rouge">types</code> — specify the extensions of additional audio formats separated by <code class="language-plaintext highlighter-rouge">|</code>. Ensure these files exist in the same directory as your primary audio file.</ul><p>Consider an example using all of the above:</p><div class="language-liquid highlighter-rouge"><div class="code-header"> <span data-label-text="Liquid"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
</pre><td class="rouge-code"><pre><span class="cp">{%</span><span class="w">
|
||
</span><span class="nt">include</span><span class="w"> </span>embed/audio.html<span class="w">
|
||
</span><span class="na">src</span><span class="o">=</span><span class="s1">'/path/to/audio.mp3'</span><span class="w">
|
||
</span><span class="na">types</span><span class="o">=</span><span class="s1">'ogg|wav|aac'</span><span class="w">
|
||
</span><span class="na">title</span><span class="o">=</span><span class="s1">'Demo audio'</span><span class="w">
|
||
</span><span class="cp">%}</span>
|
||
</pre></table></code></div></div><h2 id="pinned-posts"><span class="me-2">Pinned Posts</span><a href="#pinned-posts" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>You can pin one or more posts to the top of the home page, and the fixed posts are sorted in reverse order according to their release date. Enable by:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">pin</span><span class="pi">:</span> <span class="kc">true</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><h2 id="prompts"><span class="me-2">Prompts</span><a href="#prompts" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>There are several types of prompts: <code class="language-plaintext highlighter-rouge">tip</code>, <code class="language-plaintext highlighter-rouge">info</code>, <code class="language-plaintext highlighter-rouge">warning</code>, and <code class="language-plaintext highlighter-rouge">danger</code>. They can be generated by adding the class <code class="language-plaintext highlighter-rouge">prompt-{type}</code> to the blockquote. For example, define a prompt of type <code class="language-plaintext highlighter-rouge">info</code> as follows:</p><div class="language-md nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
</pre><td class="rouge-code"><pre><span class="gt">> Example line for prompt.</span>
|
||
{: .prompt-info }
|
||
</pre></table></code></div></div><h2 id="syntax"><span class="me-2">Syntax</span><a href="#syntax" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><h3 id="inline-code"><span class="me-2">Inline Code</span><a href="#inline-code" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><div class="language-md nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="sb">`inline code part`</span>
|
||
</pre></table></code></div></div><h3 id="filepath-highlight"><span class="me-2">Filepath Highlight</span><a href="#filepath-highlight" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><div class="language-md nolineno highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
</pre><td class="rouge-code"><pre><span class="sb">`/path/to/a/file.extend`</span>{: .filepath}
|
||
</pre></table></code></div></div><h3 id="code-block"><span class="me-2">Code Block</span><a href="#code-block" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3><p>Markdown symbols <code class="language-plaintext highlighter-rouge">```</code> can easily create a code block as follows:</p><div class="language-md highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="p">```</span><span class="nl">
|
||
</span>This is a plaintext code snippet.
|
||
<span class="p">```</span>
|
||
</pre></table></code></div></div><h4 id="specifying-language"><span class="me-2">Specifying Language</span><a href="#specifying-language" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>Using <code class="language-plaintext highlighter-rouge">```{language}</code> you will get a code block with syntax highlight:</p><div class="language-markdown highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="p">```</span><span class="nl">yaml
|
||
</span><span class="na">key</span><span class="pi">:</span> <span class="s">value</span>
|
||
<span class="p">```</span>
|
||
</pre></table></code></div></div><blockquote class="prompt-danger"><p>The Jekyll tag <code class="language-plaintext highlighter-rouge">{% highlight %}</code> is not compatible with this theme.</p></blockquote><h4 id="line-number"><span class="me-2">Line Number</span><a href="#line-number" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>By default, all languages except <code class="language-plaintext highlighter-rouge">plaintext</code>, <code class="language-plaintext highlighter-rouge">console</code>, and <code class="language-plaintext highlighter-rouge">terminal</code> will display line numbers. When you want to hide the line number of a code block, add the class <code class="language-plaintext highlighter-rouge">nolineno</code> to it:</p><div class="language-markdown highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
</pre><td class="rouge-code"><pre><span class="p">```</span><span class="nl">shell
|
||
</span><span class="nb">echo</span> <span class="s1">'No more line numbers!'</span>
|
||
<span class="p">```</span>
|
||
{: .nolineno }
|
||
</pre></table></code></div></div><h4 id="specifying-the-filename"><span class="me-2">Specifying the Filename</span><a href="#specifying-the-filename" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>You may have noticed that the code language will be displayed at the top of the code block. If you want to replace it with the file name, you can add the attribute <code class="language-plaintext highlighter-rouge">file</code> to achieve this:</p><div class="language-markdown highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
</pre><td class="rouge-code"><pre><span class="p">```</span><span class="nl">shell
|
||
</span><span class="c"># content</span>
|
||
<span class="p">```</span>
|
||
{: file="path/to/file" }
|
||
</pre></table></code></div></div><h4 id="liquid-codes"><span class="me-2">Liquid Codes</span><a href="#liquid-codes" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4><p>If you want to display the <strong>Liquid</strong> snippet, surround the liquid code with <code class="language-plaintext highlighter-rouge">{% raw %}</code> and <code class="language-plaintext highlighter-rouge">{% endraw %}</code>:</p><div class="language-markdown highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
7
|
||
</pre><td class="rouge-code"><pre>{% raw %}
|
||
<span class="p">```</span><span class="nl">liquid
|
||
</span><span class="cp">{%</span><span class="w"> </span><span class="nt">if</span><span class="w"> </span><span class="nv">product</span><span class="p">.</span><span class="nv">title</span><span class="w"> </span><span class="ow">contains</span><span class="w"> </span><span class="s1">'Pack'</span><span class="w"> </span><span class="cp">%}</span>
|
||
This product's title contains the word Pack.
|
||
<span class="cp">{%</span><span class="w"> </span><span class="nt">endif</span><span class="w"> </span><span class="cp">%}</span>
|
||
<span class="p">```</span>
|
||
{% endraw %}
|
||
</pre></table></code></div></div><p>Or adding <code class="language-plaintext highlighter-rouge">render_with_liquid: false</code> (Requires Jekyll 4.0 or higher) to the post’s YAML block.</p><h2 id="mathematics"><span class="me-2">Mathematics</span><a href="#mathematics" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>We use <a href="https://www.mathjax.org/"><strong>MathJax</strong></a> to generate mathematics. For website performance reasons, the mathematical feature won’t be loaded by default. But it can be enabled by:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">math</span><span class="pi">:</span> <span class="kc">true</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><p>After enabling the mathematical feature, you can add math equations with the following syntax:</p><ul><li><strong>Block math</strong> should be added with <code class="language-plaintext highlighter-rouge">$$ math $$</code> with <strong>mandatory</strong> blank lines before and after <code class="language-plaintext highlighter-rouge">$$</code><ul><li><strong>Inserting equation numbering</strong> should be added with <code class="language-plaintext highlighter-rouge">$$\begin{equation} math \end{equation}$$</code><li><strong>Referencing equation numbering</strong> should be done with <code class="language-plaintext highlighter-rouge">\label{eq:label_name}</code> in the equation block and <code class="language-plaintext highlighter-rouge">\eqref{eq:label_name}</code> inline with text (see example below)</ul><li><strong>Inline math</strong> (in lines) should be added with <code class="language-plaintext highlighter-rouge">$$ math $$</code> without any blank line before or after <code class="language-plaintext highlighter-rouge">$$</code><li><strong>Inline math</strong> (in lists) should be added with <code class="language-plaintext highlighter-rouge">\$$ math $$</code></ul><div class="language-markdown highlighter-rouge"><div class="code-header"> <span data-label-text="Markdown"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
7
|
||
8
|
||
9
|
||
10
|
||
11
|
||
12
|
||
13
|
||
14
|
||
15
|
||
16
|
||
17
|
||
18
|
||
19
|
||
20
|
||
21
|
||
22
|
||
23
|
||
24
|
||
25
|
||
26
|
||
</pre><td class="rouge-code"><pre><span class="c"><!-- Block math, keep all blank lines --></span>
|
||
|
||
$$
|
||
LaTeX_math_expression
|
||
$$
|
||
|
||
<span class="c"><!-- Equation numbering, keep all blank lines --></span>
|
||
|
||
$$
|
||
<span class="se">\b</span>egin{equation}
|
||
LaTeX_math_expression
|
||
<span class="se">\l</span>abel{eq:label_name}
|
||
<span class="se">\e</span>nd{equation}
|
||
$$
|
||
|
||
Can be referenced as <span class="se">\e</span>qref{eq:label_name}.
|
||
|
||
<span class="c"><!-- Inline math in lines, NO blank lines --></span>
|
||
|
||
"Lorem ipsum dolor sit amet, $$ LaTeX_math_expression $$ consectetur adipiscing elit."
|
||
|
||
<span class="c"><!-- Inline math in lists, escape the first `$` --></span>
|
||
<span class="p">
|
||
1.</span> <span class="se">\$</span>$ LaTeX_math_expression $$
|
||
<span class="p">2.</span> <span class="se">\$</span>$ LaTeX_math_expression $$
|
||
<span class="p">3.</span> <span class="se">\$</span>$ LaTeX_math_expression $$
|
||
</pre></table></code></div></div><blockquote class="prompt-tip"><p>Starting with <code class="language-plaintext highlighter-rouge">v7.0.0</code>, configuration options for <strong>MathJax</strong> have been moved to file <code class="language-plaintext filepath highlighter-rouge">assets/js/data/mathjax.js</code>, and you can change the options as needed, such as adding <a href="https://docs.mathjax.org/en/latest/input/tex/extensions/index.html">extensions</a>.<br /> If you are building the site via <code class="language-plaintext highlighter-rouge">chirpy-starter</code>, copy that file from the gem installation directory (check with command <code class="language-plaintext highlighter-rouge">bundle info --path jekyll-theme-chirpy</code>) to the same directory in your repository.</p></blockquote><h2 id="mermaid"><span class="me-2">Mermaid</span><a href="#mermaid" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p><a href="https://github.com/mermaid-js/mermaid"><strong>Mermaid</strong></a> is a great diagram generation tool. To enable it on your post, add the following to the YAML block:</p><div class="language-yaml highlighter-rouge"><div class="code-header"> <span data-label-text="YAML"><i class="fas fa-code fa-fw small"></i></span> <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
|
||
2
|
||
3
|
||
</pre><td class="rouge-code"><pre><span class="nn">---</span>
|
||
<span class="na">mermaid</span><span class="pi">:</span> <span class="kc">true</span>
|
||
<span class="nn">---</span>
|
||
</pre></table></code></div></div><p>Then you can use it like other markdown languages: surround the graph code with <code class="language-plaintext highlighter-rouge">```mermaid</code> and <code class="language-plaintext highlighter-rouge">```</code>.</p><h2 id="learn-more"><span class="me-2">Learn More</span><a href="#learn-more" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h2><p>For more knowledge about Jekyll posts, visit the <a href="https://jekyllrb.com/docs/posts/">Jekyll Docs: Posts</a>.</p></div><div class="post-tail-wrapper text-muted"><div class="post-meta mb-3"> <i class="far fa-folder-open fa-fw me-1"></i> <a href="//categories/blogging/">Blogging</a>, <a href="//categories/tutorial/">Tutorial</a></div><div class="post-tags"> <i class="fa fa-tags fa-fw me-1"></i> <a href="//tags/writing/" class="post-tag no-text-decoration" >writing</a></div><div class=" post-tail-bottom d-flex justify-content-between align-items-center mt-5 pb-2 " ><div class="license-wrapper"> This post is licensed under <a href="https://creativecommons.org/licenses/by/4.0/"> CC BY 4.0 </a> by the author.</div><div class="share-wrapper d-flex align-items-center"> <span class="share-label text-muted">Share</span> <span class="share-icons"> <a href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fasandikci.com%2Fposts%2Fwrite-a-new-post%2F" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top" title="Linkedin" aria-label="Linkedin"> <i class="fa-fw fab fa-linkedin"></i> </a> <script defer type="module" src="https://cdn.jsdelivr.net/npm/@justinribeiro/share-to-mastodon/+esm"></script> <button class="btn text-start" data-bs-toggle="tooltip" data-bs-placement="top" title="Mastodon" aria-label="Mastodon"> <share-to-mastodon class="share-mastodon" message="Writing%20a%20New%20Post%20-%20Aliberk%20Sand%C4%B1k%C3%A7%C4%B1" url="https%3A%2F%2Fasandikci.com%2Fposts%2Fwrite-a-new-post%2F"customInstanceList="[{"label":"mastodon.social","link":"https://mastodon.social/"},{"label":"mastodon.online","link":"https://mastodon.online/"},{"label":"fosstodon.org","link":"https://fosstodon.org/"},{"label":"mastodon.com.tr","link":"https://mastodon.com.tr/"}]" > <i class="fa-fw fa fa-mastodon"></i> </share-to-mastodon> </button> <a href="https://twitter.com/intent/tweet?text=Writing%20a%20New%20Post%20-%20Aliberk%20Sand%C4%B1k%C3%A7%C4%B1&url=https%3A%2F%2Fasandikci.com%2Fposts%2Fwrite-a-new-post%2F" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top" title="Twitter" aria-label="Twitter"> <i class="fa-fw fa-brands fa-square-x-twitter"></i> </a> <a href="https://www.facebook.com/sharer/sharer.php?title=Writing%20a%20New%20Post%20-%20Aliberk%20Sand%C4%B1k%C3%A7%C4%B1&u=https%3A%2F%2Fasandikci.com%2Fposts%2Fwrite-a-new-post%2F" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top" title="Facebook" aria-label="Facebook"> <i class="fa-fw fab fa-facebook-square"></i> </a> <a href="https://t.me/share/url?url=https%3A%2F%2Fasandikci.com%2Fposts%2Fwrite-a-new-post%2F&text=Writing%20a%20New%20Post%20-%20Aliberk%20Sand%C4%B1k%C3%A7%C4%B1" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top" title="Telegram" aria-label="Telegram"> <i class="fa-fw fab fa-telegram"></i> </a> <a href="https://bsky.app/intent/compose?text=Writing%20a%20New%20Post%20-%20Aliberk%20Sand%C4%B1k%C3%A7%C4%B1%20https%3A%2F%2Fasandikci.com%2Fposts%2Fwrite-a-new-post%2F" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top" title="Bluesky" aria-label="Bluesky"> <i class="fa-fw fa-brands fa-bluesky"></i> </a> <a href="https://www.reddit.com/submit?url=https%3A%2F%2Fasandikci.com%2Fposts%2Fwrite-a-new-post%2F&title=Writing%20a%20New%20Post%20-%20Aliberk%20Sand%C4%B1k%C3%A7%C4%B1" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top" title="Reddit" aria-label="Reddit"> <i class="fa-fw fa-brands fa-square-reddit"></i> </a> <a href="https://www.threads.net/intent/post?text=Writing%20a%20New%20Post%20-%20Aliberk%20Sand%C4%B1k%C3%A7%C4%B1%20https%3A%2F%2Fasandikci.com%2Fposts%2Fwrite-a-new-post%2F" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top" title="Threads" aria-label="Threads"> <i class="fa-fw fa-brands fa-square-threads"></i> </a> <button id="copy-link" aria-label="Copy link" class="btn small" data-bs-toggle="tooltip" data-bs-placement="top" title="Copy link" data-title-succeed="Link copied successfully!" > <i class="fa-fw fas fa-link pe-none fs-6"></i> </button> </span></div></div></div></article></main><aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 mb-5 text-muted"><div class="access"><section id="access-lastmod"><h2 class="panel-heading">Recently Updated</h2><ul class="content list-unstyled ps-0 pb-1 ms-1 mt-2"><li class="text-truncate lh-lg"> <a href="/posts/getting-started/">Getting Started</a><li class="text-truncate lh-lg"> <a href="/posts/tusas-gezisi/">TUSAŞ Gezisi</a><li class="text-truncate lh-lg"> <a href="/posts/pardus-ve-windows/">Pardus/Linux Yanına Windows Kurulumu</a><li class="text-truncate lh-lg"> <a href="/posts/text-and-typography/">Text and Typography</a><li class="text-truncate lh-lg"> <a href="/posts/write-a-new-post/">Writing a New Post</a></ul></section><section><h2 class="panel-heading">Trending Tags</h2><div class="d-flex flex-wrap mt-3 mb-1 me-3"> <a class="post-tag btn btn-outline-primary" href="/tags/duzenlenecek/">duzenlenecek</a> <a class="post-tag btn btn-outline-primary" href="/tags/pardus/">pardus</a> <a class="post-tag btn btn-outline-primary" href="/tags/linux/">linux</a> <a class="post-tag btn btn-outline-primary" href="/tags/tubitak/">tubitak</a> <a class="post-tag btn btn-outline-primary" href="/tags/app-recommendations/">app-recommendations</a> <a class="post-tag btn btn-outline-primary" href="/tags/arch/">arch</a> <a class="post-tag btn btn-outline-primary" href="/tags/debian/">debian</a> <a class="post-tag btn btn-outline-primary" href="/tags/epson/">epson</a> <a class="post-tag btn btn-outline-primary" href="/tags/favicon/">favicon</a> <a class="post-tag btn btn-outline-primary" href="/tags/foss/">foss</a></div></section></div><section id="toc-wrapper" class="ps-0 pe-4"><h2 class="panel-heading ps-3 mb-2">Contents</h2><nav id="toc"></nav></section></aside></div><div class="row"><div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4"><aside id="related-posts" aria-labelledby="related-label"><h3 class="mb-4" id="related-label">Further Reading</h3><nav class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4 mb-4"><article class="col"> <a href="/posts/customize-the-favicon/" class="post-preview card h-100"><div class="card-body"> <time data-ts="1565454840" data-df="ll" > Aug 10, 2019 </time><h4 class="pt-0 my-2">Customize the Favicon</h4><div class="text-muted"><p>The favicons of Chirpy are placed in the directory assets/img/favicons/. You may want to replace them with your own. The following sections will guide you to create and replace the default favicons...</p></div></div></a></article><article class="col"> <a href="/posts/getting-started/" class="post-preview card h-100"><div class="card-body"> <time data-ts="1565355300" data-df="ll" > Aug 9, 2019 </time><h4 class="pt-0 my-2">Getting Started</h4><div class="text-muted"><p>Get started with Chirpy basics in this comprehensive overview. You will learn how to install, configure, and use your first Chirpy-based website, as well as deploy it to a web server.</p></div></div></a></article><article class="col"> <a href="/posts/text-and-typography/" class="post-preview card h-100"><div class="card-body"> <time data-ts="1565235180" data-df="ll" > Aug 8, 2019 </time><h4 class="pt-0 my-2">Text and Typography</h4><div class="text-muted"><p>Examples of text, typography, math equations, diagrams, flowcharts, pictures, videos, and more.</p></div></div></a></article></nav></aside><nav class="post-navigation d-flex justify-content-between" aria-label="Post Navigation"> <a href="//posts/text-and-typography/" class="btn btn-outline-primary" aria-label="Older" ><p>Text and Typography</p></a> <a href="//posts/getting-started/" class="btn btn-outline-primary" aria-label="Newer" ><p>Getting Started</p></a></nav><footer aria-label="Site Info" class=" d-flex flex-column justify-content-center text-muted flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3 " ><p>© <time>2024</time> <a href="https://git.asandikci.com/asandikci">Aliberk Sandıkçı</a>. <span data-bs-toggle="tooltip" data-bs-placement="top" title="Except where otherwise noted, the blog posts on this site are licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author." >Some rights reserved.</span></p><p>Using the <a data-bs-toggle="tooltip" data-bs-placement="top" title="v7.1.1" href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener" >Chirpy</a> theme for <a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>.</p></footer></div></div><div id="search-result-wrapper" class="d-flex justify-content-center d-none"><div class="col-11 content"><div id="search-hints"><section><h2 class="panel-heading">Trending Tags</h2><div class="d-flex flex-wrap mt-3 mb-1 me-3"> <a class="post-tag btn btn-outline-primary" href="/tags/duzenlenecek/">duzenlenecek</a> <a class="post-tag btn btn-outline-primary" href="/tags/pardus/">pardus</a> <a class="post-tag btn btn-outline-primary" href="/tags/linux/">linux</a> <a class="post-tag btn btn-outline-primary" href="/tags/tubitak/">tubitak</a> <a class="post-tag btn btn-outline-primary" href="/tags/app-recommendations/">app-recommendations</a> <a class="post-tag btn btn-outline-primary" href="/tags/arch/">arch</a> <a class="post-tag btn btn-outline-primary" href="/tags/debian/">debian</a> <a class="post-tag btn btn-outline-primary" href="/tags/epson/">epson</a> <a class="post-tag btn btn-outline-primary" href="/tags/favicon/">favicon</a> <a class="post-tag btn btn-outline-primary" href="/tags/foss/">foss</a></div></section></div><div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div></div></div></div><aside aria-label="Scroll to Top"> <button id="back-to-top" type="button" class="btn btn-lg btn-box-shadow"> <i class="fas fa-angle-up"></i> </button></aside></div><div id="mask" class="d-none position-fixed w-100 h-100 z-1"></div><aside id="notification" class="toast" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="false" ><div class="toast-header"> <button type="button" class="btn-close ms-auto" data-bs-dismiss="toast" aria-label="Close" ></button></div><div class="toast-body text-center pt-0"><p class="px-2 mb-3">A new version of content is available.</p><button type="button" class="btn btn-primary" aria-label="Update"> Update </button></div></aside><script src="/assets/js/user/copy.js"></script> <script src="https://cdn.jsdelivr.net/combine/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js,npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.umd.min.js,npm/glightbox@3.3.0/dist/js/glightbox.min.js,npm/clipboard@2.0.11/dist/clipboard.min.js,npm/dayjs@1.11.13/dayjs.min.js,npm/dayjs@1.11.13/locale/en.js,npm/dayjs@1.11.13/plugin/relativeTime.js,npm/dayjs@1.11.13/plugin/localizedFormat.js,npm/tocbot@4.29.0/dist/tocbot.min.js"></script> <script src="/assets/js/dist/post.min.js"></script> <script defer src="/app.min.js?baseurl=/®ister=true" ></script> <script defer src="analytics.yayindasin.org/script.js" data-website-id="80f4b239-3529-46be-b7a1-df82c6967a87" ></script> <script>SimpleJekyllSearch({ searchInput: document.getElementById('search-input'), resultsContainer: document.getElementById('search-results'), json: '/assets/js/data/search.json', searchResultTemplate: '<article class="px-1 px-sm-2 px-lg-4 px-xl-0"><header><h2><a href="{url}">{title}</a></h2><div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1"> {categories} {tags}</div></header><p>{snippet}</p></article>', noResultsText: '<p class="mt-5">Oops! No results found.</p>', templateMiddleware: function(prop, value, template) { if (prop === 'categories') { if (value === '') { return `${value}`; } else { return `<div class="me-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`; } } if (prop === 'tags') { if (value === '') { return `${value}`; } else { return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`; } } } }); </script>
|