diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html new file mode 100644 index 00000000..244ab0aa --- /dev/null +++ b/layouts/_default/_markup/render-codeblock.html @@ -0,0 +1,22 @@ +{{ if transform.CanHighlight .Type }} + {{/* Supported Chroma Language*/}} + +
+ {{ with .Attributes.title }} +
{{ . }}
+ {{ end }} +
  
+  {{- with transform.HighlightCodeBlock . -}}
+    {{ .Inner }}
+  {{- end -}}
+  
+ +{{ else }} + {{/* Unsupported Language */}} +
+ {{ with .Attributes.title }} +
{{ . }}
+ {{ end }} +
{{ .Inner }}
+
+{{ end }} \ No newline at end of file diff --git a/public/articles/blog/how-i-fixed-my-synapse-matrix-federation/index.html b/public/articles/blog/how-i-fixed-my-synapse-matrix-federation/index.html index 0fdb1fc1..0ca6ea0a 100644 --- a/public/articles/blog/how-i-fixed-my-synapse-matrix-federation/index.html +++ b/public/articles/blog/how-i-fixed-my-synapse-matrix-federation/index.html @@ -1,54 +1,65 @@ - - - - How I Fixed My Synapse's Matrix Federation | vodoraslo - - - - + + + + How I Fixed My Synapse's Matrix Federation | vodoraslo + + + + - - - - - - -
-

How I Fixed My Synapse's Matrix Federation

-
- - +nano /etc/matrix-synapse/homeserver.yaml and go all the way to the bottom or search for trusted_key_servers. it’s probably going to be matrix."/> + + + + + + +
+

How I Fixed My Synapse's Matrix Federation

+
+ +

Federation issues

I for the life of me couldn’t get synapse’s (matrix’s) federation to work. It said that the encryption couldn’t be trusted, i could join public rooms but i couldn’t start any chats, i couldn’t invite people to my rooms, i couldn’t get invited to rooms.

How I fixed it

Go to your homeserver.yaml file

-
nano /etc/matrix-synapse/homeserver.yaml
-

and go all the way to the bottom or search for trusted_key_servers. it’s probably going to be matrix.org. You should change it to the following by removing matrix.org and leave blank square brackets:

-
trusted_key_servers: []
-
-
- - - -
-
- - - - - + + + +
+ +
nano /etc/matrix-synapse/homeserver.yaml
+ +

and go all the way to the bottom or search for trusted_key_servers. it’s probably going to be matrix.org. You should change it to the following by removing matrix.org and leave blank square brackets:

+ + +
+ +
trusted_key_servers: []
+
+ + + + + +
+
+ + + + + diff --git a/public/articles/blog/meta-description-in-hugo/index.html b/public/articles/blog/meta-description-in-hugo/index.html index 1cadf004..8b93b890 100644 --- a/public/articles/blog/meta-description-in-hugo/index.html +++ b/public/articles/blog/meta-description-in-hugo/index.html @@ -4,7 +4,7 @@ Meta Description in Hugo | vodoraslo - + @@ -30,28 +30,52 @@
  • Add the following line inside it
  • For config.toml

    -
    [params]
    -  description = "The global meta description of your website"
    -

    For config.yaml

    -
    params:
    -  description: The global meta description of your website
    -

    It won’t work just yet because you have to update the baseof.html file.

    + + + +
    + +
    [params]
    +  description = "The global meta description of your website"
    + +

    For config.yaml

    + + + +
    + +
    params:
    +  description: The global meta description of your website
    + +

    It won’t work just yet because you have to update the baseof.html file.

    Updating the baseof.html file

    1. Locate baseof.html
    2. Add or change the meta description line with the following
    -
    <meta name="description" content="{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}"/>
    -

    And now if you start your Hugo server locally with hugo serve --noHTTPCache and you right click on your page -> View Page Source -> Search for the meta description tag. It should match what you left in the config file.

    + + + +
    + +
    <meta name="description" content="{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}"/>
    + +

    And now if you start your Hugo server locally with hugo serve --noHTTPCache and you right click on your page -> View Page Source -> Search for the meta description tag. It should match what you left in the config file.

    Replacing the global description with a custom one

    1. Have a markdown file ready
    2. In the preamble, add
    -
    ---
    +
    +  
    +  
    +  
    + +
    ---
     description: "Your custom description for this page"
    ----
    -

    Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!

    +
    ---
    + +

    Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!

    diff --git a/public/articles/blog/multiple-index-pages-in-hugo/index.html b/public/articles/blog/multiple-index-pages-in-hugo/index.html index ed104db5..ad35d0f0 100644 --- a/public/articles/blog/multiple-index-pages-in-hugo/index.html +++ b/public/articles/blog/multiple-index-pages-in-hugo/index.html @@ -4,7 +4,7 @@ Multiple Index Pages in Hugo | vodoraslo - +

    I wanted to order Hackbook in reverse (i.e. oldest to newest) so that it’s easier for the reader to start at the correct page.

    I ran into the following problem - the default list.html does them from newest to oldest.

    So I found this forum post and I created a file in the _default directory as follows:

    -
    layouts
    +
    +  
    +  
    + +
    layouts
     |----**_default**
     |-------**hackbook**
     |-----------**order-by-oldest.html**
     |-------baseof.html
     |-------index.html
     |-------list.html
    -|-------single.html           
    -
    +|-------single.html
    + +
    Picture of the directory

    I named my file order by oldest because I plan on reusing it in other places. This is what’s contained inside it:

    -
    {{ define "title" -}}
    +
    +  
    +  
    + +
    {{ define "title" -}}
     {{ .Title | title }}
     {{- end }}
     {{ define "main" -}}
    @@ -62,8 +71,9 @@ layouts
    |----**_default**
    |-------**hackbook**
    |-----------**order-by-oldest."/>
     		</li>
     {{- end }}
     </ul>
    -{{- end }}
    -

    If you want to display the date on the left of the titles, you have to add datesinlist=true in your config.toml or datesinlist: true in your config.yaml

    +{{- end }}
    + +

    If you want to display the date on the left of the titles, you have to add datesinlist=true in your config.toml or datesinlist: true in your config.yaml

    You probably don’t need enableGitInfo = true as that will crash your website, I have no idea what it does, you don’t need it.

    Using your custom _index.html

    After creating your custom _index.html you’d use it as follows:

    @@ -76,7 +86,11 @@ layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest."/>

    And now you should have a custom _index.html for your pages! :)

    Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:

    -
    Content structure:
    +
    +  
    +  
    + +
    Content structure:
     
     content
     ├── better
    @@ -89,13 +103,13 @@ content
     
     content/better/_index.md
     
    -+++
    ++++
     title = "Better"
     date = 2021-03-04T17:02:42-08:00
     draft = false
     type = "post"
     layout = "posts-by-lastmod"
    -+++
    ++++
     
     Template structure:
     
    @@ -128,8 +142,9 @@ layouts/index.html
     
     config.toml (see https://gohugo.io/variables/git/#lastmod)
     
    -enableGitInfo = true
    -
    +enableGitInfo = true
    + +
    diff --git a/public/articles/blog/pluralization-issues/index.html b/public/articles/blog/pluralization-issues/index.html index e7bc14b5..649fc12f 100644 --- a/public/articles/blog/pluralization-issues/index.html +++ b/public/articles/blog/pluralization-issues/index.html @@ -1,51 +1,57 @@ - - - - Pluralization Issues (Blogs Instead of Blog) | vodoraslo - - - - + + + + Pluralization Issues (Blogs Instead of Blog) | vodoraslo + + + + - - - - - - -
    -

    Pluralization issues (Blogs instead of Blog)

    -
    - - +pluralizelisttitles = false "/> + + + + + + +
    +

    Pluralization issues (Blogs instead of Blog)

    +
    + +

    this is my first entry and i’m already having issues lol

    So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs

    You can fix this in config.toml with the following line

    -
    pluralizelisttitles = false
    -
    -
    - - - -
    -
    - - - - - + + + +
    + +
    pluralizelisttitles = false
    + + +
    + +
    +
    Previous:
    Hello world / About me
    +
    Next:
    00-00 HackBook EasyPeasy
    +
    + + + + + + + + diff --git a/public/articles/blog/recover-lost-anki-streak/index.html b/public/articles/blog/recover-lost-anki-streak/index.html index 969cb4e7..62f37b51 100644 --- a/public/articles/blog/recover-lost-anki-streak/index.html +++ b/public/articles/blog/recover-lost-anki-streak/index.html @@ -4,7 +4,7 @@ Recover Lost Anki Streak | vodoraslo - + - + diff --git a/public/articles/index.xml b/public/articles/index.xml index 596e3a95..d4767c6b 100644 --- a/public/articles/index.xml +++ b/public/articles/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/articles/updates/helloworld/index.html b/public/articles/updates/helloworld/index.html index 1d7a4e0d..701c259d 100644 --- a/public/articles/updates/helloworld/index.html +++ b/public/articles/updates/helloworld/index.html @@ -4,7 +4,7 @@ Hello World / About Me | vodoraslo - + - - Updated the Css Again (Prefers-Color-Scheme) | vodoraslo - - - - + + + + Updated the Css Again (Prefers-Color-Scheme) | vodoraslo + + + + - - - - - - -
    -

    Updated the Css Again (prefers-color-scheme)

    -
    - - +:root { --bg: #fafafa; --fg: #2f343f; --links: #4084d6; --muted_text: rgb(93, 93, 99); } and then this checks that if the user prefers a darker theme, they shall get a dark theme."/> + + + + + + +
    +

    Updated the Css Again (prefers-color-scheme)

    +
    + +

    I actually updated the css once more.

    If you’re using a dark theme in your browser, the website will follow suit and change to darker colors.

    I did this by setting the light theme to be by default for more readability:

    -
    :root {
    +
    +  
    +  
    +  
    + +
    :root {
     	--bg: #fafafa;
     	--fg: #2f343f;
     	--links: #4084d6;
     	--muted_text: rgb(93, 93, 99);
    -}
    -

    and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn’t know this stuff existed, thought webshits just use java script for everything, but I guess I’m wrong.

    -
    @media (prefers-color-scheme: dark) {
    +}
    + +

    and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn’t know this stuff existed, thought webshits just use java script for everything, but I guess I’m wrong.

    + + + +
    + +
    @media (prefers-color-scheme: dark) {
     	:root {
     		--bg: #141414;	
     		--fg: rgb(232, 228, 228);
     		--links: #5da0f2;
     		--muted_text: rgb(179, 182, 186);
     	}
    -}
    -

    And this is how CSS variables are used:

    -
    body {
    +}
    + +

    And this is how CSS variables are used:

    + + + +
    + +
    body {
     	font-family: sans-serif;
     	background: var(--bg);
     	color: var(--fg);
    -}
    -
    -
    - - - -
    -
    - - - - - +} + + + + + + +
    +
    + + + + + diff --git a/public/articles/updates/yoinked-css/index.html b/public/articles/updates/yoinked-css/index.html index 46fcbe53..83e3c53f 100644 --- a/public/articles/updates/yoinked-css/index.html +++ b/public/articles/updates/yoinked-css/index.html @@ -4,7 +4,7 @@ Yoinked Some Css and Updated the Site | vodoraslo - + diff --git a/public/contact/index.html b/public/contact/index.html index 5b834923..10320b80 100644 --- a/public/contact/index.html +++ b/public/contact/index.html @@ -4,7 +4,7 @@ Contact | vodoraslo - + diff --git a/public/index.html b/public/index.html index 76da0751..a9ada0f1 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ vodoraslo - + diff --git a/public/index.xml b/public/index.xml index 3fe291be..5d0172d0 100644 --- a/public/index.xml +++ b/public/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> +
    @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/lainring/index.html b/public/lainring/index.html index 302299a1..71727c96 100644 --- a/public/lainring/index.html +++ b/public/lainring/index.html @@ -4,7 +4,7 @@ Lain Webring | vodoraslo - + diff --git a/public/lainring/index.xml b/public/lainring/index.xml index bc8fb010..1ddf6713 100644 --- a/public/lainring/index.xml +++ b/public/lainring/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/library/hackbook/00-00-hackbookeasypeasy/index.html b/public/library/hackbook/00-00-hackbookeasypeasy/index.html index 3506f319..91bd5cf8 100644 --- a/public/library/hackbook/00-00-hackbookeasypeasy/index.html +++ b/public/library/hackbook/00-00-hackbookeasypeasy/index.html @@ -4,7 +4,7 @@ 00-00 HackBook EasyPeasy | vodoraslo - + - + diff --git a/public/library/hackbook/01-02-warning/index.html b/public/library/hackbook/01-02-warning/index.html index 2bc86c1c..c4407163 100644 --- a/public/library/hackbook/01-02-warning/index.html +++ b/public/library/hackbook/01-02-warning/index.html @@ -4,7 +4,7 @@ 01-02 Warning | vodoraslo - + diff --git a/public/library/hackbook/01-03-fear/index.html b/public/library/hackbook/01-03-fear/index.html index 5b9ef7a5..15cef344 100644 --- a/public/library/hackbook/01-03-fear/index.html +++ b/public/library/hackbook/01-03-fear/index.html @@ -4,7 +4,7 @@ 01-03 Fear | vodoraslo - + diff --git a/public/library/hackbook/02-01-introduction/index.html b/public/library/hackbook/02-01-introduction/index.html index 81738e37..b8c8dcef 100644 --- a/public/library/hackbook/02-01-introduction/index.html +++ b/public/library/hackbook/02-01-introduction/index.html @@ -4,7 +4,7 @@ 02-01 Introduction | vodoraslo - + diff --git a/public/library/hackbook/02-02-sister-kenny/index.html b/public/library/hackbook/02-02-sister-kenny/index.html index 4b80c1f2..356e43d4 100644 --- a/public/library/hackbook/02-02-sister-kenny/index.html +++ b/public/library/hackbook/02-02-sister-kenny/index.html @@ -4,7 +4,7 @@ 02-02 Sister Kenny | vodoraslo - + diff --git a/public/library/hackbook/03-01-the-worst-pmo-addict-i-have-yet-to-meet/index.html b/public/library/hackbook/03-01-the-worst-pmo-addict-i-have-yet-to-meet/index.html index 97c239ea..d5e6efa5 100644 --- a/public/library/hackbook/03-01-the-worst-pmo-addict-i-have-yet-to-meet/index.html +++ b/public/library/hackbook/03-01-the-worst-pmo-addict-i-have-yet-to-meet/index.html @@ -4,7 +4,7 @@ 03-01 the Worst PMO Addict I Have Yet to Meet | vodoraslo - + diff --git a/public/library/hackbook/03-02-the-easy-method/index.html b/public/library/hackbook/03-02-the-easy-method/index.html index 78f01ee3..f75a2879 100644 --- a/public/library/hackbook/03-02-the-easy-method/index.html +++ b/public/library/hackbook/03-02-the-easy-method/index.html @@ -4,7 +4,7 @@ 03-02 the Easy Method | vodoraslo - + diff --git a/public/library/hackbook/03-03-why-is-it-difficult-to-stop/index.html b/public/library/hackbook/03-03-why-is-it-difficult-to-stop/index.html index 5c6e6f6d..37c2b44c 100644 --- a/public/library/hackbook/03-03-why-is-it-difficult-to-stop/index.html +++ b/public/library/hackbook/03-03-why-is-it-difficult-to-stop/index.html @@ -4,7 +4,7 @@ 03-03 Why Is It Difficult to Stop? | vodoraslo - + diff --git a/public/library/hackbook/03-04-the-sinister-trap/index.html b/public/library/hackbook/03-04-the-sinister-trap/index.html index 1d6caec3..40377b3f 100644 --- a/public/library/hackbook/03-04-the-sinister-trap/index.html +++ b/public/library/hackbook/03-04-the-sinister-trap/index.html @@ -4,7 +4,7 @@ 03-04 the Sinister Trap | vodoraslo - + diff --git a/public/library/hackbook/03-05-why-do-we-carry-on-with-pmo/index.html b/public/library/hackbook/03-05-why-do-we-carry-on-with-pmo/index.html index d176cd1e..1404922f 100644 --- a/public/library/hackbook/03-05-why-do-we-carry-on-with-pmo/index.html +++ b/public/library/hackbook/03-05-why-do-we-carry-on-with-pmo/index.html @@ -4,7 +4,7 @@ 03-05 Why Do We Carry on With PMO | vodoraslo - + diff --git a/public/library/hackbook/03-06-internet-porn/index.html b/public/library/hackbook/03-06-internet-porn/index.html index 254b5f8c..007a769f 100644 --- a/public/library/hackbook/03-06-internet-porn/index.html +++ b/public/library/hackbook/03-06-internet-porn/index.html @@ -4,7 +4,7 @@ 03-06 Internet Porn | vodoraslo - + diff --git a/public/library/hackbook/03-07-brainwashing-and-the-primitive-mechanism/index.html b/public/library/hackbook/03-07-brainwashing-and-the-primitive-mechanism/index.html index 017ca6a5..32825dfa 100644 --- a/public/library/hackbook/03-07-brainwashing-and-the-primitive-mechanism/index.html +++ b/public/library/hackbook/03-07-brainwashing-and-the-primitive-mechanism/index.html @@ -4,7 +4,7 @@ 03-07 Brainwashing and the Primitive Mechanism | vodoraslo - + diff --git a/public/library/hackbook/03-08-relieving-withdrawal-pangs/index.html b/public/library/hackbook/03-08-relieving-withdrawal-pangs/index.html index e4dcb283..8aa369ff 100644 --- a/public/library/hackbook/03-08-relieving-withdrawal-pangs/index.html +++ b/public/library/hackbook/03-08-relieving-withdrawal-pangs/index.html @@ -4,7 +4,7 @@ 03-08 Relieving Withdrawal Pangs | vodoraslo - + diff --git a/public/library/hackbook/03-09-stress/index.html b/public/library/hackbook/03-09-stress/index.html index 2ec93e90..63141111 100644 --- a/public/library/hackbook/03-09-stress/index.html +++ b/public/library/hackbook/03-09-stress/index.html @@ -4,7 +4,7 @@ 03-09 Stress | vodoraslo - + diff --git a/public/library/hackbook/03-10-boredom/index.html b/public/library/hackbook/03-10-boredom/index.html index f13026e2..a6169dda 100644 --- a/public/library/hackbook/03-10-boredom/index.html +++ b/public/library/hackbook/03-10-boredom/index.html @@ -4,7 +4,7 @@ 03-10 Boredom | vodoraslo - + diff --git a/public/library/hackbook/03-11-concentration/index.html b/public/library/hackbook/03-11-concentration/index.html index 9422574e..44a022eb 100644 --- a/public/library/hackbook/03-11-concentration/index.html +++ b/public/library/hackbook/03-11-concentration/index.html @@ -4,7 +4,7 @@ 03-11 Concentration | vodoraslo - + diff --git a/public/library/hackbook/03-12-relaxation/index.html b/public/library/hackbook/03-12-relaxation/index.html index d9ecd06f..7d28ace1 100644 --- a/public/library/hackbook/03-12-relaxation/index.html +++ b/public/library/hackbook/03-12-relaxation/index.html @@ -4,7 +4,7 @@ 03-12 Relaxation | vodoraslo - + diff --git a/public/library/hackbook/03-13-social-night-pmoing/index.html b/public/library/hackbook/03-13-social-night-pmoing/index.html index 9582b606..67fbdd49 100644 --- a/public/library/hackbook/03-13-social-night-pmoing/index.html +++ b/public/library/hackbook/03-13-social-night-pmoing/index.html @@ -4,7 +4,7 @@ 03-13 Social Night PMOing | vodoraslo - + diff --git a/public/library/hackbook/03-14-what-am-i-giving-up/index.html b/public/library/hackbook/03-14-what-am-i-giving-up/index.html index a1c6fd14..875274a6 100644 --- a/public/library/hackbook/03-14-what-am-i-giving-up/index.html +++ b/public/library/hackbook/03-14-what-am-i-giving-up/index.html @@ -4,7 +4,7 @@ 03-14 What Am I Giving Up? | vodoraslo - + diff --git a/public/library/hackbook/03-15-self-imposed-slavery/index.html b/public/library/hackbook/03-15-self-imposed-slavery/index.html index b2d90240..d3a24117 100644 --- a/public/library/hackbook/03-15-self-imposed-slavery/index.html +++ b/public/library/hackbook/03-15-self-imposed-slavery/index.html @@ -4,7 +4,7 @@ 03-15 Self-Imposed Slavery | vodoraslo - + diff --git a/public/library/hackbook/03-16-i-will-save-x-hours-a-week/index.html b/public/library/hackbook/03-16-i-will-save-x-hours-a-week/index.html index 7530930e..6e11a4fc 100644 --- a/public/library/hackbook/03-16-i-will-save-x-hours-a-week/index.html +++ b/public/library/hackbook/03-16-i-will-save-x-hours-a-week/index.html @@ -4,7 +4,7 @@ 03-16 I Will Save X Hours a Week | vodoraslo - + diff --git a/public/library/hackbook/03-17-health/index.html b/public/library/hackbook/03-17-health/index.html index 63f3f4e3..2840943b 100644 --- a/public/library/hackbook/03-17-health/index.html +++ b/public/library/hackbook/03-17-health/index.html @@ -4,7 +4,7 @@ 03-17 Health | vodoraslo - + diff --git a/public/library/hackbook/03-18-energy/index.html b/public/library/hackbook/03-18-energy/index.html index fa91c4be..12e3aec0 100644 --- a/public/library/hackbook/03-18-energy/index.html +++ b/public/library/hackbook/03-18-energy/index.html @@ -4,7 +4,7 @@ 03-18 Energy | vodoraslo - + diff --git a/public/library/hackbook/03-19-it-relaxes-me-and-gives-me-confidence/index.html b/public/library/hackbook/03-19-it-relaxes-me-and-gives-me-confidence/index.html index 95203f2a..5d94a0ce 100644 --- a/public/library/hackbook/03-19-it-relaxes-me-and-gives-me-confidence/index.html +++ b/public/library/hackbook/03-19-it-relaxes-me-and-gives-me-confidence/index.html @@ -4,7 +4,7 @@ 03-19 It Relaxes Me and Gives Me Confidence | vodoraslo - + diff --git a/public/library/hackbook/03-20-those-sinister-black-shadows/index.html b/public/library/hackbook/03-20-those-sinister-black-shadows/index.html index d4486ba1..c6fc5102 100644 --- a/public/library/hackbook/03-20-those-sinister-black-shadows/index.html +++ b/public/library/hackbook/03-20-those-sinister-black-shadows/index.html @@ -4,7 +4,7 @@ 03-20 Those Sinister Black Shadows | vodoraslo - + diff --git a/public/library/hackbook/03-21-the-willpower-method-of-stopping/index.html b/public/library/hackbook/03-21-the-willpower-method-of-stopping/index.html index dfee7c1e..cec7e730 100644 --- a/public/library/hackbook/03-21-the-willpower-method-of-stopping/index.html +++ b/public/library/hackbook/03-21-the-willpower-method-of-stopping/index.html @@ -4,7 +4,7 @@ 03-21 the Willpower Method of Stopping | vodoraslo - + diff --git a/public/library/hackbook/03-22-beware-of-cutting-down/index.html b/public/library/hackbook/03-22-beware-of-cutting-down/index.html index 67080400..f25cf048 100644 --- a/public/library/hackbook/03-22-beware-of-cutting-down/index.html +++ b/public/library/hackbook/03-22-beware-of-cutting-down/index.html @@ -4,7 +4,7 @@ 03-22 Beware of Cutting Down | vodoraslo - + diff --git a/public/library/hackbook/03-23-just-one-peek/index.html b/public/library/hackbook/03-23-just-one-peek/index.html index 9d88b9ad..8a336046 100644 --- a/public/library/hackbook/03-23-just-one-peek/index.html +++ b/public/library/hackbook/03-23-just-one-peek/index.html @@ -4,7 +4,7 @@ 03-23 Just One Peek | vodoraslo - + diff --git a/public/library/hackbook/03-24-casual-pmoers-teenagers-non-pmoers/index.html b/public/library/hackbook/03-24-casual-pmoers-teenagers-non-pmoers/index.html index 5d12d2cd..b0fabacd 100644 --- a/public/library/hackbook/03-24-casual-pmoers-teenagers-non-pmoers/index.html +++ b/public/library/hackbook/03-24-casual-pmoers-teenagers-non-pmoers/index.html @@ -4,7 +4,7 @@ 03-24 Casual PMOers, Teenagers, Non PMOers | vodoraslo - + diff --git a/public/library/hackbook/03-25-the-youtube-pmoer/index.html b/public/library/hackbook/03-25-the-youtube-pmoer/index.html index b78285db..c5046019 100644 --- a/public/library/hackbook/03-25-the-youtube-pmoer/index.html +++ b/public/library/hackbook/03-25-the-youtube-pmoer/index.html @@ -4,7 +4,7 @@ 03-25 the YouTube PMOer | vodoraslo - + diff --git a/public/library/hackbook/03-26-a-social-habit/index.html b/public/library/hackbook/03-26-a-social-habit/index.html index 8146087b..d9239eff 100644 --- a/public/library/hackbook/03-26-a-social-habit/index.html +++ b/public/library/hackbook/03-26-a-social-habit/index.html @@ -4,7 +4,7 @@ 03-26 a Social Habit? | vodoraslo - + diff --git a/public/library/hackbook/03-27-timing/index.html b/public/library/hackbook/03-27-timing/index.html index 638ab936..2a81aca3 100644 --- a/public/library/hackbook/03-27-timing/index.html +++ b/public/library/hackbook/03-27-timing/index.html @@ -4,7 +4,7 @@ 03-27 Timing | vodoraslo - + diff --git a/public/library/hackbook/03-28-will-i-miss-the-fun/index.html b/public/library/hackbook/03-28-will-i-miss-the-fun/index.html index abf6a2f1..355d2782 100644 --- a/public/library/hackbook/03-28-will-i-miss-the-fun/index.html +++ b/public/library/hackbook/03-28-will-i-miss-the-fun/index.html @@ -4,7 +4,7 @@ 03-28 Will I Miss the Fun? | vodoraslo - + diff --git a/public/library/hackbook/03-29-can-i-compartmentalize/index.html b/public/library/hackbook/03-29-can-i-compartmentalize/index.html index 01d54aaf..26c03089 100644 --- a/public/library/hackbook/03-29-can-i-compartmentalize/index.html +++ b/public/library/hackbook/03-29-can-i-compartmentalize/index.html @@ -4,7 +4,7 @@ 03-29 Can I Compartmentalize? | vodoraslo - + diff --git a/public/library/hackbook/03-30-avoid-false-incentives/index.html b/public/library/hackbook/03-30-avoid-false-incentives/index.html index 16f4b921..b6e14c2d 100644 --- a/public/library/hackbook/03-30-avoid-false-incentives/index.html +++ b/public/library/hackbook/03-30-avoid-false-incentives/index.html @@ -4,7 +4,7 @@ 03-30 Avoid False Incentives | vodoraslo - + diff --git a/public/library/hackbook/03-31-the-easy-way-to-stop/index.html b/public/library/hackbook/03-31-the-easy-way-to-stop/index.html index 628c6656..3bef72a6 100644 --- a/public/library/hackbook/03-31-the-easy-way-to-stop/index.html +++ b/public/library/hackbook/03-31-the-easy-way-to-stop/index.html @@ -4,7 +4,7 @@ 03-31 the Easy Way to Stop | vodoraslo - + diff --git a/public/library/hackbook/03-32-the-withdrawal-period/index.html b/public/library/hackbook/03-32-the-withdrawal-period/index.html index 9f32c9bf..8827d23b 100644 --- a/public/library/hackbook/03-32-the-withdrawal-period/index.html +++ b/public/library/hackbook/03-32-the-withdrawal-period/index.html @@ -4,7 +4,7 @@ 03-32 the Withdrawal Period | vodoraslo - + diff --git a/public/library/hackbook/03-33-just-one-peek/index.html b/public/library/hackbook/03-33-just-one-peek/index.html index f07684d8..83514fe0 100644 --- a/public/library/hackbook/03-33-just-one-peek/index.html +++ b/public/library/hackbook/03-33-just-one-peek/index.html @@ -4,7 +4,7 @@ 03-33 Just One Peek | vodoraslo - + diff --git a/public/library/hackbook/03-34-will-it-be-harder-for-me/index.html b/public/library/hackbook/03-34-will-it-be-harder-for-me/index.html index f2466eb5..ac404035 100644 --- a/public/library/hackbook/03-34-will-it-be-harder-for-me/index.html +++ b/public/library/hackbook/03-34-will-it-be-harder-for-me/index.html @@ -4,7 +4,7 @@ 03-34 Will It Be Harder for Me? | vodoraslo - + diff --git a/public/library/hackbook/03-35-the-main-reasons-for-failure/index.html b/public/library/hackbook/03-35-the-main-reasons-for-failure/index.html index 9d3bc3a0..12cfdab0 100644 --- a/public/library/hackbook/03-35-the-main-reasons-for-failure/index.html +++ b/public/library/hackbook/03-35-the-main-reasons-for-failure/index.html @@ -4,7 +4,7 @@ 03-35 the Main Reasons for Failure | vodoraslo - + diff --git a/public/library/hackbook/03-36-substitutes/index.html b/public/library/hackbook/03-36-substitutes/index.html index 6bbee03b..63e976ce 100644 --- a/public/library/hackbook/03-36-substitutes/index.html +++ b/public/library/hackbook/03-36-substitutes/index.html @@ -4,7 +4,7 @@ 03-36 Substitutes | vodoraslo - + diff --git a/public/library/hackbook/03-37-should-i-avoid-temptation-situations/index.html b/public/library/hackbook/03-37-should-i-avoid-temptation-situations/index.html index c2652af9..4a970bdb 100644 --- a/public/library/hackbook/03-37-should-i-avoid-temptation-situations/index.html +++ b/public/library/hackbook/03-37-should-i-avoid-temptation-situations/index.html @@ -4,7 +4,7 @@ 03-37 Should I Avoid Temptation Situations? | vodoraslo - + diff --git a/public/library/hackbook/03-38-the-moment-of-revelation/index.html b/public/library/hackbook/03-38-the-moment-of-revelation/index.html index fcc29529..9b7d1ca4 100644 --- a/public/library/hackbook/03-38-the-moment-of-revelation/index.html +++ b/public/library/hackbook/03-38-the-moment-of-revelation/index.html @@ -4,7 +4,7 @@ 03-38 the Moment of Revelation | vodoraslo - + diff --git a/public/library/hackbook/03-39-the-final-visit/index.html b/public/library/hackbook/03-39-the-final-visit/index.html index 5e6dcb50..7238a9a0 100644 --- a/public/library/hackbook/03-39-the-final-visit/index.html +++ b/public/library/hackbook/03-39-the-final-visit/index.html @@ -4,7 +4,7 @@ 03-39 the Final Visit | vodoraslo - + diff --git a/public/library/hackbook/03-40-a-final-warning/index.html b/public/library/hackbook/03-40-a-final-warning/index.html index c8d67f7b..3ae5d4c3 100644 --- a/public/library/hackbook/03-40-a-final-warning/index.html +++ b/public/library/hackbook/03-40-a-final-warning/index.html @@ -4,7 +4,7 @@ 03-40 a Final Warning | vodoraslo - + diff --git a/public/library/hackbook/03-41-feedback/index.html b/public/library/hackbook/03-41-feedback/index.html index f00403c7..f0584df7 100644 --- a/public/library/hackbook/03-41-feedback/index.html +++ b/public/library/hackbook/03-41-feedback/index.html @@ -4,7 +4,7 @@ 03-41 Feedback | vodoraslo - + diff --git a/public/library/hackbook/03-42-help-the-pmoer-left-on-the-sinking-ship/index.html b/public/library/hackbook/03-42-help-the-pmoer-left-on-the-sinking-ship/index.html index a3d27197..173317c0 100644 --- a/public/library/hackbook/03-42-help-the-pmoer-left-on-the-sinking-ship/index.html +++ b/public/library/hackbook/03-42-help-the-pmoer-left-on-the-sinking-ship/index.html @@ -4,7 +4,7 @@ 03-42 Help the PMOer Left on the Sinking Ship | vodoraslo - + diff --git a/public/library/hackbook/03-43-advice-to-non-pmoers/index.html b/public/library/hackbook/03-43-advice-to-non-pmoers/index.html index 098e9f9f..a89f3343 100644 --- a/public/library/hackbook/03-43-advice-to-non-pmoers/index.html +++ b/public/library/hackbook/03-43-advice-to-non-pmoers/index.html @@ -4,7 +4,7 @@ 03-43 Advice to Non-PMOers | vodoraslo - + diff --git a/public/library/hackbook/03-44-should-i-tell-my-so/index.html b/public/library/hackbook/03-44-should-i-tell-my-so/index.html index 91258a00..f550b469 100644 --- a/public/library/hackbook/03-44-should-i-tell-my-so/index.html +++ b/public/library/hackbook/03-44-should-i-tell-my-so/index.html @@ -4,7 +4,7 @@ 03-44 Should I Tell My SO | vodoraslo - + diff --git a/public/library/hackbook/04-01-the-instructions/index.html b/public/library/hackbook/04-01-the-instructions/index.html index b5fc810c..e8711b8c 100644 --- a/public/library/hackbook/04-01-the-instructions/index.html +++ b/public/library/hackbook/04-01-the-instructions/index.html @@ -4,7 +4,7 @@ 04-01 the Instructions | vodoraslo - + diff --git a/public/library/hackbook/04-02-rebt-coping-statements/index.html b/public/library/hackbook/04-02-rebt-coping-statements/index.html index 348f198e..69f40612 100644 --- a/public/library/hackbook/04-02-rebt-coping-statements/index.html +++ b/public/library/hackbook/04-02-rebt-coping-statements/index.html @@ -4,7 +4,7 @@ 04-02 REBT Coping Statements | vodoraslo - + diff --git a/public/library/hackbook/05-01-scripts-01/index.html b/public/library/hackbook/05-01-scripts-01/index.html index 01d8129d..7077aad6 100644 --- a/public/library/hackbook/05-01-scripts-01/index.html +++ b/public/library/hackbook/05-01-scripts-01/index.html @@ -4,7 +4,7 @@ 05-01 Scripts-01 | vodoraslo - + diff --git a/public/library/hackbook/05-01-scripts-02/index.html b/public/library/hackbook/05-01-scripts-02/index.html index cfc05160..b8b9b84c 100644 --- a/public/library/hackbook/05-01-scripts-02/index.html +++ b/public/library/hackbook/05-01-scripts-02/index.html @@ -4,7 +4,7 @@ 05-01 Scripts-02 | vodoraslo - + diff --git a/public/library/hackbook/05-01-scripts-03/index.html b/public/library/hackbook/05-01-scripts-03/index.html index 9951e408..430e3f55 100644 --- a/public/library/hackbook/05-01-scripts-03/index.html +++ b/public/library/hackbook/05-01-scripts-03/index.html @@ -4,7 +4,7 @@ 05-01 Scripts-03 | vodoraslo - + diff --git a/public/library/hackbook/05-01-scripts-04/index.html b/public/library/hackbook/05-01-scripts-04/index.html index 35ec7115..dfafc0f3 100644 --- a/public/library/hackbook/05-01-scripts-04/index.html +++ b/public/library/hackbook/05-01-scripts-04/index.html @@ -4,7 +4,7 @@ 05-01 Scripts-04 | vodoraslo - + diff --git a/public/library/hackbook/05-01-scripts-05/index.html b/public/library/hackbook/05-01-scripts-05/index.html index 40dbac15..2c62a89f 100644 --- a/public/library/hackbook/05-01-scripts-05/index.html +++ b/public/library/hackbook/05-01-scripts-05/index.html @@ -4,7 +4,7 @@ 05-01 Scripts-05 | vodoraslo - + diff --git a/public/library/hackbook/fin/index.html b/public/library/hackbook/fin/index.html index 0239d7a8..62a33e04 100644 --- a/public/library/hackbook/fin/index.html +++ b/public/library/hackbook/fin/index.html @@ -4,7 +4,7 @@ Fin | vodoraslo - + diff --git a/public/library/hackbook/index.html b/public/library/hackbook/index.html index 8c5bc0d0..5af51fc5 100644 --- a/public/library/hackbook/index.html +++ b/public/library/hackbook/index.html @@ -4,7 +4,7 @@ Hackbook EasyPeasy - Free Yourself From Pornography | vodoraslo - + diff --git a/public/library/hackbook/index.xml b/public/library/hackbook/index.xml index 0882360e..29e23173 100644 --- a/public/library/hackbook/index.xml +++ b/public/library/hackbook/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/library/index.html b/public/library/index.html index b29d5602..d49491df 100644 --- a/public/library/index.html +++ b/public/library/index.html @@ -4,7 +4,7 @@ Vodoraslo's Library | vodoraslo - + diff --git a/public/library/index.xml b/public/library/index.xml index a861e49d..9050fd2c 100644 --- a/public/library/index.xml +++ b/public/library/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/library/ted-kaczynski/ecofascism-an-aberrant-branch-of-leftism/index.html b/public/library/ted-kaczynski/ecofascism-an-aberrant-branch-of-leftism/index.html index d4b693a0..cd4fde11 100644 --- a/public/library/ted-kaczynski/ecofascism-an-aberrant-branch-of-leftism/index.html +++ b/public/library/ted-kaczynski/ecofascism-an-aberrant-branch-of-leftism/index.html @@ -4,7 +4,7 @@ Ecofascism an Aberrant Branch of Leftism | vodoraslo - + diff --git a/public/library/ted-kaczynski/forward-to-technological-slavery/index.html b/public/library/ted-kaczynski/forward-to-technological-slavery/index.html index f5db4952..d6a6c436 100644 --- a/public/library/ted-kaczynski/forward-to-technological-slavery/index.html +++ b/public/library/ted-kaczynski/forward-to-technological-slavery/index.html @@ -4,7 +4,7 @@ Forward to Technological Slavery | vodoraslo - + diff --git a/public/library/ted-kaczynski/hit-where-it-hurts/index.html b/public/library/ted-kaczynski/hit-where-it-hurts/index.html index 56887526..0f5436c6 100644 --- a/public/library/ted-kaczynski/hit-where-it-hurts/index.html +++ b/public/library/ted-kaczynski/hit-where-it-hurts/index.html @@ -4,7 +4,7 @@ Hit Where It Hurts | vodoraslo - + diff --git a/public/library/ted-kaczynski/index.html b/public/library/ted-kaczynski/index.html index 678352e8..a03d3a59 100644 --- a/public/library/ted-kaczynski/index.html +++ b/public/library/ted-kaczynski/index.html @@ -4,7 +4,7 @@ Ted Kaczynski's Works | vodoraslo - + diff --git a/public/library/ted-kaczynski/index.xml b/public/library/ted-kaczynski/index.xml index 1ceb622b..04ce22ff 100644 --- a/public/library/ted-kaczynski/index.xml +++ b/public/library/ted-kaczynski/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/library/ted-kaczynski/industrial-society-and-its-future/index.html b/public/library/ted-kaczynski/industrial-society-and-its-future/index.html index 753e1f07..b93bcb2c 100644 --- a/public/library/ted-kaczynski/industrial-society-and-its-future/index.html +++ b/public/library/ted-kaczynski/industrial-society-and-its-future/index.html @@ -4,7 +4,7 @@ Industrial Society and Its Future | vodoraslo - + diff --git a/public/library/ted-kaczynski/morality-and-revolution/index.html b/public/library/ted-kaczynski/morality-and-revolution/index.html index 90de7960..19f89a53 100644 --- a/public/library/ted-kaczynski/morality-and-revolution/index.html +++ b/public/library/ted-kaczynski/morality-and-revolution/index.html @@ -4,7 +4,7 @@ Morality and Revolution | vodoraslo - + diff --git a/public/library/ted-kaczynski/progress-vs-liberty/index.html b/public/library/ted-kaczynski/progress-vs-liberty/index.html index 8d866ceb..93e5b4e5 100644 --- a/public/library/ted-kaczynski/progress-vs-liberty/index.html +++ b/public/library/ted-kaczynski/progress-vs-liberty/index.html @@ -4,7 +4,7 @@ Progress vs Liberty | vodoraslo - + diff --git a/public/library/ted-kaczynski/ship-of-fools/index.html b/public/library/ted-kaczynski/ship-of-fools/index.html index 2c9ec979..a1949fc4 100644 --- a/public/library/ted-kaczynski/ship-of-fools/index.html +++ b/public/library/ted-kaczynski/ship-of-fools/index.html @@ -4,7 +4,7 @@ Ship of Fools | vodoraslo - + diff --git a/public/library/ted-kaczynski/the-littering-ape/index.html b/public/library/ted-kaczynski/the-littering-ape/index.html index eeaceb9c..b21183cf 100644 --- a/public/library/ted-kaczynski/the-littering-ape/index.html +++ b/public/library/ted-kaczynski/the-littering-ape/index.html @@ -4,7 +4,7 @@ The Littering Ape | vodoraslo - + diff --git a/public/library/ted-kaczynski/the-long-term-outcome-of-geo-engineering/index.html b/public/library/ted-kaczynski/the-long-term-outcome-of-geo-engineering/index.html index 197e94b8..2c83fcd7 100644 --- a/public/library/ted-kaczynski/the-long-term-outcome-of-geo-engineering/index.html +++ b/public/library/ted-kaczynski/the-long-term-outcome-of-geo-engineering/index.html @@ -4,7 +4,7 @@ The Long Term Outcome of Geo Engineering | vodoraslo - + diff --git a/public/library/ted-kaczynski/the-road-to-revolution/index.html b/public/library/ted-kaczynski/the-road-to-revolution/index.html index 6d0bb716..51863945 100644 --- a/public/library/ted-kaczynski/the-road-to-revolution/index.html +++ b/public/library/ted-kaczynski/the-road-to-revolution/index.html @@ -4,7 +4,7 @@ The Road to Revolution | vodoraslo - + - + - + diff --git a/public/library/ted-kaczynski/the-truth-about-primitive-life-a-critique-of-anarchoprimitivism/index.html b/public/library/ted-kaczynski/the-truth-about-primitive-life-a-critique-of-anarchoprimitivism/index.html index 2b251a9d..1deea5d2 100644 --- a/public/library/ted-kaczynski/the-truth-about-primitive-life-a-critique-of-anarchoprimitivism/index.html +++ b/public/library/ted-kaczynski/the-truth-about-primitive-life-a-critique-of-anarchoprimitivism/index.html @@ -4,7 +4,7 @@ The Truth About Primitive Life a Critique of Anarchoprimitivism | vodoraslo - + diff --git a/public/library/ted-kaczynski/when-non-violence-is-suicide/index.html b/public/library/ted-kaczynski/when-non-violence-is-suicide/index.html index 8cf66ac7..6ed4c5ca 100644 --- a/public/library/ted-kaczynski/when-non-violence-is-suicide/index.html +++ b/public/library/ted-kaczynski/when-non-violence-is-suicide/index.html @@ -4,7 +4,7 @@ When Non-Violence Is Suicide | vodoraslo - + diff --git a/public/library/ted-kaczynski/why-the-technological-system-will-destroy-itself/index.html b/public/library/ted-kaczynski/why-the-technological-system-will-destroy-itself/index.html index 046b7368..d3393edf 100644 --- a/public/library/ted-kaczynski/why-the-technological-system-will-destroy-itself/index.html +++ b/public/library/ted-kaczynski/why-the-technological-system-will-destroy-itself/index.html @@ -4,7 +4,7 @@ Why the Technological System Will Destroy Itself | vodoraslo - + diff --git a/public/style.css b/public/style.css index 51337821..686f27c6 100644 --- a/public/style.css +++ b/public/style.css @@ -338,6 +338,21 @@ article { color: var(--fg) } +.highlight-title{ + background: #282c34; + color: white; + /* border: 1px solid var(--strong); */ + border-radius: 20px; + padding: .55em; + white-space: pre-wrap; + overflow-wrap: break-word; + max-width: 800px; + margin: auto; + font-family: 'FiraCode'; + font-weight: 600; +} + + #tag_blog:before {content: "📜";} #tag_updates:before {content: "🆕";} diff --git a/public/tags/blog/index.html b/public/tags/blog/index.html index d40cc80b..aefec9a9 100644 --- a/public/tags/blog/index.html +++ b/public/tags/blog/index.html @@ -4,7 +4,7 @@ Blog | vodoraslo - + diff --git a/public/tags/blog/index.xml b/public/tags/blog/index.xml index c967c301..c00aceb8 100644 --- a/public/tags/blog/index.xml +++ b/public/tags/blog/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/tags/hackbook/index.html b/public/tags/hackbook/index.html index d97c4f82..6ef2a8e9 100644 --- a/public/tags/hackbook/index.html +++ b/public/tags/hackbook/index.html @@ -4,7 +4,7 @@ Hackbook EasyPeasy - Free Yourself From Pornography | vodoraslo - + diff --git a/public/tags/hackbook/index.xml b/public/tags/hackbook/index.xml index 778df39b..003e8845 100644 --- a/public/tags/hackbook/index.xml +++ b/public/tags/hackbook/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/tags/index.html b/public/tags/index.html index ed88683a..d047f0ad 100644 --- a/public/tags/index.html +++ b/public/tags/index.html @@ -4,7 +4,7 @@ Tags | vodoraslo - + diff --git a/public/tags/index.xml b/public/tags/index.xml index 6457dce8..f790b2b0 100644 --- a/public/tags/index.xml +++ b/public/tags/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/tags/library/index.html b/public/tags/library/index.html index 75519885..6737f544 100644 --- a/public/tags/library/index.html +++ b/public/tags/library/index.html @@ -4,7 +4,7 @@ Library | vodoraslo - + diff --git a/public/tags/library/index.xml b/public/tags/library/index.xml index 567dbacd..ccdf28b3 100644 --- a/public/tags/library/index.xml +++ b/public/tags/library/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/tags/personal/index.html b/public/tags/personal/index.html index 7e8c42d3..40b98c1e 100644 --- a/public/tags/personal/index.html +++ b/public/tags/personal/index.html @@ -4,7 +4,7 @@ Personal | vodoraslo - + diff --git a/public/tags/personal/index.xml b/public/tags/personal/index.xml index e4461a25..970085e4 100644 --- a/public/tags/personal/index.xml +++ b/public/tags/personal/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/tags/ted-kaczynski/index.html b/public/tags/ted-kaczynski/index.html index da9794ff..62bd7857 100644 --- a/public/tags/ted-kaczynski/index.html +++ b/public/tags/ted-kaczynski/index.html @@ -4,7 +4,7 @@ Ted Kaczynski | vodoraslo - + diff --git a/public/tags/ted-kaczynski/index.xml b/public/tags/ted-kaczynski/index.xml index 755ed777..ef75c3fd 100644 --- a/public/tags/ted-kaczynski/index.xml +++ b/public/tags/ted-kaczynski/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/public/tags/updates/index.html b/public/tags/updates/index.html index 2e0afc5d..34167302 100644 --- a/public/tags/updates/index.html +++ b/public/tags/updates/index.html @@ -4,7 +4,7 @@ Updates | vodoraslo - + diff --git a/public/tags/updates/index.xml b/public/tags/updates/index.xml index 6a81b3ee..6934c411 100644 --- a/public/tags/updates/index.xml +++ b/public/tags/updates/index.xml @@ -35,10 +35,21 @@ <p>I for the life of me couldn&rsquo;t get synapse&rsquo;s (matrix&rsquo;s) federation to work. It said that the encryption couldn&rsquo;t be trusted, i could join public rooms but i couldn&rsquo;t start any chats, i couldn&rsquo;t invite people to my rooms, i couldn&rsquo;t get invited to rooms.</p> <h2 id="how-i-fixed-it">How I fixed it</h2> <p>Go to your <code>homeserver.yaml</code> file</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml -</span></span></code></pre></div><p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> -<pre tabindex="0"><code>trusted_key_servers: [] -</code></pre> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nano /etc/matrix-synapse/homeserver.yaml</span></span></code></pre></div> + +<p>and go all the way to the bottom or search for <code>trusted_key_servers</code>. it&rsquo;s probably going to be <code>matrix.org</code>. You should change it to the following by removing <code>matrix.org</code> and leave blank square brackets:</p> + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">trusted_key_servers: []</code></pre> + </div> + @@ -609,28 +620,46 @@ Like Kurzweil, many techies stand to profit financially from Technianity, but it <p>I actually updated the css once more.</p> <p>If you&rsquo;re using a dark theme in your browser, the website will follow suit and change to darker colors.</p> <p>I did this by setting the light theme to be by default for more readability:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>:<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#fafafa</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#d19a66">#2f343f</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#4084d6</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">93</span>, <span style="color:#d19a66">93</span>, <span style="color:#d19a66">99</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>and then this checks that if the user prefers a darker theme, they shall get a dark theme. Simple as that really, I didn&rsquo;t know this stuff existed, thought webshits just use java script for everything, but I guess I&rsquo;m wrong.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span>@<span style="color:#c678dd">media</span> <span style="color:#c7bf54">(</span><span style="color:#e06c75">prefers-color-scheme</span><span style="color:#c7bf54">:</span> <span style="color:#e06c75">dark</span><span style="color:#c7bf54">)</span> { </span></span><span style="display:flex;"><span> :<span style="color:#e5c07b">root</span> { </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--bg</span>: <span style="color:#d19a66">#141414</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--fg</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">232</span>, <span style="color:#d19a66">228</span>, <span style="color:#d19a66">228</span>); </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--links</span>: <span style="color:#d19a66">#5da0f2</span>; </span></span><span style="display:flex;"><span> <span style="color:#dcaeea">--muted_text</span>: <span style="color:#ef8383">rgb</span>(<span style="color:#d19a66">179</span>, <span style="color:#d19a66">182</span>, <span style="color:#d19a66">186</span>); </span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><p>And this is how CSS variables are used:</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + +<p>And this is how CSS variables are used:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#e06c75">body</span> { </span></span><span style="display:flex;"><span> <span style="color:#c678dd">font-family</span>: <span style="color:#b756ff;font-weight:bold">sans-serif</span>; </span></span><span style="display:flex;"><span> <span style="color:#c678dd">background</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">bg</span>); </span></span><span style="display:flex;"><span> <span style="color:#c678dd">color</span>: <span style="color:#00b1f7">var</span>(<span style="color:#c7bf54">--</span><span style="color:#c1abea">fg</span>); -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div> +</span></span><span style="display:flex;"><span>}</span></span></code></pre></div> + + @@ -3030,28 +3059,52 @@ List of Works Cited</p> <li>Add the following line inside it</li> </ol> <p>For config.toml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] -</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span> -</span></span></code></pre></div><p>For config.yaml</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: -</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span> -</span></span></code></pre></div><p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#c1abea">params</span>] +</span></span><span style="display:flex;"><span> <span style="color:#c1abea">description</span> = <span style="color:#63c381">&#34;The global meta description of your website&#34;</span></span></span></code></pre></div> + +<p>For config.yaml</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#e06c75">params</span>: +</span></span><span style="display:flex;"><span> <span style="color:#e06c75">description</span>: <span style="color:#98c379">The global meta description of your website</span></span></span></code></pre></div> + +<p>It won&rsquo;t work just yet because you have to update the <code>baseof.html</code> file.</p> <h3 id="updating-the-baseofhtml-file">Updating the baseof.html file</h3> <ol> <li>Locate baseof.html</li> <li>Add or change the meta description line with the following</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt; -</span></span></code></pre></div><p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span style="display:flex;"><span>&lt;<span style="color:#e06c75">meta</span> <span style="color:#b3d23c">name</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;description&#34;</span> <span style="color:#b3d23c">content</span><span style="color:#c7bf54">=</span><span style="color:#98c379">&#34;{{ if .Page.Params.description }}{{ .Page.Params.description }}{{ else if .Summary}}{{ .Summary }}{{else}}{{ .Site.Params.description}}{{ end }}&#34;</span>/&gt;</span></span></code></pre></div> + +<p>And now if you start your Hugo server locally with <code>hugo serve --noHTTPCache</code> and you right click on your page -&gt; View Page Source -&gt; Search for the meta description tag. It should match what you left in the config file.</p> <h3 id="replacing-the-global-description-with-a-custom-one">Replacing the global description with a custom one</h3> <ol> <li>Have a markdown file ready</li> <li>In the preamble, add</li> </ol> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#76a9f9">---</span> </span></span><span style="display:flex;"><span><span style="color:#e06c75">description</span>: <span style="color:#63c381">&#34;Your custom description for this page&#34;</span> -</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span> -</span></span></code></pre></div><p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> +</span></span><span style="display:flex;"><span><span style="color:#76a9f9">---</span></span></span></code></pre></div> + +<p>Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it!</p> @@ -3065,19 +3118,28 @@ List of Works Cited</p> <p>I wanted to order <a href="https://vodoraslo.xyz/library/hackbook">Hackbook</a> in reverse (i.e. oldest to newest) so that it&rsquo;s easier for the reader to start at the correct page.</p> <p>I ran into the following problem - the default <code>list.html</code> does them from newest to oldest.</p> <p>So I found <a href="https://discourse.gohugo.io/t/two-home-pages/31312/9">this forum post</a> and I created a file in the <code>_default</code> directory as follows:</p> -<pre tabindex="0"><code>layouts + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">layouts |----**_default** |-------**hackbook** |-----------**order-by-oldest.html** |-------baseof.html |-------index.html |-------list.html -|-------single.html -</code></pre> +|-------single.html </code></pre> + </div> + <figure ><img src="https://vodoraslo.xyz/img/custom-index-directory.PNG" alt="Picture of the directory"></figure> <p>I named my file order by oldest because I plan on reusing it in other places. This is what&rsquo;s contained inside it:</p> -<pre tabindex="0"><code>{{ define &#34;title&#34; -}} + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">{{ define &#34;title&#34; -}} {{ .Title | title }} {{- end }} {{ define &#34;main&#34; -}} @@ -3093,8 +3155,9 @@ List of Works Cited</p> &lt;/li&gt; {{- end }} &lt;/ul&gt; -{{- end }} -</code></pre><p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> +{{- end }}</code></pre> + </div> +<p>If you want to display the date on the left of the titles, you have to add <code>datesinlist=true</code> in your config.toml or <code>datesinlist: true</code> in your config.yaml</p> <p>You probably don&rsquo;t need <code>enableGitInfo = true</code> as that will crash your website, I have no idea what it does, you don&rsquo;t need it.</p> <h2 id="using-your-custom-_indexhtml">Using your custom _index.html</h2> <p>After creating your custom _index.html you&rsquo;d use it as follows:</p> @@ -3107,7 +3170,11 @@ List of Works Cited</p> <p>And now you should have a custom _index.html for your pages! :)</p> <p>Here is a verbose copy paste of the original hugo forum answer in case it gets deleted:</p> -<pre tabindex="0"><code>Content structure: + + + <div class="highlight"> + + <pre tabindex="0"><code class="language-" data-lang="">Content structure: content ├── better @@ -3120,13 +3187,13 @@ content content/better/_index.md -+++ +&#43;&#43;&#43; title = &#34;Better&#34; date = 2021-03-04T17:02:42-08:00 draft = false type = &#34;post&#34; layout = &#34;posts-by-lastmod&#34; -+++ +&#43;&#43;&#43; Template structure: @@ -3159,8 +3226,9 @@ layouts/index.html config.toml (see https://gohugo.io/variables/git/#lastmod) -enableGitInfo = true -</code></pre> +enableGitInfo = true</code></pre> + </div> + @@ -5162,8 +5230,14 @@ formed does not list Internet pornography as one of the addictions that it provi <h3 id="this-is-my-first-entry-and-im-already-having-issues-lol">this is my first entry and i&rsquo;m already having issues lol</h3> <p>So I wanted to make a quick entry, see how it looks like and I stumbled upon this issue of hugo pluralzing Blog into Blogs</p> <p>You can fix this in config.toml with the following line</p> -<div class="highlight"><pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span> -</span></span></code></pre></div> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#c1abea">pluralizelisttitles</span> = <span style="color:#b756ff;font-weight:bold">false</span></span></span></code></pre></div> + + diff --git a/static/style.css b/static/style.css index 51337821..686f27c6 100644 --- a/static/style.css +++ b/static/style.css @@ -338,6 +338,21 @@ article { color: var(--fg) } +.highlight-title{ + background: #282c34; + color: white; + /* border: 1px solid var(--strong); */ + border-radius: 20px; + padding: .55em; + white-space: pre-wrap; + overflow-wrap: break-word; + max-width: 800px; + margin: auto; + font-family: 'FiraCode'; + font-weight: 600; +} + + #tag_blog:before {content: "📜";} #tag_updates:before {content: "🆕";} diff --git a/themes/lugo/layouts/_default/baseof.html b/themes/lugo/layouts/_default/baseof.html index 07330aea..e4c07dc8 100644 --- a/themes/lugo/layouts/_default/baseof.html +++ b/themes/lugo/layouts/_default/baseof.html @@ -4,7 +4,7 @@ {{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }} - + {{ with .Site.Params.favicon }} {{ end -}}