Skip to content

Commit

Permalink
setup simple site
Browse files Browse the repository at this point in the history
  • Loading branch information
tobi-werner committed Apr 29, 2023
1 parent 1eb8791 commit 60a61ee
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
/.hugo_build.lock
File renamed without changes.
5 changes: 4 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
baseURL = 'http://example.org/'
baseURL = 'https://wwww.twapps.net/'
languageCode = 'en-us'
title = 'My New Hugo Site'

[params]
name = "Tobias Werner"
Empty file removed content/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Home
---
This is the homepage.
5 changes: 5 additions & 0 deletions content/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: About
hide_footer: true
---
This is the about page.
Empty file removed layouts/.gitkeep
Empty file.
15 changes: 15 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html>

<head>
{{ partial "meta.html" . }}
</head>

<body>
{{partial "nav.html"}}
{{ block "main" . }}
{{ end }}
</body>
{{ partial "footer.html" . }}

</html>
4 changes: 4 additions & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ define "main" }}
<h1>LIST</h1>
{{ .Content }}
{{ end }}
4 changes: 4 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ define "main" }}
<h1>SINGLE</h1>
{{ .Content }}
{{ end }}
7 changes: 7 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ with .Params.hide_footer }}
<!-- No footer here! -->
{{ else }}
<footer>
Copyright {{ .Site.Params.name }} {{2015}}-{{ now.Year }}
</footer>
{{ end }}
4 changes: 4 additions & 0 deletions layouts/partials/meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<meta charset="utf-8">
<title>{{ print .Page.Title }}</title>
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS | resources.Minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
7 changes: 7 additions & 0 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about/">About</a></li>
{{/* <li><a href="/posts/">Blog</a></li> */}}
</ul>
</nav>

0 comments on commit 60a61ee

Please sign in to comment.