Files
notesnook/docs/help/.vitepress/versions.mjs
Ammar Ahmed 52d6044e73 docs(help): rebuild the help site with VitePress (#10169)
* docs: new help built with vitepress.

* docs: improve docs home ui

Added a Go to Docs button on homepage
Added a searchbar for directly searching what you are looking for in the docs

* docs(help): wire up with build system & setup proper ci

* Clean up new documentation (#10174)

* Docs: Cleanup pass 1

Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>

* docs: cleanup pass 2

Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>

* docs: Fix vscode's manglement that I missed.

Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>

* Update docs/help/contents/plans-and-limits.md

Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>
Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>

* Update docs/help/contents/rich-text-editor/outline-lists.md

Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>
Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>

* docs: Remove self-hosting guide from sidebar, and comments for reviewer.

Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>

---------

Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>
Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>

* docs: some fixes

* ci: do not publish help on push

* docs(help): improve regional pricing & free trials

* docs: improve sidebar

* docs: some more fixes after re-review

* docs: improve search and nav

* docs: a few more fixes

* docs: fix tabs formatting compat with prettier

* docs: fix tabs formatting in various places

* docs: show correct plus button image for mobile

* docs: disable notesnook self hosting docs

* docs: update help docs with fixes

---------

Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
Co-authored-by: Chloe Oletto <NeedsChloesure@riseup.net>
Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>
2026-08-14 08:57:51 +05:00

37 lines
1.2 KiB
JavaScript

/**
* Documentation versions.
*
* The **latest** version is served from the site root (`/create-a-note`,
* `/organizing-notes/...`) so canonical URLs never move. Older versions are
* served from `/v<version>/`.
*
* Older versions are stored as *differences*, not copies. `contents/_versions/`
* holds only the pages whose content actually differs from the current docs;
* every other page is shared, and the full `/v<version>/` tree is composed at
* build time by `scripts/build-versions.mjs`.
*
* Cutting a new version: npm run version -- 3.5
* Changing a page afterwards: npm run fork -- 3.4 <page> (before editing)
*/
/** The version the docs at the site root describe. */
export const LATEST = "3.4";
/** Older versions, newest first. */
export const ARCHIVED = [];
export const isArchivedPath = (path) =>
ARCHIVED.some((v) => path.startsWith(`/v${v}/`));
export const versionOfPath = (path) =>
ARCHIVED.find((v) => path.startsWith(`/v${v}/`)) ?? LATEST;
/** The version picker shown in the nav bar. */
export const versionsNavItem = {
text: `v${LATEST}`,
items: [
{ text: `v${LATEST} (latest)`, link: "/" },
...ARCHIVED.map((v) => ({ text: `v${v}`, link: `/v${v}/` }))
]
};