Skip to content

Commit

Permalink
Split README and top level docs for admnonition
Browse files Browse the repository at this point in the history
Github Markdown and ExDoc have different admonition syntaxes, which made
the Web+Pro tip look quoted and broken.
  • Loading branch information
sorentwo committed Jun 24, 2024
1 parent bb9536d commit 1cdedd8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

- [Features](#features)
- [Oban Web+Pro](#oban-webpro)
- [Usage](#usage)
- Usage
- [Installation](#installation)
- [Requirements](#requirements)
- [Running With SQLite3](#running-with-sqlite3)
Expand Down Expand Up @@ -133,21 +133,18 @@ orphaned due to crashes.
[rdbms]: https://en.wikipedia.org/wiki/Relational_database#RDBMS
[tele]: https://github.com/beam-telemetry/telemetry

## Usage
## Oban Web+Pro

<!-- MDOC -->

Oban is a robust job processing library which uses PostgreSQL or SQLite3 for persistence.

> #### Oban Web+Pro {: .tip}
>
> [!TIP]
> A web dashboard for managing Oban, along with an official set of extensions, plugins, and
> workers that expand what Oban is capable are available as licensed packages:
>
> * [🧭 Oban Web](https://getoban.pro#oban-web)
> * [🌟 Oban Pro](https://getoban.pro#oban-pro)
>
> Learn more about prices and licensing Oban Web+Pro at [getoban.pro][pro].
> Learn more at [getoban.pro][pro]!
<!-- MDOC -->

## Requirements

Expand Down
25 changes: 20 additions & 5 deletions lib/oban.ex
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
defmodule Oban do
@external_resource readme = Path.join([__DIR__, "../README.md"])

@moduledoc readme
|> File.read!()
|> String.split("<!-- MDOC -->")
|> Enum.fetch!(1)
@doc_header """
Oban is a robust job processing library which uses PostgreSQL or SQLite3 for persistence.
@moduledoc since: "0.1.0"
> #### Oban Web+Pro {: .info}
>
> A web dashboard for managing Oban, along with an official set of extensions, plugins, and
> workers that expand what Oban is capable are available as licensed packages:
>
> * [🧭 Oban Web](https://getoban.pro#oban-web)
> * [🌟 Oban Pro](https://getoban.pro#oban-pro)
>
> Learn more at [getoban.pro][pro]!
"""

@doc_footer readme
|> File.read!()
|> String.split("<!-- MDOC -->")
|> Enum.fetch!(1)

@moduledoc @doc_header <> @doc_footer

use Supervisor

Expand Down

0 comments on commit 1cdedd8

Please sign in to comment.