Skip to content

Commit 2e76b41

Browse files
authored
Merge pull request #966 from 10up/enhancement/docs
Replace hookdoc with WP Hooks Documentor
2 parents 55764ed + f72edd5 commit 2e76b41

File tree

124 files changed

+3694
-1336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+3694
-1336
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ node_modules
33
tests/*
44
vendor/*
55
bin/*
6-
hookdocs/*
6+
wp-hooks-docs/*
77
docs/*

.github/hookdoc-tmpl/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/hookdoc-tmpl/layout.tmpl

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/hookdoc-tmpl/static/styles-10up.css

Lines changed: 0 additions & 146 deletions
This file was deleted.

.github/workflows/build-docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build Developer Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- trunk
7+
8+
jobs:
9+
release:
10+
name: Push (merge) to trunk
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- name: Setup proper PHP version
18+
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
19+
with:
20+
php-version: 8.3
21+
22+
- name: Setup node
23+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
24+
with:
25+
node-version-file: .nvmrc
26+
27+
- name: Install dependencies and build assets
28+
run: |
29+
npm install
30+
npm run build
31+
npm run makepot
32+
composer install --no-dev -o
33+
34+
- name: Build docs
35+
run: |
36+
npm run build:docs
37+
38+
- name: Deploy docs update
39+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: './docs/build'

.github/workflows/stable.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,3 @@ jobs:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
MESSAGE: 'Release: ({sha}) {msg}'
4141

42-
- name: Build docs
43-
run: npm run build:docs
44-
45-
- name: Deploy docs update
46-
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
47-
with:
48-
github_token: ${{ secrets.GITHUB_TOKEN }}
49-
publish_dir: './docs'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ tests/cypress/screenshots
5050
tests/cypress/videos
5151
tests/cypress/reports
5252
.wp-env.override.json
53+
54+
# docs
55+
wp-hooks-docs/docs/01.get-started/05.CHANGELOG.md

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,36 @@ To set up Stable Diffusion, follow the steps below:
814814

815815
## WP CLI Commands
816816

817-
- Check out the [ClassifAI docs](https://10up.github.io/classifai/).
817+
- Check out the [ClassifAI docs](https://10up.github.io/classifai/advanced-docs/wp-cli).
818+
819+
## Building and Running Documentation Site
820+
821+
The ClassifAI documentation site is built using [WP Hooks Documentor](https://github.com/10up/wp-hooks-documentor). Follow these steps to build and run the documentation site locally:
822+
823+
### 1. Build Documentation
824+
825+
```bash
826+
# Install dependencies and build the plugin
827+
npm i && npm run build:docs
828+
```
829+
830+
This will:
831+
- Install all required dependencies
832+
- Process all hook documentation from the codebase
833+
- Generate the documentation site in the `./docs` directory
834+
835+
### 2. Run Documentation Site Locally
836+
837+
```bash
838+
# Navigate to docs directory and start the server
839+
cd ./docs && npm run serve
840+
```
841+
842+
The documentation site will be available at [http://localhost:3000](http://localhost:3000).
843+
844+
### 3. Deployment
845+
846+
The documentation site will automatically deploy to GitHub Pages when changes are merged into the `trunk` branch. You can view the live documentation at [https://10up.github.io/classifai/](https://10up.github.io/classifai/).
818847

819848
## Frequently Asked Questions
820849

hookdoc-conf.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

hookdocs/diagrams.md

Whitespace-only changes.

0 commit comments

Comments
 (0)