Compare commits
3 Commits
976e1f73ad
...
8834ee3951
Author | SHA1 | Date |
---|---|---|
Luca | 8834ee3951 | |
Luca | 8669d7199d | |
Luca | 1f925cc1ec |
|
@ -2,3 +2,10 @@
|
||||||
|
|
||||||
1. Build Docker image: `docker build -t hugo .`
|
1. Build Docker image: `docker build -t hugo .`
|
||||||
2. Run container: `docker run --rm -v $PWD:/var/www/html -p 1313:1313 hugo`
|
2. Run container: `docker run --rm -v $PWD:/var/www/html -p 1313:1313 hugo`
|
||||||
|
|
||||||
|
## Create a new news post
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export TITLE="insert-title-here"
|
||||||
|
hugo new "news/$TITLE.md" && cp "content/news/$TITLE.md" "content/news/$TITLE.de.md"
|
||||||
|
```
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
date: {{ .Date }}
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
parent: News
|
||||||
|
---
|
||||||
|
|
|
@ -83,7 +83,7 @@ ul {
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-flow: column wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
&.nav-main {
|
&.nav-main {
|
||||||
|
@ -132,3 +132,7 @@ ul {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main>
|
<main>
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
<p>{{ .Date.Format "2006-01-02 15:04" }}</p>
|
<p class="date">{{ .Date.Format "2006-01-02 15:04" }}</p>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue