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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ node_modules
/docs/spec/**/*.md
/docs/components/cli/
/docs/getting-started/configuration.md
/docs/getting-started/oidc.md

/.idea/

Expand Down
48 changes: 38 additions & 10 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,36 @@ const otdfctl = listRemote.createRepo("opentdf", "platform", process.env.OTDFCTL
const javaSdkVersion = "0.11.1";
const gtmId = "GTM-MKRLN6NL";

const platformDocsRef = "main";
const platformDocsSourceUrl = new URL(`https://github.com/opentdf/platform/blob/${platformDocsRef}/docs/`);
const platformDocsRawUrl = `https://raw.githubusercontent.com/opentdf/platform/${platformDocsRef}/docs/`;
const platformDocs = {
"Configuring.md": {
id: "configuration",
title: "Configuration",
sidebarPosition: 20,
filename: "configuration.md",
},
"OIDC.md": {
id: "oidc",
title: "OpenID Connect (OIDC)",
sidebarPosition: 21,
filename: "oidc.md",
},
} as const;

function rewritePlatformDocLinks(content: string): string {
return content.replace(/\]\((\.\.?\/[^)\s]+\.mdx?(?:[?#][^)\s]*)?)\)/g, (_link, target: string) => {
const sourceUrl = new URL(target, platformDocsSourceUrl);
const importedDoc = Object.entries(platformDocs).find(
([filename]) => sourceUrl.pathname === new URL(filename, platformDocsSourceUrl).pathname,
)?.[1];

// Keep links between imported pages local; point other platform references at their source.
return `](${importedDoc ? `./${importedDoc.filename}${sourceUrl.search}${sourceUrl.hash}` : sourceUrl.href})`;
});
}

const config: Config = {
title: "OpenTDF",
tagline: "Enabling secure data sharing through open, data-centric security",
Expand Down Expand Up @@ -370,23 +400,21 @@ ${rawContent}
[
"docusaurus-plugin-remote-content",
{
// options here
name: "platform-configuration", // used by CLI, must be path safe
sourceBaseUrl:
"https://raw.githubusercontent.com/opentdf/platform/main/docs/", // the base url for the markdown (gets prepended to all of the documents when fetching)
sourceBaseUrl: platformDocsRawUrl,
outDir: "docs/getting-started", // the base directory to output to.
documents: ["Configuring.md"], // the file names to download
documents: Object.keys(platformDocs),
modifyContent: (filename, content) => {
let updatedContent = content;
const doc = platformDocs[filename as keyof typeof platformDocs];
return {
content: `---
id: configuration
sidebar_position: 20
title: Configuration
id: ${doc.id}
sidebar_position: ${doc.sidebarPosition}
title: ${doc.title}
---

${updatedContent}`,
filename: "configuration.md",
${rewritePlatformDocLinks(content)}`,
filename: doc.filename,
};
},
},
Expand Down
4 changes: 3 additions & 1 deletion src/components/landing/Standards.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@

.grid {
display: grid;
grid-template-columns: 1fr;
grid-template-columns: minmax(0, 1fr);
gap: 3rem;
align-items: center;
}

/* Diagram */
.diagramOrder {
order: 2;
min-width: 0;
}

.contentOrder {
order: 1;
min-width: 0;
}

.diagramWrap {
Expand Down
12 changes: 12 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ a[class*="embed_documentation_footer-"] {
}
}

@media (max-width: 359px) {
.footer__links {
grid-template-columns: 1fr;
}
}

/* R-10: Footer bottom bar stacks vertically on mobile */
@media (max-width: 768px) {
.footer__bottom {
Expand Down Expand Up @@ -556,6 +562,12 @@ html[data-theme='dark'] .navbar__items--right .navbar__item.navbar__link[href*="
background-color: rgba(255, 255, 255, 0.97);
}

/* The closed sidebar sits to the right of the viewport. When the navbar
hides on scroll, its transform makes that sidebar widen the page. */
.navbar:not(.navbar-sidebar--show) {
overflow-x: clip;
}

html[data-theme='dark'] .navbar {
background-color: rgba(10, 12, 16, 0.97);
}
Expand Down
Loading