Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation website build fixes #3

Merged
merged 8 commits into from
Oct 29, 2024
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
9 changes: 6 additions & 3 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ const config: Config = {

title: "Teleport",
favicon: "/favicon.ico",
url: "https://goteleport.com",
baseUrl: "/",
url: process.env.DOCUSAURUS_CONFIG_URL || "https://goteleport.com",
baseUrl: process.env.DOCUSAURUS_CONFIG_BASE_URL || "/",

markdown: {
parseFrontMatter: async (params) => {
Expand All @@ -126,7 +126,6 @@ const config: Config = {
defaultLocale: "en",
locales: ["en"],
},

plugins: [
[
"@docusaurus/plugin-client-redirects",
Expand All @@ -146,6 +145,10 @@ const config: Config = {
[
"@docusaurus/plugin-content-docs",
{
// Host docs on the root page, later it will be exposed on goteleport.com/docs
// next to the website and blog
// https://docusaurus.io/docs/docs-introduction#docs-only-mode
routeBasePath: "/",
sidebarPath: "./sidebars.json",
lastVersion: latestVersion,
versions: getDocusaurusConfigVersionOptions(),
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"scripts": {
"spellcheck": "bash scripts/check-spelling.sh",
"git-update": "git submodule update --init --remote --progress",
"git-update": "git submodule update --init --remote --progress --depth 1 --single-branch",
"prepare-files": "npx vite-node ./scripts/prepare-files.mts",
"prepare-sanity-data": "npx vite-node ./scripts/prepare-sanity-data.mts",
"docusaurus": "docusaurus",
"start": "yarn prepare-files && yarn prepare-sanity-data && docusaurus start",
"build": "yarn git-update && yarn prepare-files && yarn prepare-sanity-data && docusaurus build",
"build": "yarn git-update && yarn prepare-files && yarn prepare-sanity-data && docusaurus build \"$@\"",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
Expand Down
4 changes: 2 additions & 2 deletions server/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export const getRedirects = () => {
}

return {
from: `/docs${redirect.source}`,
to: `/docs${redirect.destination}`,
from: redirect.source,
to: redirect.destination,
};
});
};
Loading