Skip to content

Commit

Permalink
Documentation website build fixes (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
taraspos authored Oct 29, 2024
1 parent d13c30b commit e9e7438
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
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,
};
});
};

0 comments on commit e9e7438

Please sign in to comment.