-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from viniciusalonso/publish
Publish
- Loading branch information
Showing
3 changed files
with
75 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,65 @@ | ||
# SimpleBlog | ||
# Simple Blog | ||
|
||
**TODO: Add description** | ||
|
||
## Installation | ||
A blog engine written in elixir to generate static blogs from markdown. | ||
|
||
|
||
|
||
If [available in Hex](https://hex.pm/docs/publish), the package can be installed | ||
by adding `simple_blog` to your list of dependencies in `mix.exs`: | ||
## Installation | ||
|
||
```elixir | ||
|
||
def deps do | ||
[ | ||
{:simple_blog, "~> 0.1.0"} | ||
] | ||
|
||
[ | ||
|
||
{:simple_blog, "~> 0.1.0"} | ||
|
||
] | ||
|
||
end | ||
|
||
``` | ||
|
||
## Usage | ||
|
||
|
||
|
||
```console | ||
|
||
$ git clone [email protected]:viniciusalonso/simple_blog.git | ||
|
||
$ cd simple_blog/ | ||
|
||
$ mix deps.get | ||
``` | ||
|
||
### Generate new blog post | ||
|
||
```console | ||
$ mix simple_blog.post.new "10 tips for new developers" | ||
``` | ||
|
||
The file will be created at `blog/_posts/yyyy-mm-dd-10-tips-for-new-developers.md`. | ||
|
||
### Running local server | ||
|
||
The local http server is designed to local development of your blog. To start it run the command below: | ||
|
||
```console | ||
$ mix clean | ||
$ mix simple_blog.server.start | ||
``` | ||
|
||
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) | ||
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can | ||
be found at <https://hexdocs.pm/simple_blog>. | ||
The server will be running at `http://localhost:4000`. | ||
|
||
### Generate static blog | ||
|
||
To generate the static version you should run the command: | ||
|
||
```console | ||
$ mix simple_blog.compile | ||
``` | ||
|
||
The command will generate a directory called `output`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters