diff options
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | archetypes/default.md | 2 | ||||
-rw-r--r-- | config.toml | 7 | ||||
-rw-r--r-- | content/_index.md | 3 | ||||
-rw-r--r-- | content/blog/_index.md | 1 | ||||
-rw-r--r-- | content/blog/dns-over-tls.md | 5 | ||||
-rw-r--r-- | content/blog/git-server.md | 5 | ||||
-rw-r--r-- | content/blog/hello.md | 2 | ||||
-rw-r--r-- | content/contact.md | 3 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 20 | ||||
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/blog/single.html | 18 |
12 files changed, 62 insertions, 22 deletions
@@ -1,3 +1,15 @@ -# Work in progress +# About this project -I am moving my blog from plain HTML and CSS to Hugo. +This code is used to build [my website](https://matejamaric.com) using [Hugo](https://gohugo.io/). + +It doesn't use any prebuilt theme. Source Markdown files are in `content` directory. +The way site is build is described in `layouts` directory. +General structure and navbar of every page is described in `layouts/_default/baseof.html` template. +Structure of blog posts is described in `layouts/blog/single.html`. + +# How to build + +Install [Hugo](https://gohugo.io/) and just run `hugo` command which will generate `public` directory +that contains the files you can host pretty much anywhere. + +You can also run `hugo server` which will start development web server on <http://localhost:1313>. diff --git a/archetypes/default.md b/archetypes/default.md index 00e77bd..bed9f4e 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,6 +1,8 @@ --- title: "{{ replace .Name "-" " " | title }}" +description: "" date: {{ .Date }} +lastmod: {{ .Date }} draft: true --- diff --git a/config.toml b/config.toml index 8ecce48..f320c8f 100644 --- a/config.toml +++ b/config.toml @@ -1,3 +1,8 @@ baseURL = "https://matejamaric.com/" -languageCode = "en-us" +languageCode = "en" title = "Mateja Maric's Homepage" +# Disable default taxonomies +disableKinds = ["taxonomy", "term"] +# Enable inline HTML +[markup.goldmark.renderer] +unsafe = true diff --git a/content/_index.md b/content/_index.md index 7c5e2c9..e1466a7 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,9 +1,10 @@ --- title: "Mateja Maric's Homepage" +description: "I am Mateja Maric and this is my personal web site. I am a student from Belgrade, Serbia. I am primarily interested in Unix-like operating systems and free(as in freedom) software." draft: false --- -I am Mateja Maric, a 19 years old student from Belgrade, Serbia. +I am Mateja Maric, a 20 years old student from Belgrade, Serbia. I was interested in computers ever since I laid my hands on one and I taught myself to program in C++ when I was 12 years old. Throughout the years I learned bunch of other programming languages and technologies. diff --git a/content/blog/_index.md b/content/blog/_index.md index 37a30aa..ab569cf 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,5 +1,6 @@ --- title: "Mateja Maric's Blog" +description: "This is my personal blog where I occasionally post technology related stuff." draft: false --- diff --git a/content/blog/dns-over-tls.md b/content/blog/dns-over-tls.md index 5a52b62..3f93787 100644 --- a/content/blog/dns-over-tls.md +++ b/content/blog/dns-over-tls.md @@ -1,6 +1,8 @@ --- title: "DNS over TLS on Arch Linux" date: 2020-08-20 +lastmod: 2020-08-20 +description: "In this guide I will show you how to set up DNS over TLS on Arch Linux using systemd-resolved." slug: "dns-over-tls" draft: false --- @@ -40,4 +42,5 @@ This is how your `/etc/NetworkManager/NetworkManger.conf` should look like: **You will probably need to restart your computer for changes to take effect.** -If you found any mistakes or that something is outdated, please [contact me](/contact/). +If you found any mistakes or that something is outdated, please +feel free to [contact me](/contact/) or contribute to [this site's repository](https://github.com/MatejaMaric/blog). diff --git a/content/blog/git-server.md b/content/blog/git-server.md index fc6ebef..c82d0be 100644 --- a/content/blog/git-server.md +++ b/content/blog/git-server.md @@ -1,6 +1,8 @@ --- title: "Set up your own Smart HTTP Git Server with Gitolite, Cgit and Apache" date: 2020-08-10 +lastmod: 2020-08-10 +description: "This guide is for people want to setup their own git server but don’t want something as big as GitLab or Gitea, and don’t want something overly simple like bare git repository over SSH." slug: "git-server" draft: false --- @@ -261,7 +263,8 @@ You can just append this to your `httpd-vhosts-le-ssl.conf` file, you should of Don't forget to restart Apache for changes to take effect! That's all, hope you like your new git server! -If you found any mistakes, or that something is outdated, badly explained or you have something to add, feel free to [contact me](/contact/). +If you found any mistakes, or that something is outdated, badly explained or you have something to add, +feel free to [contact me](/contact/) or contribute to [this site's repository](https://github.com/MatejaMaric/blog). ## Resources - <https://wiki.archlinux.org/index.php/Git_server> diff --git a/content/blog/hello.md b/content/blog/hello.md index 2adca90..ce4e7fc 100644 --- a/content/blog/hello.md +++ b/content/blog/hello.md @@ -1,6 +1,8 @@ --- title: "Hello World!" date: 2019-09-10 +lastmod: 2019-09-10 +description: "My site is online and this post is used to mark the event!" draft: false --- diff --git a/content/contact.md b/content/contact.md index fe6d43f..6156eff 100644 --- a/content/contact.md +++ b/content/contact.md @@ -1,9 +1,10 @@ --- title: "Mateja Maric's Contact Page" +description: "Here you can find my contact information such as email and GPG key if you want to use it." draft: false --- -You can send me an e-mail at: <a href="mailto:mail@matejamaric.com">mail@matejamaric.com</a> +You can send me an e-mail at: mail@matejamaric.com <b>Please, check your spam folder!</b> <br>Sometimes big e-mail providers put e-mail from smaller domains in spam folder, Microsoft is especially notorious for this practice. diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 694d8a0..56e582c 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,12 +5,10 @@ <meta name="yandex-xverification" content="fc9dd63070a12909"> <meta charset="UTF-8" /> <meta author="Mateja Maric" /> - - <!--<meta name="description"--> - <!--content="I am Mateja Maric and this is my personal web site. I am a student from Belgrade, Serbia. I am primarily interested in Unix-like operating systems and free(as in freedom) software.">--> - <!--<meta name="keywords" content="mateja, maric, homepage, site, blog, contact">--> - <!--<link rel="canonical" href="https://matejamaric.com" />--> - + {{ if .Description }} + <meta name="description" content="{{ .Description }}"> + {{ end }} + <link rel="canonical" href="{{ .Permalink }}" /> <meta name="viewport" content="width=device-width initial-scale=1.0" /> <link href="/style.css" rel="stylesheet" type="text/css" /> <title>{{ .Title }}</title> @@ -19,11 +17,11 @@ <body> <nav> <div class="mm">Mateja Maric</div> - <a class="{{ if eq .URL `/`}}active{{ end }}" href="/">Home</a> - <a class="{{ if eq .URL `/blog/`}}active{{ end }}" href="/blog/">Blog</a> - <a href="https://github.com/MatejaMaric">GitHub</a> - <a href="https://git.matejamaric.com">Git server</a> - <a class="{{ if eq .URL `/contact/`}}active{{ end }}" href="/contact/">Contact</a> + <a {{ if eq .RelPermalink "/" }} class="active" {{ end }} href="/">Home</a> + <a {{ if eq .RelPermalink "/blog/" }} class="active" {{ end }} href="/blog/">Blog</a> + <a target="_blank" href="https://github.com/MatejaMaric">GitHub</a> + <a target="_blank" href="https://git.matejamaric.com">Git server</a> + <a {{ if eq .RelPermalink "/contact/" }} class="active" {{ end }} href="/contact/">Contact</a> </nav> <main> {{ block "main" . }}{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 2fcfeba..2051961 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,7 +3,7 @@ <h3>Posts</h3> <ul> {{ range .Pages }} - <li>{{ .Date.Format "2 Jan 2006" }} - <a href="{{ .URL }}">{{ .Title }}</a></li> + <li>{{ .Date.Format "2 Jan 2006" }} - <a href="{{ .RelPermalink }}">{{ .Title }}</a></li> {{ end }} </ul> {{ end }} diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 4db531d..50ec4d8 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -1,7 +1,19 @@ {{ define "main" }} -<h1>{{ .Title }}</h1> +<div itemscope itemtype="http://schema.org/Article"> + <h1 itemprop="headline">{{ .Title }}</h1> -<em>{{ .Date.Format "2 Jan 2006" }}</em> + <em> + Published: + <time itemprop="dateCreated" datetime="{{ .Date.Format `2006-01-02` }}">{{ .Date.Format "2 Jan 2006" }}</time> + {{ if not (eq .Lastmod .Date) }} + <br>Modified: + <time itemprop="dateModified" + datetime="{{ .Lastmod.Format `2006-01-02` }}">{{ .Lastmod.Format "2 Jan 2006" }}</time> + {{ end }} + </em> -{{ .Content }} + <div itemprop="articleBody"> + {{ .Content }} + </div> +</div> {{ end }} |