-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from visto9259/add-docs
Added docs
- Loading branch information
Showing
34 changed files
with
9,362 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build and Deploy to GitHub Pages | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths: | ||
- 'docs/**' | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
deploy: | ||
name: Build and Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./docs | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
cache-dependency-path: docs/yarn.lock | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Build website | ||
run: yarn build | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Build output to publish to the `gh-pages` branch: | ||
publish_dir: ./docs/build | ||
# The following lines assign commit authorship to the official | ||
# GH-Actions bot for deploys to `gh-pages` branch: | ||
# https://github.com/actions/checkout/issues/13#issuecomment-724415212 | ||
# The GH actions bot is used by default if you didn't specify the two fields. | ||
# You can swap them out with your own user credentials. | ||
user_name: github-actions[bot] | ||
user_email: 41898282+github-actions[bot]@users.noreply.github.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build GitHub Pages on PRs No Deploy | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./docs | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'docs/**' | ||
push: | ||
paths: | ||
- 'docs/**' | ||
jobs: | ||
test-deploy: | ||
name: Build GitHub Pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
cache-dependency-path: docs/yarn.lock | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Test build website | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
vendor | ||
composer.lock | ||
composer.lock | ||
## PHPStorm files | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Documentation Website | ||
|
||
The Documentation Website is built using [Docusaurus](https://docusaurus.io/). | ||
|
||
If you want to make a contribution to the documentation, please follow these | ||
instructions: | ||
|
||
1. Fork the `master` branch of this repository to your GitHub profile. Do not fork the `gh-pages` branch as it only contains the "built" version. | ||
2. Create a branch to work on your changes | ||
3. Test your changes locally (see below for instructions on how to use Docusaurus) | ||
4. Create a Pull Request against the `master` branch to submit your changes | ||
|
||
|
||
## Install and Develop with Docusaurus | ||
|
||
This is not a tutorial on how to use Docusaurus. Please refer to Docusaurus documentation. | ||
|
||
### Installation | ||
|
||
On your local fork of the Documentation, use `yarn` to install | ||
the Docusaurus dependencies. | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
Once the dependencies are installed, you can make changes to the documentation source files. | ||
|
||
Typically, only the files located under `/docs`, `/src` and `/blog` should be changed. | ||
|
||
Changes to the navigation and footer are made to the `docusauraus.config.js` file. | ||
|
||
To test locally your changes, run: | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live | ||
without having to restart the server. | ||
|
||
## Test builds | ||
|
||
A GitHub action is define to test builds. It will run on push to your fork. | ||
|
||
You may have to enable workflows on your fork before they are run. | ||
|
||
## Submit changes | ||
|
||
Once you are satisfied with your changes and the `Build GitHub Pages No Deploy` action has | ||
passed successfully, then create and submit a Pull Request against the `master` branch of | ||
the repository. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
slug: new-documentation | ||
title: New documentation | ||
authors: [ericr] | ||
tags: [laminas, PHP, LmcAdmin, admin, LM-Commons] | ||
--- | ||
This the new documentation site dedicated to the LmcAdmin module. | ||
|
||
There are no changes to the code, just improvements in the documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ericr: | ||
name: Eric Richer | ||
title: LM-Commons Administrator | ||
url: https://github.com/visto9259 | ||
image_url: https://github.com/visto9259.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
# Authorization | ||
LmcAdmin allows authorization via [LmcRbacMvc](https://github.com/LM-Commons/LmcRbacMvc). Configuration for LmcRbacMvc module is provided to easily configure LmcAdmin. Authorization enables you to restrict access to `/admin` and every other page under LmcAdmin. | ||
|
||
## LmcRbacMvc authorization | ||
LmcRbacMvc works with `Laminas\Permission\Rbac` as access restriction component. The LmcRbacMvc module combines `Laminas\Permission\Rbac` with the standard user module [LmcUser](https://github.com/LM-Commons/LmcUser). To enable access restriction with LmcRbacMvc, install the module and enable it in your `application.config.php`. | ||
|
||
Furthermore, LmcAdmin has a `lmcadmin.global.php` file in the [config](../config/) directory. Copy this file over to your `config/autoload` directory. It directly provides LmcRbacMvc configuration to restrict access to users for the `/admin` route. Only users in the "admin" group are allowed to access LmcAdmin's pages. | ||
Furthermore, LmcAdmin has a `lmcadmin.global.php` file in the `/config` directory. Copy this file over to your `config/autoload` directory. It directly provides LmcRbacMvc configuration to restrict access to users for the `/admin` route. Only users in the "admin" group are allowed to access LmcAdmin's pages. | ||
|
||
Instructions for further configuration of LmcRbacMvc are provided in the [repository of LmcRbacMvc](https://github.com/LM-Commons/LmcRbacMvc). | ||
|
||
## Link to documentation pages | ||
|
||
1. [Introduction](1.Introduction.md) | ||
2. [Routes](2.Routes.md) | ||
3. [Navigation](3.Navigation.md) | ||
4. [Authorization](4.Authorization.md) | ||
5. [Views & Layout](5.ViewLayout.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
# Introduction | ||
LmcAdmin is a low-level module that helps Laminas MVC Framework developers to create an admin interface. The module allows to have a uniform layout, navigation structure and routing scheme. You can create controllers routed as a child of LmcAdmin, so you can easily change the (root) url, access control and other properties. The navigation is also flexible, to allow you having a structure built of pages in the admin interface with menus, breadcrumbs and other links. | ||
|
||
Every part of LmcAdmin is customizable. In the pages listed below futher configuration options are explained. This documentation consists of the following pages: | ||
|
||
1. [Introduction](1.Introduction.md) | ||
2. [Routes](2.Routes.md) | ||
3. [Navigation](3.Navigation.md) | ||
4. [Authorization](4.Authorization.md) | ||
5. [Views & Layout](5.ViewLayout.md) | ||
1. [Introduction](Introduction) | ||
2. [Routes](Routes) | ||
3. [Navigation](Navigation) | ||
4. [Authorization](Authorization) | ||
5. [Views & Layout](ViewLayout) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.