uhugo

command module
v0.0.0-...-27a12b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 1 Imported by: 0

README

uhugo

uhugo is a CLI tool to update markdown content file for hugo in yaml front matter.

Install

go install -ldflags="-X main.ver=0.0.1 -X 'main.env=`uname -mv`' -X 'main.buildTime=`date`'" github.com/yixy/uhugo

How to use

Generate the markdown file list.

# we have markdown files as follows
$ cat > a.md <<EOF                  
this is a content.
EOF

$ cat > b.md <<EOF                  
this is b content.
EOF

$ cat > c.md <<EOF                  
this is c content.
EOF

# generate the markdown file list
$ uhugo list
.list file generate success.

# filename is .list
$ cat .list     
a|0f29ad984b2ad8973adb8ff6a429a20f
b|e894ae6683e091a244777d0cc04f0998
c|4f339eac345d3cd783d3c40e7ef469d2

You can manage the list to change the files' name.

# arranged .list file.
$ vim .list
aaa|0f29ad984b2ad8973adb8ff6a429a20f
bbb|e894ae6683e091a244777d0cc04f0998
ccc|4f339eac345d3cd783d3c40e7ef469d2

make the markdown files update by .list. We can also specify the tags, categories of file.

$ uhugo update -c=test -t=demo,abc 
file is updated.

$ ls
aaa.md bbb.md ccc.md

$ cat aaa.md
---
categories:
- test
date: "2019-09-30T09:08:25+08:00"
lastmod: "2019-09-30T09:08:25+08:00"
tags:
- demo
- abc
title: aaa
---
this is a content.

more usage see uhugo -h

Documentation

Overview

Copyright © 2019 yixy <youzhilane01@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL