Compare commits
No commits in common. "master" and "v0.1.0" have entirely different histories.
27
README.md
27
README.md
@ -9,45 +9,36 @@ It only is designed in bash script, and should work perfectly fine on any Unix
|
|||||||
like machine.
|
like machine.
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://git.simonpetit.top/simonpetit/bob
|
git clone https://git.simonpetit.top
|
||||||
cd bob
|
cd bob
|
||||||
make test
|
make test (optional)
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
or using Docker :
|
|
||||||
|
|
||||||
```
|
|
||||||
docker pull git.simonpetit.top/simonpetit/bob:0.1.2
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Publish : to convert a drafts in markdown into a html article
|
### Publish : to convert a drafts in markdown into a html article
|
||||||
|
|
||||||
To write a post, create a markdown file in the `drafts` folder whose name will
|
To write a post, create a markdown file in the `drafts` folder whose name will
|
||||||
also be its title, and convert it to an html file, type the following command
|
also be its title, and convert it to an html file, type the following command
|
||||||
from the root.
|
from the root :
|
||||||
|
|
||||||
Once your draft is ready to be published, move it into `drafts/published` and call `bob`
|
|
||||||
|
|
||||||
```
|
```
|
||||||
bob publish
|
bob publish ./drafts/<article_file>
|
||||||
```
|
```
|
||||||
|
|
||||||
Bob will convert all markdown files within `drafts/published` in html and put them into `posts`
|
Note that the article does not have to have a particular extension, however
|
||||||
|
it will be placed in the `draft/published` folder with the `.md` extension.
|
||||||
It will also update the `index.html` to add this newly article into its list.
|
It will also update the `index.html` to add this newly article into its list.
|
||||||
|
|
||||||
### Unpublish : to remove a published article
|
### Unpublish : to remove a published article
|
||||||
|
|
||||||
To remove a specific `post`, remove its counterpart from `draft/published` and rerun :
|
|
||||||
|
|
||||||
```
|
```
|
||||||
bob publish
|
bob unpublish ./posts/<article_file>
|
||||||
```
|
```
|
||||||
|
|
||||||
This will remove the html files from the `posts` folder, and republish accordingly to the `drafts/published` list of files.
|
This will remove the html file from the `posts` folder, and put back the draft from
|
||||||
The file `index.html` will be rewritten to match the actually published posts.
|
`./draft/published` into the `./draft` folder.
|
||||||
|
|
||||||
### Help
|
### Help
|
||||||
|
|
||||||
|
@ -96,11 +96,11 @@ function closeOne() {
|
|||||||
env = last()
|
env = last()
|
||||||
if (env == "ul" ) {
|
if (env == "ul" ) {
|
||||||
# In a unordered list block, print a new item
|
# In a unordered list block, print a new item
|
||||||
print "<li>" replaceInline(substr($0, 3)) "</li>"
|
print "<li>" substr($0, 3) "</li>"
|
||||||
} else {
|
} else {
|
||||||
# Otherwise, init the unordered list block
|
# Otherwise, init the unordered list block
|
||||||
push("ul")
|
push("ul")
|
||||||
print "<ul>\n<li>" replaceInline(substr($0, 3)) "</li>"
|
print "<ul>\n<li>" substr($0, 3) "</li>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user