Skip to content

Commit 074c3fe

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature/php-yaml-adapters
2 parents e37e689 + 863552d commit 074c3fe

35 files changed

Lines changed: 3375 additions & 223 deletions

.github/workflows/deploy-docs.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'docs/**'
9+
- '.github/workflows/deploy-docs.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20
34+
cache: npm
35+
cache-dependency-path: docs/package-lock.json
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v5
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
working-directory: docs
43+
44+
- name: Build with VitePress
45+
run: npm run docs:build
46+
working-directory: docs
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: docs/.vitepress/dist
52+
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
needs: build
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ composer.phar
77
logs/
88
.idea/
99
.phpcs.cache
10+
11+
/docs/node_modules/
12+
/docs/.vitepress/cache/
13+
/docs/.vitepress/dist/

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Contributing
2+
3+
Feel free to fork and pull request.
4+
5+
There are a few guidelines:
6+
7+
- Coding standards passing: `composer cs-check` to check and `composer cs-fix` to fix.
8+
- Tests passing: `composer test` to run them.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,6 @@ bin/cake plugin load TinyAuth
152152
```
153153

154154
## Docs
155-
For setup and usage see [Docs](/docs).
155+
Full documentation: https://dereuromark.github.io/cakephp-tinyauth/
156156

157157
Also note the original [blog post](https://www.dereuromark.de/2011/12/18/tinyauth-the-fastest-and-easiest-authorization-for-cake2/) and how it all started.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
],
2424
"homepage": "https://github.com/dereuromark/cakephp-tinyauth",
2525
"support": {
26-
"source": "https://github.com/dereuromark/cakephp-tinyauth"
26+
"source": "https://github.com/dereuromark/cakephp-tinyauth",
27+
"docs": "https://dereuromark.github.io/cakephp-tinyauth/"
2728
},
2829
"require": {
2930
"php": ">=8.2",

docs/.vitepress/config.ts

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
function unifiedSidebar() {
4+
return [
5+
{
6+
text: 'Getting Started',
7+
collapsed: false,
8+
items: [
9+
{ text: 'Overview', link: '/guide/' },
10+
{ text: '5-min Quick Start', link: '/guide/quick-start' },
11+
{ text: 'Installation', link: '/guide/install' },
12+
{ text: 'Configuration', link: '/guide/configuration' },
13+
{ text: 'Custom Adapters', link: '/guide/custom-adapters' },
14+
{ text: 'Troubleshooting', link: '/guide/troubleshooting' },
15+
{ text: 'Upgrade Guide', link: '/guide/upgrade' },
16+
],
17+
},
18+
{
19+
text: 'Authentication',
20+
collapsed: false,
21+
items: [
22+
{ text: 'Setup & INI', link: '/authentication/' },
23+
{ text: 'Impersonation', link: '/authentication/impersonation' },
24+
{ text: 'Custom Adapter', link: '/authentication/adapter' },
25+
],
26+
},
27+
{
28+
text: 'Authorization',
29+
collapsed: false,
30+
items: [
31+
{ text: 'Setup & INI', link: '/authorization/' },
32+
{ text: 'Middleware & Policy', link: '/authorization/middleware' },
33+
{ text: 'Custom Adapter', link: '/authorization/adapter' },
34+
{ text: 'Multi-Role', link: '/authorization/multi-role' },
35+
],
36+
},
37+
{
38+
text: 'Helpers & Tools',
39+
collapsed: false,
40+
items: [
41+
{ text: 'AuthUser (Component / Helper)', link: '/auth-user' },
42+
{ text: 'AuthPanel (DebugKit)', link: '/auth-panel' },
43+
],
44+
},
45+
{
46+
text: 'Reference',
47+
collapsed: true,
48+
items: [
49+
{ text: 'CLI Commands', link: '/reference/cli' },
50+
],
51+
},
52+
]
53+
}
54+
55+
export default defineConfig({
56+
title: 'cakephp-tinyauth',
57+
description: 'INI-based authentication and authorization for CakePHP — a thin wrapper over the official Authentication and Authorization plugins.',
58+
base: '/cakephp-tinyauth/',
59+
lastUpdated: true,
60+
sitemap: {
61+
hostname: 'https://dereuromark.github.io/cakephp-tinyauth/',
62+
},
63+
head: [
64+
['link', { rel: 'icon', href: '/cakephp-tinyauth/favicon.svg', type: 'image/svg+xml' }],
65+
],
66+
themeConfig: {
67+
logo: '/logo.svg',
68+
nav: [
69+
{ text: 'Guide', link: '/guide/', activeMatch: '/guide/' },
70+
{ text: 'Authentication', link: '/authentication/', activeMatch: '/authentication/' },
71+
{ text: 'Authorization', link: '/authorization/', activeMatch: '/authorization/' },
72+
{
73+
text: 'Links',
74+
items: [
75+
{ text: 'GitHub', link: 'https://github.com/dereuromark/cakephp-tinyauth' },
76+
{ text: 'Packagist', link: 'https://packagist.org/packages/dereuromark/cakephp-tinyauth' },
77+
{ text: 'Issues', link: 'https://github.com/dereuromark/cakephp-tinyauth/issues' },
78+
{ text: 'TinyAuth Backend (admin GUI)', link: 'https://github.com/dereuromark/cakephp-tinyauth-backend' },
79+
],
80+
},
81+
],
82+
sidebar: {
83+
'/': unifiedSidebar(),
84+
},
85+
socialLinks: [
86+
{ icon: 'github', link: 'https://github.com/dereuromark/cakephp-tinyauth' },
87+
],
88+
search: {
89+
provider: 'local',
90+
},
91+
editLink: {
92+
pattern: 'https://github.com/dereuromark/cakephp-tinyauth/edit/master/docs/:path',
93+
text: 'Edit this page on GitHub',
94+
},
95+
footer: {
96+
message: 'Released under the MIT License.',
97+
copyright: 'Copyright Mark Scherer',
98+
},
99+
},
100+
})

docs/.vitepress/theme/custom.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:root {
2+
--vp-c-brand-1: #4338ca;
3+
--vp-c-brand-2: #4f46e5;
4+
--vp-c-brand-3: #6366f1;
5+
--vp-c-brand-soft: rgba(79, 70, 229, 0.14);
6+
7+
--vp-home-hero-name-color: transparent;
8+
--vp-home-hero-name-background: linear-gradient(135deg, #4338ca 0%, #0ea5e9 100%);
9+
--vp-home-hero-image-background-image: linear-gradient(135deg, #4338ca 0%, #0ea5e9 100%);
10+
--vp-home-hero-image-filter: blur(42px);
11+
}
12+
13+
.dark {
14+
--vp-c-brand-1: #818cf8;
15+
--vp-c-brand-2: #6366f1;
16+
--vp-c-brand-3: #4f46e5;
17+
}
18+
19+
.vp-doc table code,
20+
.vp-doc p code,
21+
.vp-doc li code {
22+
white-space: nowrap;
23+
}
24+
25+
.vp-doc .custom-block.tip {
26+
border-color: var(--vp-c-brand-1);
27+
}

docs/.vitepress/theme/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import './custom.css'
3+
4+
export default DefaultTheme

0 commit comments

Comments
 (0)