Skip to content

Commit 49b9bdd

Browse files
authored
Merge pull request #65 from dont-code/workflow
features: api docs
2 parents 1f80a6a + b473b5a commit 49b9bdd

5 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/workflows/doc-update.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ jobs:
2626
node-version: 24
2727
- name: Install pandoc
2828
run: sudo apt-get update && sudo apt-get install -y pandoc
29-
- name: Install docs dependencies
30-
working-directory: ./docs
29+
- name: Install monorepo dependencies
3130
run: |
3231
npm install -g pnpm@latest
33-
pnpm install
32+
node common/scripts/install-run-rush.js install
33+
- name: Install docs dependencies
34+
working-directory: ./docs
35+
run: pnpm install
3436
- name: Generate API docs and website
3537
working-directory: ./docs
3638
run: pnpm docs:generate

docs/generate-typedoc.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ MATOMO="$SCRIPT_DIR/matomo-script.html"
4040
MATOMO_OPTS=""
4141
[ -f "$MATOMO" ] && MATOMO_OPTS="-H $MATOMO"
4242

43+
# Inject Matomo analytics into all API HTML pages
44+
if [ -f "$MATOMO" ]; then
45+
echo " Injecting Matomo analytics into API pages..."
46+
find "$API_OUT" -name '*.html' | while IFS= read -r f; do
47+
sed -i "/<\/head>/r $MATOMO" "$f"
48+
done
49+
echo " Matomo injected into API pages."
50+
fi
51+
4352
# Use-case files in order: number|filename(no ext)|title
4453
guides_list() {
4554
cat <<LIST

docs/ng-xtend-website/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,8 @@ <h1 id="ng-xtend-logo-ng-xtend-framework"><img src="docs/logos/logo-xtend-angula
296296
<a href="#key-features">Features</a>
297297
<a href="#see-it-in-action">Demos</a>
298298
<a href="#quick-start">Quick start</a>
299-
<a href="#getting-started">Developer guide</a>
300299
<a href="api/index.html">API docs</a>
301-
<a href="guides/index.html">Guides</a>
300+
<a href="guides/index.html">Developer's Guides</a>
302301
</div>
303302

304303
<div class="hero-meta">

docs/tsconfig.typedoc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"moduleResolution": "bundler",
4+
"module": "preserve",
5+
"target": "ES2022",
6+
"strict": true,
7+
"esModuleInterop": true,
8+
"skipLibCheck": true,
9+
"experimentalDecorators": true,
10+
"useDefineForClassFields": false
11+
},
12+
"include": ["./api-entrypoints/*.ts"]
13+
}

docs/typedoc_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
"Guides": "/guides/index.html",
2222
"GitHub": "https://github.com/dont-code/ng-xtend"
2323
},
24-
"customCss": "./typedoc_theme.css"
24+
"customCss": "./typedoc_theme.css",
25+
"tsconfig": "./tsconfig.typedoc.json"
2526
}

0 commit comments

Comments
 (0)