Skip to content

Commit c7eec5f

Browse files
committed
fix(docs): enhance documentation build process and URL rewrites
- Updated the `docs:build` script in package.json to create a `.nojekyll` file in the build output directory, preventing Jekyll processing on GitHub Pages. - Refined URL rewrites in VitePress configuration to use regex patterns for improved routing of llms files, ensuring better access to static assets. - These changes optimize the documentation build process and enhance the accessibility of static files.
1 parent ad3bfcd commit c7eec5f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/.vitepress/config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ export default async () => {
3131
}
3232
},
3333

34+
// Configuración para archivos llms.txt
3435
rewrites: {
35-
'^/tokenly/llms.txt': '/llms.txt',
36-
'^/tokenly/llms-full.txt': '/llms-full.txt'
36+
'^/tokenly/llms\\.txt$': '/llms.txt',
37+
'^/tokenly/llms-full\\.txt$': '/llms-full.txt'
3738
},
3839

3940
head: [
@@ -46,6 +47,8 @@ export default async () => {
4647
['meta', { name: 'author', content: 'Nekzus' }],
4748
['meta', { property: 'og:title', content: 'Tokenly - JWT Token Management' }],
4849
['meta', { property: 'og:description', content: 'Advanced JWT Token Management with Device Fingerprinting' }],
50+
['meta', { 'http-equiv': 'Access-Control-Allow-Origin', content: '*' }],
51+
['meta', { 'http-equiv': 'Content-Type', content: 'text/plain; charset=utf-8' }],
4952
['style', {}, `
5053
:root {
5154
--vp-layout-max-width: 1440px;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"commit": "git-cz",
5050
"semantic-release": "semantic-release --branches main",
5151
"docs:dev": "vitepress dev docs",
52-
"docs:build": "vitepress build docs && cp docs/public/llms*.txt docs/.vitepress/dist/",
52+
"docs:build": "vitepress build docs && cp docs/public/llms*.txt docs/.vitepress/dist/ && touch docs/.vitepress/dist/.nojekyll",
5353
"docs:preview": "vitepress preview docs",
5454
"docs:deploy": "BASE=/tokenly/ npm run docs:build && gh-pages -d docs/.vitepress/dist"
5555
},
@@ -98,4 +98,4 @@
9898
"publishConfig": {
9999
"access": "public"
100100
}
101-
}
101+
}

0 commit comments

Comments
 (0)