vscode-hugo/Taskfile.yml

24 lines
573 B
YAML
Raw Normal View History

2024-08-17 00:35:18 +00:00
version: '3'
tasks:
new-content:
vars:
content_file: content/{{ .content_section }}/{{ .NAME | default "new-post" }}/{{ .content_name | default "index" }}.md
cmds:
- hugo new content --kind "{{ .content_kind | default "default" }}" "{{ .content_file }}"
- code --reuse-window "{{ .content_file }}"
new-post:
cmds:
- task: new-content
vars:
content_section: blog
content_name:
ref: .content_name
new-post-en:
cmds:
- task: new-post
vars:
content_name: index.en