Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/build-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '24'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build Docusaurus
run: npm run build
run: npx cross-env DOCUSAURUS_VERSIONS='6.2, 7.0, current' npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
Expand Down
12 changes: 10 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ import type * as Preset from "@docusaurus/preset-classic";

// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)

const isStartOnlyCurrentVersion = process.env.DOCUSAURUS_START_VERSION_ENV === 'current';
function getOnlyIncludeVersions(): string[] | undefined {
const versionsEnv = process.env.DOCUSAURUS_VERSIONS;

if (!versionsEnv) {
return undefined;
}

return versionsEnv.split(',').map(v => v.trim());
}

const config: Config = {
title: "RavenDB Documentation",
Expand Down Expand Up @@ -45,7 +53,7 @@ const config: Config = {
path: "7.1"
}
},
onlyIncludeVersions: isStartOnlyCurrentVersion ? ['current'] : undefined,
onlyIncludeVersions: getOnlyIncludeVersions(),
//editUrl:
// 'https://github.com/ravendb/docs/tree/main/'
},
Expand Down
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"scripts": {
"docusaurus": "docusaurus",
"start": "npm run generate-icon-types && docusaurus start --no-minify",
"start:current": "set \"DOCUSAURUS_START_VERSION_ENV=current\" && npm run generate-icon-types && docusaurus start --no-minify",
"start:current": "npm run generate-icon-types && cross-env DOCUSAURUS_VERSIONS='current' docusaurus start --no-minify",
"build": "npm run generate-icon-types && docusaurus build",
"build:current": "npm run generate-icon-types && cross-env DOCUSAURUS_VERSIONS='current' docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
Expand Down Expand Up @@ -40,6 +41,7 @@
"@tailwindcss/postcss": "^4.1.11",
"@typescript-eslint/eslint-plugin": "^8.39.0",
"@typescript-eslint/parser": "^8.39.0",
"cross-env": "^10.1.0",
"eslint": "^9.32.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
Expand Down
1 change: 1 addition & 0 deletions src/components/LanguageStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const useLanguage = (): {
const language = useSyncExternalStore(
subscribe,
getLanguageFromLocalStorage,
() => DEFAULT_LANGUAGE,
);

const setLanguage = useCallback((newLanguage: DocsLanguage) => {
Expand Down
5 changes: 3 additions & 2 deletions src/theme/DocItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default function DocItemWrapper(props: Props): ReactNode {
source?.startsWith("docs/") ||
source?.startsWith("versioned_docs/");
const fileName = source?.split("/").pop();
const isExcluded = fileName === "home.mdx" || fileName === "whats-new.mdx";
const isHomepage = fileName === "home.mdx";
const isExcluded = isHomepage || fileName === "whats-new.mdx";

const supportedLanguages =
(props.content as any)?.supportedLanguages ||
Expand All @@ -37,7 +38,7 @@ export default function DocItemWrapper(props: Props): ReactNode {
<div className="col flex-1 min-w-0">
<DocItem {...props} />
</div>
<div className="col col--3 lg:block"></div>
{!isHomepage && <div className="col col--3 lg:block"></div>}
</div>
</>
);
Expand Down