chore: Create initial documentation shell
This commit is contained in:
parent
3097dbdfb3
commit
91f960cc94
12 changed files with 98 additions and 13 deletions
1
apps/core/guides/features/admin.md
Normal file
1
apps/core/guides/features/admin.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Admin
|
1
apps/core/guides/features/auth.md
Normal file
1
apps/core/guides/features/auth.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Authentication and Authorization
|
1
apps/core/guides/features/background-jobs.md
Normal file
1
apps/core/guides/features/background-jobs.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Background Jobs
|
1
apps/core/guides/features/content-management.md
Normal file
1
apps/core/guides/features/content-management.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Content Management
|
1
apps/core/guides/features/devops-templates.md
Normal file
1
apps/core/guides/features/devops-templates.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# DevOps Templates
|
1
apps/core/guides/features/fluid-email-templates.md
Normal file
1
apps/core/guides/features/fluid-email-templates.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Fluid Email Templates
|
1
apps/core/guides/features/i18n.md
Normal file
1
apps/core/guides/features/i18n.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# I18n
|
1
apps/core/guides/features/tasks-and-scripts.md
Normal file
1
apps/core/guides/features/tasks-and-scripts.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Tasks and Scripts
|
|
@ -23,6 +23,13 @@ development better.
|
||||||
|
|
||||||
## Up and Running
|
## Up and Running
|
||||||
|
|
||||||
|
Since Legendary is both a template and a framework, you can simply clone the repo
|
||||||
|
to start using it. It's a fully functional Phoenix app as-is. To start a new project:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone git@gitlab.com:mythic-insight/legendary.git <project_name>
|
||||||
|
```
|
||||||
|
|
||||||
In order to start the server, run `script/server`. Any dependencies required
|
In order to start the server, run `script/server`. Any dependencies required
|
||||||
will be installed automatically using [brew](https://brew.sh/),
|
will be installed automatically using [brew](https://brew.sh/),
|
||||||
[asdf](https://asdf-vm.com/#/), and [hex](https://hex.pm/).
|
[asdf](https://asdf-vm.com/#/), and [hex](https://hex.pm/).
|
||||||
|
@ -31,27 +38,31 @@ Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
Your main app lives in apps/app/ and that is where you will do most of your
|
Check out [the tutorial](tutorial.md) to learn how to build your first app with
|
||||||
|
Legendary.
|
||||||
|
|
||||||
|
Your main app lives in apps/app/ and you will do most of your
|
||||||
development there. This is a normal Phoenix application and you can develop it
|
development there. This is a normal Phoenix application and you can develop it
|
||||||
as such. Any resources which apply to developing Phoenix applications will apply
|
as such. Any resources which apply to developing Phoenix applications will apply
|
||||||
inside of the app. See the [Phoenix Guides](https://hexdocs.pm/phoenix/overview.html)
|
inside of the app. See the [Phoenix Guides](https://hexdocs.pm/phoenix/overview.html)
|
||||||
for a good starting resource in Phoenix development.
|
for a good starting resource in Phoenix development.
|
||||||
|
|
||||||
You should not generally need to change code in the other applications which
|
You should not generally need to change code in the other applications which
|
||||||
are part of the framework-- admin, content, core. We encourage you to avoid
|
are part of the framework-- apps/admin, apps/content, apps/core. We encourage you
|
||||||
changing those as much as possible, because doing so will make it more difficult
|
to avoid changing those as much as possible, because doing so will make it more
|
||||||
to upgrade Legendary to newer versions. However, they are available to you if
|
difficult to upgrade Legendary to newer versions. However, they are available to
|
||||||
you find that there are no other ways to accomplish the changes you want to
|
you if you find that there are no other ways to accomplish the changes that you want.
|
||||||
accomplish. If you find yourself adding functionality to admin, content, or core
|
If you find yourself adding functionality to admin, content, or core
|
||||||
that you feel would be beneficial to all Legendary apps, consider making a
|
that you feel would be beneficial to all Legendary apps, consider making a
|
||||||
code contribution back to the framework!
|
code contribution back to the framework!
|
||||||
|
|
||||||
## CI Configuration
|
## CI Configuration
|
||||||
|
|
||||||
Legendary comes with gitlab CI settings which should work for you with minimal
|
Legendary comes with GitLab CI settings which should work for you with minimal
|
||||||
setup.
|
setup.
|
||||||
|
|
||||||
The CI script will automatically tag successful builds. To do this, you will
|
The CI script will automatically tag successful builds. To do this, you will
|
||||||
need to configure a [CI variable](-/settings/ci_cd) named `GITLAB_TOKEN`. This
|
need to configure a [CI variable](https://docs.gitlab.com/ee/ci/variables/) named
|
||||||
token should be a [personal access token](/-/profile/personal_access_tokens) with
|
`GITLAB_TOKEN`. This token should be a
|
||||||
|
[personal access token](https://gitlab.com/-/profile/personal_access_tokens) with
|
||||||
`read_repository, write_repository` permissions.
|
`read_repository, write_repository` permissions.
|
||||||
|
|
1
apps/core/guides/tutorial.md
Normal file
1
apps/core/guides/tutorial.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Tutorial
|
|
@ -1,6 +1,6 @@
|
||||||
defmodule Legendary.CoreWeb.Helpers do
|
defmodule Legendary.CoreWeb.Helpers do
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
HTML helpers for our styled (Fomantic UI) forms.
|
HTML helpers for our styled (Tailwind) forms.
|
||||||
"""
|
"""
|
||||||
use Phoenix.HTML
|
use Phoenix.HTML
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,10 @@ defmodule Legendary.Core.MixProject do
|
||||||
homepage_url: "https://legendaryframework.org/",
|
homepage_url: "https://legendaryframework.org/",
|
||||||
docs: [
|
docs: [
|
||||||
main: "overview",
|
main: "overview",
|
||||||
extra_section: "GUIDES",
|
extra_section: "Getting Started",
|
||||||
extras: extras()
|
extras: extras(),
|
||||||
|
groups_for_extras: groups_for_extras(),
|
||||||
|
groups_for_modules: groups_for_modules(),
|
||||||
],
|
],
|
||||||
|
|
||||||
# Hex
|
# Hex
|
||||||
|
@ -45,7 +47,70 @@ defmodule Legendary.Core.MixProject do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp extras do
|
defp extras do
|
||||||
Path.wildcard("guides/**/*.md")
|
[
|
||||||
|
"guides/overview.md",
|
||||||
|
"guides/tutorial.md",
|
||||||
|
# "guides/tutorial.md": [filename: "tutorial", title: "Tutorial"],
|
||||||
|
"guides/features/admin.md",
|
||||||
|
"guides/features/auth.md",
|
||||||
|
"guides/features/background-jobs.md",
|
||||||
|
"guides/features/content-management.md",
|
||||||
|
"guides/features/devops-templates.md",
|
||||||
|
"guides/features/fluid-email-templates.md",
|
||||||
|
"guides/features/i18n.md",
|
||||||
|
"guides/features/tasks-and-scripts.md",
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
|
defp groups_for_extras do
|
||||||
|
[
|
||||||
|
Guides: ~r{guides/[^\.]+.md},
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
|
defp groups_for_modules do
|
||||||
|
[
|
||||||
|
"Auth": [
|
||||||
|
Legendary.Auth,
|
||||||
|
Legendary.AuthWeb,
|
||||||
|
~r{Legendary\.Auth(Web)?\..+},
|
||||||
|
Legendary.CoreWeb.Router.PowExtensionRouter
|
||||||
|
],
|
||||||
|
"Email": [
|
||||||
|
Legendary.CoreEmail,
|
||||||
|
Legendary.CoreMailer,
|
||||||
|
Legendary.CoreWeb.EmailHelpers,
|
||||||
|
Legendary.CoreWeb.CoreEmailView,
|
||||||
|
],
|
||||||
|
"Internationalization": [
|
||||||
|
Legendary.I18n
|
||||||
|
],
|
||||||
|
"Mix Tasks": [
|
||||||
|
Legendary.Mix,
|
||||||
|
],
|
||||||
|
"View Helpers": [
|
||||||
|
Legendary.CoreWeb.ErrorHelpers,
|
||||||
|
Legendary.CoreWeb.Helpers,
|
||||||
|
],
|
||||||
|
"Core Other": [
|
||||||
|
Legendary.Core,
|
||||||
|
Legendary.Core.MapUtils,
|
||||||
|
Legendary.Core.Repo,
|
||||||
|
Legendary.Core.SharedDBConnectionPool,
|
||||||
|
Mix.Legendary,
|
||||||
|
],
|
||||||
|
"Web Other": [
|
||||||
|
Legendary.CoreWeb,
|
||||||
|
Legendary.CoreWeb.Endpoint,
|
||||||
|
Legendary.CoreWeb.ErrorView,
|
||||||
|
Legendary.CoreWeb.Gettext,
|
||||||
|
Legendary.CoreWeb.LayoutView,
|
||||||
|
Legendary.CoreWeb.Router,
|
||||||
|
Legendary.CoreWeb.Router.Helpers,
|
||||||
|
Legendary.CoreWeb.Telemetry,
|
||||||
|
Legendary.CoreWeb.UserSocket,
|
||||||
|
]
|
||||||
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Configuration for the OTP application.
|
# Configuration for the OTP application.
|
||||||
|
|
Loading…
Reference in a new issue