feat: init

This commit is contained in:
Flinner 2022-02-08 21:56:15 +03:00
commit aaa02408a0
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
20 changed files with 245 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/.hugo_build.lock

6
archetypes/default.md Normal file
View File

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

16
config.toml Normal file
View File

@ -0,0 +1,16 @@
baseURL = "https://flinner.nand.sh"
title = "I don't know what I am doing!"
theme = "emacsy"
[menu]
[[menu.main]]
identifier = "posts"
name = "Posts"
url = "/posts"
weight = 10
[[menu.main]]
identifier = "about"
name = "About"
url = "/about"
weight = 20

9
content/_index.md Normal file
View File

@ -0,0 +1,9 @@
---
title: "Home"
---
# Hi there
Welcome to your new Hugo site.
Now go build something great.

5
content/about/index.md Normal file
View File

@ -0,0 +1,5 @@
---
title: "About"
---
Here's a bit about me.

View File

@ -0,0 +1,6 @@
---
title: "My First Post"
date: 2020-09-03T17:27:59+07:00
---
Here's an example blog post.

View File

@ -0,0 +1,4 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
---

View File

@ -0,0 +1,16 @@
baseURL = "https://mynewhugosite.com"
title = "My New Hugo Site"
theme = "hugo-starter"
[menu]
[[menu.main]]
identifier = "posts"
name = "Posts"
url = "/posts"
weight = 10
[[menu.main]]
identifier = "about"
name = "About"
url = "/about"
weight = 20

View File

@ -0,0 +1,9 @@
---
title: "Home"
---
# Hi there
Welcome to your new Hugo site.
Now go build something great.

View File

@ -0,0 +1,5 @@
---
title: "About"
---
Here's a bit about me.

View File

@ -0,0 +1,6 @@
---
title: "My First Post"
date: 2020-09-03T17:27:59+07:00
---
Here's an example blog post.

View File

@ -0,0 +1,9 @@
{{ partial "header.html" . }}
<h1>Page Not Found</h1>
<p>This page doesn't exist.</p>
<p><a href="/">Go back to the home page</a></p>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,18 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range.Data.Pages }}
<article class="post-snippet">
<h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .Date.Format "January 2, 2006" }}
</time>
</article>
{{ end }}
{{ partial "footer.html" . }}

View File

@ -0,0 +1,7 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ partial "footer.html" . }}

View File

@ -0,0 +1,5 @@
{{ partial "header.html" . }}
{{ .Content }}
{{ partial "footer.html" . }}

View File

@ -0,0 +1,8 @@
</main>
<footer>
<p>&copy;{{ dateFormat "2006" now }} {{ .Site.Title }}</p>
</footer>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<link rel="stylesheet" href="/css/style.css" type="text/css" media="all" />
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
</head>
<body>
{{ partial "nav.html" . }}
<main class="content">

View File

@ -0,0 +1,14 @@
<header class="site-header">
<nav class="site-nav">
<a class="logo" href="{{ .Site.BaseURL }}">
{{ .Site.Title }}
</a>
<ul class="main-menu">
{{ range.Site.Menus.main }}
<li>
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</nav>
</header>

20
themes/emacsy/readme.md Normal file
View File

@ -0,0 +1,20 @@
# Hugo Starter Theme
Dead-simple Hugo theme with everything you need to get started. Intended to be a starter for creating your own theme without including useless bloat like most Hugo themes.
## Getting started
Inside your project folder, copy the theme to your `themes` folder. Since you're just using it as a starter for your theme, remove the git history.
```bash
git clone https://github.com/ericmurphyxyz/hugo-starter-theme themes/your-theme-name
rm -rf themes/your-theme-name/.git
```
If you'd like some example content and an example config file to get started, you can copy the `exampleSite` directory into your root Hugo directory.
```bash
cp -r themes/your-theme-name/exampleSite/* ./
```
To learn more about building themes in Hugo, refer to Hugo's [templating documentation](https://gohugo.io/templates/).

View File

@ -0,0 +1,59 @@
/* LAYOUT */
body {
color: #333;
font-size: 125%;
line-height: 1.5;
max-width: 45rem;
padding: 1rem;
margin: 0 auto;
}
.content {
margin-bottom: 2rem;
}
/* NAVIGATION */
.site-nav {
display: flex;
}
.site-nav a {
display: block;
padding: 1rem;
}
.site-nav .logo {
font-weight: bold;
padding-left: 0;
}
.main-menu {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}
@media screen and (max-width: 48rem) {
.site-nav,
.main-menu {
flex-direction: column;
}
.site-nav a {
padding: 0.5rem;
padding-left: 0;
}
}
/* LISTS */
.post-snippet {
margin-bottom: 1rem;
}
.post-snippet h3 {
margin-bottom: 0.25rem;
}