Compare commits
No commits in common. "v0.1.3" and "master" have entirely different histories.
@ -1,7 +1,7 @@
|
|||||||
# bob
|
# bob
|
||||||
|
|
||||||
Bob is a small static generator, for those who wants to maintain a personal
|
Bob is a small static generator, for those who wants to maintain a personal
|
||||||
website or blog.
|
website or blog, all from the command line.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ sudo make install
|
|||||||
or using Docker :
|
or using Docker :
|
||||||
|
|
||||||
```
|
```
|
||||||
docker pull git.simonpetit.top/simonpetit/bob:0.1.2
|
docker pull git.simonpetit.top/simonpetit/bob:0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
3
bob
3
bob
@ -23,7 +23,8 @@ usage()
|
|||||||
echo "bob commands :"
|
echo "bob commands :"
|
||||||
echo " help display this help"
|
echo " help display this help"
|
||||||
echo " init initiate a blog"
|
echo " init initiate a blog"
|
||||||
echo " publish publishes all published drafts"
|
echo " publish <post> publish the post"
|
||||||
|
echo " unpublish <post> unpublish the post"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,13 +61,6 @@ function replaceInline(line, result, start, end) {
|
|||||||
line = substr(line, 1, start-1) "<a href=\"" matched_url "\">" matched_link "</a>" substr(line, end+1)
|
line = substr(line, 1, start-1) "<a href=\"" matched_url "\">" matched_link "</a>" substr(line, end+1)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Replace occurences of `...` with <code>...</code>
|
|
||||||
while (match(line, /`(.+)`/)) {
|
|
||||||
start = RSTART
|
|
||||||
end = RSTART + RLENGTH - 1
|
|
||||||
line = substr(line, 1, start-1) "<code>" substr(line, start+1, RLENGTH-2) "</code>" substr(line, end+1)
|
|
||||||
}
|
|
||||||
|
|
||||||
return line
|
return line
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +135,7 @@ function closeOne() {
|
|||||||
|
|
||||||
|
|
||||||
# Matching a simple paragraph
|
# Matching a simple paragraph
|
||||||
!/^(#|\*|-|\+|>|$|\t| )/ {
|
!/^(#|\*|-|\+|>|`|$|\t| )/ {
|
||||||
env = last()
|
env = last()
|
||||||
if (env == "none") {
|
if (env == "none") {
|
||||||
# If no block, print a paragraph
|
# If no block, print a paragraph
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
{{articles}}
|
{{articles}}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -16,4 +16,4 @@
|
|||||||
</article>
|
</article>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -116,10 +116,6 @@ declare -a tests=(
|
|||||||
"A link to [wikipedia](https://www.wikipedia.org)"
|
"A link to [wikipedia](https://www.wikipedia.org)"
|
||||||
"<p>A link to <a href=\"https://www.wikipedia.org\">wikipedia</a></p>"
|
"<p>A link to <a href=\"https://www.wikipedia.org\">wikipedia</a></p>"
|
||||||
|
|
||||||
"Inline code"
|
|
||||||
$'`a code block`'
|
|
||||||
"<p><code>a code block</code></p>"
|
|
||||||
|
|
||||||
|
|
||||||
# You can add more test cases following the same format...
|
# You can add more test cases following the same format...
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user