-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_post.sh
executable file
·66 lines (46 loc) · 1.21 KB
/
create_post.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
IFS='-' read -ra vars <<< `date +%F`
year=${vars[0]}
month=${vars[1]}
day=${vars[2]}
dirtree=posts/$year/$month/$day
mkdir -p $dirtree
touch $dirtree/$1.md
title=`echo $1 | awk '{print toupper($0)}'`
title=`echo ${title//\-/ }`
echo "---
sidebar: false
prev: /posts/
next: false
desc: Sin descripción
mediaimg: /assets/img/avatar-white-red.gif
taglist: no-tags,
meta:
- name: keywords
content: list,vuepress,vue
- property: og:title
content: $title
- property: og:image
content: /assets/img/avatar-white-red.gif
- property: og:description
content: Sin descripción
- name: msapplication-TileColor
content: #D25349
- name: msapplication-TileImage
content: /assets/favicon/ms-icon-144x144.png
- name: theme-color
content: #D25349
---
# $title
**¡Nos vemos en el código!**
<hr>
Si te gustó el contenido de este post, entonces [¡échame una ayudaíta!][100]
:wink:
<tag-list :tagstring="\$page.frontmatter.taglist"></tag-list>
[100]: /ayuda/
" > $dirtree/$1.md
echo "
==============================================================================
Post creado en $dirtree/$1.md
==============================================================================
"