-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewpost.sh
More file actions
executable file
·74 lines (50 loc) · 1.21 KB
/
newpost.sh
File metadata and controls
executable file
·74 lines (50 loc) · 1.21 KB
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
66
67
68
69
70
71
72
73
74
#!/bin/bash
if [ "$#" -ne 1 ] ; then
echo "Usage: $0 <title>" >&2
exit 1
fi
title=`echo "$1" |sed 's/ /-/g'`
fileName="_posts/`date +%Y-%m-%d-$title.markdown`"
touch $fileName
cat > $fileName <<DELIM
---
layout: post
title: "$1"
date: `date "+%Y-%m-%d %H:%M:%S"`
categories:
---
[Basic syntax help for Markdown](http://daringfireball.net/projects/markdown/basics)
A First Level Header
====================
A Second Level Header
---------------------
Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.
Some of these words *are emphasized*.
Some of these words _are emphasized also_.
Use two asterisks for **strong emphasis**.
Or, if you prefer, __use two underscores instead__.
### Header 3
> This is a blockquote.
>
> This is the second paragraph in the blockquote.
>
> ## This is an H2 in a blockquote
* Dandy.
* Gum.
1. Red
2. Green
3. Blue
This is an [example link](http://example.com/).
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"
To highlight:
{% highlight css %}
.icon-anchor {
font-size: 65%;
}
{% endhighlight %}

DELIM