Bump version

This commit is contained in:
Catalin Constantin Mititiuc 2024-12-19 17:19:22 -08:00
parent ccb050102a
commit 3d1ea3183c
2 changed files with 35 additions and 12 deletions

View File

@ -14,10 +14,17 @@ A watcher and a Mix task that uses Pandoc to convert markdown files to html.
def deps do def deps do
[ [
{:pandoc, "~> 0.1.0", runtime: Mix.env() == :dev} {:pandoc, "~> 0.2.0", runtime: Mix.env() == :dev}
] ]
end end
```
## Use
```elixir
# mix.exs
# ...
defp aliases do defp aliases do
[ [
# ... # ...
@ -131,7 +138,19 @@ defmodule Stasis.Document do
``` ```
```elixir ```elixir
# lib/hello_web/controllers/post_html/index.html.heex # lib/hello_web/controllers/post_html.ex
# ...
defp href(filename, draft \\ false) do
root = (draft && "/drafts") || "/posts"
Path.join(root, filename |> Path.basename(".md"))
end
```
```heex
<!-- lib/hello_web/controllers/post_html/index.html.heex -->
<%= for {id, data} <- @posts do %> <%= for {id, data} <- @posts do %>
<p> <p>
@ -142,13 +161,8 @@ defmodule Stasis.Document do
<% end %> <% end %>
``` ```
```elixir ```heex
# lib/hello_web/controllers/post_html/show.html.heex <!-- lib/hello_web/controllers/post_html/show.html.heex -->
<%= raw(@post) %> <%= raw(@post) %>
``` ```
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/pandoc>.

15
mix.exs
View File

@ -1,14 +1,23 @@
defmodule Pandoc.MixProject do defmodule Pandoc.MixProject do
use Mix.Project use Mix.Project
@version "0.2.0"
@source_url "https://webdevcat.me/git/pandoc/"
def project do def project do
[ [
app: :pandoc, app: :pandoc,
version: "0.1.0", version: @version,
elixir: "~> 1.14", elixir: "~> 1.14",
deps: deps(), deps: deps(),
description: "Pandoc", description: "File-watcher and Mix task to convert Markdown files to HTML",
package: [links: [], licenses: ["MIT"]] package: [
links: %{
"pandoc" => "https://pandoc.org/"
},
licenses: ["MIT"]
],
source_url: @source_url
] ]
end end