Add 'news' archetype
This commit is contained in:
parent
976e1f73ad
commit
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
|
||||||
|
---
|
||||||
|
|
Loading…
Reference in New Issue