Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,36 @@ export default defineConfig({
exportStatic: {
ignorePreRenderError: true,
},
ssr: process.env.NODE_ENV === 'production' ? { builder: 'webpack' } : false,
sitemap: process.env.NODE_ENV === 'production' ? {
hostname: site_url,
} : false,
// metas: [
// { name: 'keywords', content: 'nocobase,nocobase doc,low-code,no-code,self-hosted,open source,open-source,no-code development,low-code development,workflow management software,business process management,collaboration software,enterprise process management,enterprise management system,no-code system,no-code platform,free no-code development platform' },
// { name: 'description', content: "NocoBase is a lightweight, extremely scalable open source no-code and low-code development platform. Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no- code development platform!" },
// ],
headScripts: process.env.NODE_ENV === 'production' ? [
` function hiddenBody() {
const body = document.body;
if (body) {
body.setAttribute('hidden', true);
} else {
requestAnimationFrame(hiddenBody);
}
}
hiddenBody();
function visibleBody() {
const loading = document.querySelector('.dumi-default-loading-skeleton');
const headerMenu = document.querySelector('header .ant-menu');
const antdIsLoaded = headerMenu ? window.getComputedStyle(headerMenu).listStyle === 'outside none none' : false;
if (antdIsLoaded) {
document.body.removeAttribute('hidden');
} else {
requestAnimationFrame(visibleBody);
}
}
visibleBody();`
] : [],
cacheDirectoryPath: `node_modules/.docs-${lang}-cache`,
outputPath: `./dist/${lang}`,
resolve: {
Expand Down Expand Up @@ -81,7 +111,4 @@ export default defineConfig({
'/favicon-32x32.png',
'/favicon-16x16.png',
],
sitemap: {
hostname: site_url,
},
});
3 changes: 3 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
- 'package.json'
- '.dumirc.ts'
- '.dumi/theme/**'
pull_request:
branches:
Expand All @@ -16,6 +17,8 @@ on:
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
- 'package.json'
- '.dumirc.ts'
- '.dumi/theme/**'

jobs:
build:
Expand Down
Loading