<!DOCTYPE html> <html lang="en" style="scrollbar-gutter:stable;"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="csrf-token" content="W2ELfANcElFNHBkxTwsNciFgahstORcfo589MhWgtJODyBe0K5GQiTaj"> <title data-suffix=" · Catalin Mititiuc"> WebDevCat.me · Catalin Mititiuc</title> <link rel="stylesheet" id="font-bitter-css" href="//fonts.googleapis.com/css?family=Bitter:400,700" type="text/css" media="screen"> <link phx-track-static rel="stylesheet" href="/assets/app-131585bb1e255488c3d2558ee5c81330.css?vsn=d"> <link phx-track-static rel="stylesheet" href="/assets/cgit-313ed4244ed6cc8d5b67d6fbb4ab18c8.css?vsn=d"> <style> article > * { max-width: unset; } div#cgit table.list { table-layout: auto; width: 100%; display: table; } div#cgit div.content { overflow: scroll; } div#cgit table.tabs { table-layout: auto; width: 100%; display: table; } div#cgit table.blob { table-layout: auto; width: 100%; display: table; } div#cgit table.tabs { table-layout: auto; width: 100%; display: table; } td.linenumbers { width: 1px; } td.lines { max-width: 1px; overflow: hidden; } td.linenumbers pre, td.lines pre { line-height: 1.25em; } pre { overflow-x: scroll; overflow-y: hidden; } code { font-size: unset; } </style> <script defer phx-track-static type="text/javascript" src="/assets/app-7bb68f31e771b77e6d1026a2eca15d48.js?vsn=d"> </script> </head> <body class="bg-white"> <header> <div style="display: inline-block;"> <h1><a href="/">Web Dev Solutions</a></h1> <h3 style="text-align: left">Catalin Mititiuc</h3> </div> </header> <main> <article> From 3d1ea3183c4de1690533cc01d1fa843bcea2e57e Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc <webdevcat@proton.me> Date: Thu, 19 Dec 2024 17:19:22 -0800 Subject: Bump version --- README.md | 32 +++++++++++++++++++++++--------- mix.exs | 15 ++++++++++++--- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index daab11f..9a00282 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,17 @@ A watcher and a Mix task that uses Pandoc to convert markdown files to html. def deps do [ - {:pandoc, "~> 0.1.0", runtime: Mix.env() == :dev} + {:pandoc, "~> 0.2.0", runtime: Mix.env() == :dev} ] end +``` + +## Use +```elixir +# mix.exs + +# ... defp aliases do [ # ... @@ -131,7 +138,19 @@ defmodule Stasis.Document do ``` ```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 %> <p> @@ -142,13 +161,8 @@ defmodule Stasis.Document do <% end %> ``` -```elixir -# lib/hello_web/controllers/post_html/show.html.heex +```heex +<!-- lib/hello_web/controllers/post_html/show.html.heex --> <%= 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>. - diff --git a/mix.exs b/mix.exs index e124a56..7a0bb94 100644 --- a/mix.exs +++ b/mix.exs @@ -1,14 +1,23 @@ defmodule Pandoc.MixProject do use Mix.Project + @version "0.2.0" + @source_url "https://webdevcat.me/git/pandoc/" + def project do [ app: :pandoc, - version: "0.1.0", + version: @version, elixir: "~> 1.14", deps: deps(), - description: "Pandoc", - package: [links: [], licenses: ["MIT"]] + description: "File-watcher and Mix task to convert Markdown files to HTML", + package: [ + links: %{ + "pandoc" => "https://pandoc.org/" + }, + licenses: ["MIT"] + ], + source_url: @source_url ] end -- cgit v1.2.3 </article> </main> <footer> <p>100% Human Made, No AI Used</p> <p>stasis 0.2.12</p> </footer> </body> </html>