chore: add make target to create new post
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
96adcf78f5
commit
32e60de8ea
6
Makefile
6
Makefile
@ -3,6 +3,7 @@ THEME_VERSION := v0.16.1
|
||||
THEME := hugo-geekblog
|
||||
BASEDIR := .
|
||||
THEMEDIR := $(BASEDIR)/themes
|
||||
YEAR := $(shell date +"%Y")
|
||||
|
||||
.PHONY: all
|
||||
all: doc
|
||||
@ -18,3 +19,8 @@ doc-assets:
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(THEMEDIR)
|
||||
|
||||
.PHONY: hugo-new
|
||||
hugo-new:
|
||||
hugo new posts/$(YEAR)/$(title)/index.md ; \
|
||||
mkdir -p content/posts/$(YEAR)/$(title)/images
|
||||
|
13
archetypes/posts.md
Normal file
13
archetypes/posts.md
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
authors:
|
||||
- robert-kaussow
|
||||
tags: []
|
||||
resources:
|
||||
- name: feature
|
||||
src: "images/feature.jpg"
|
||||
params:
|
||||
anchor: Center
|
||||
credits: ""
|
||||
---
|
Loading…
Reference in New Issue
Block a user