mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 13:03:02 +12:00
docs: Sorting for hex documentation added (#810)
This commit is contained in:
parent
26160e446b
commit
c7738255f0
8 changed files with 16 additions and 9 deletions
|
@ -16,7 +16,7 @@ if Mix.env() == :dev do
|
|||
manage_mix_version?: true,
|
||||
# Instructs the tool to manage the version in your README.md
|
||||
# Pass in `true` to use `"README.md"` or a string to customize
|
||||
manage_readme_version: ["README.md", "documentation/tutorials/get-started.md"],
|
||||
manage_readme_version: ["README.md", "documentation/tutorials/1-get-started.md"],
|
||||
version_tag_prefix: "v"
|
||||
end
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ See `Ash.Changeset` for more information.
|
|||
|
||||
A packaged bundle of code that can be included in a resource to provide additional functionality. Built-in functionality such as the resource DSL itself is provided by an extension, and libraries like AshPostgres and AshAdmin also provide extensions that you can add to your resources with just one line of code.
|
||||
|
||||
See [Extending Resources](/documentation/tutorials/extending-resources.md) for more information.
|
||||
See [Extending Resources](/documentation/tutorials/4-extending-resources.md) for more information.
|
||||
|
||||
## Filter
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
> #### HexDocs {: .tip}
|
||||
>
|
||||
> Hexdocs does not support multi-package search. To assist with this, we provide a mirror of this documentation at [ash-hq.org](https://ash-hq.org). Use Ctrl+K or Cmd+K to search all packages on that site. For the best way to use the hex documentation, see the [hexdocs guide](/documentation/tutorials/using-hexdocs.md).
|
||||
> Hexdocs does not support multi-package search. To assist with this, we provide a mirror of this documentation at [ash-hq.org](https://ash-hq.org). Use Ctrl+K or Cmd+K to search all packages on that site. For the best way to use the hex documentation, see the [hexdocs guide](/documentation/tutorials/5-using-hexdocs.md).
|
||||
|
||||
<!--- ash-hq-hide-stop --> <!--- -->
|
||||
|
||||
|
@ -31,8 +31,8 @@ In this guide we will:
|
|||
## Things you may want to read first
|
||||
|
||||
- [Install Elixir](https://elixir-lang.org/install.html)
|
||||
- [Philosophy Guide](/documentation/tutorials/philosophy.md)
|
||||
- [Using Hexdocs](/documentation/tutorials/using-hexdocs.md)
|
||||
- [Philosophy Guide](/documentation/tutorials/2-philosophy.md)
|
||||
- [Using Hexdocs](/documentation/tutorials/5-using-hexdocs.md)
|
||||
|
||||
## Requirements
|
||||
|
15
mix.exs
15
mix.exs
|
@ -35,14 +35,20 @@ defmodule Ash.MixProject do
|
|||
end
|
||||
|
||||
defp extras do
|
||||
# Sorting can be done adding numbers at the begining of filenames
|
||||
"documentation/**/*.{md,livemd,cheatmd}"
|
||||
|> Path.wildcard()
|
||||
|> Enum.map(fn path ->
|
||||
title =
|
||||
html_filename =
|
||||
path
|
||||
|> Path.basename(".md")
|
||||
|> Path.basename(".livemd")
|
||||
|> Path.basename(".cheatmd")
|
||||
# We want to keep permalinks, so we remove the sorting number
|
||||
|> String.replace(~r/^\d+\-/, "")
|
||||
|
||||
title =
|
||||
html_filename
|
||||
|> String.split(~r/[-_]/)
|
||||
|> Enum.map_join(" ", &capitalize/1)
|
||||
|> case do
|
||||
|
@ -55,6 +61,7 @@ defmodule Ash.MixProject do
|
|||
|
||||
{String.to_atom(path),
|
||||
[
|
||||
filename: html_filename,
|
||||
title: title,
|
||||
default: title == "Get Started"
|
||||
]}
|
||||
|
@ -73,9 +80,9 @@ defmodule Ash.MixProject do
|
|||
defp groups_for_extras do
|
||||
[
|
||||
Tutorials: [
|
||||
"documentation/tutorials/get-started.md",
|
||||
"documentation/tutorials/philosophy.md",
|
||||
"documentation/tutorials/why-ash.md",
|
||||
"documentation/tutorials/1-get-started.md",
|
||||
"documentation/tutorials/2-philosophy.md",
|
||||
"documentation/tutorials/3-why-ash.md",
|
||||
~r'documentation/tutorials'
|
||||
],
|
||||
"How To": ~r'documentation/how_to',
|
||||
|
|
Loading…
Reference in a new issue