Skip to content

Commit feede07

Browse files
task: upgrade docusarus (#59)
1 parent 69891da commit feede07

File tree

8 files changed

+6326
-2857
lines changed

8 files changed

+6326
-2857
lines changed

docs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new
1414

1515
### What you'll need
1616

17-
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above:
17+
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
1818
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
1919

2020
## Generate a new site

docusaurus.config.js

Lines changed: 0 additions & 176 deletions
This file was deleted.

docusaurus.config.ts

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
import { themes as prismThemes } from "prism-react-renderer";
2+
import type { Config } from "@docusaurus/types";
3+
import type * as Preset from "@docusaurus/preset-classic";
4+
5+
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
6+
7+
const config: Config = {
8+
title: "Trustification",
9+
tagline:
10+
"A community, vendor-neutral, thought-leadering, mostly informational collection of resources devoted to making Software Supply Chains easier to create, manage, consume and ultimately… to trust!",
11+
favicon: "img/logo.svg",
12+
13+
// Set the production url of your site here
14+
url: "https://trustification.io",
15+
// Set the /<baseUrl>/ pathname under which your site is served
16+
// For GitHub pages deployment, it is often '/<projectName>/'
17+
baseUrl: "/",
18+
19+
// GitHub pages deployment config.
20+
// If you aren't using GitHub pages, you don't need these.
21+
organizationName: "trustification", // Usually your GitHub org/user name.
22+
projectName: "trustification.github.io", // Usually your repo name.
23+
24+
onBrokenLinks: "throw",
25+
onBrokenMarkdownLinks: "warn",
26+
27+
// Even if you don't use internationalization, you can use this field to set
28+
// useful metadata like html lang. For example, if your site is Chinese, you
29+
// may want to replace "en" with "zh-Hans".
30+
i18n: {
31+
defaultLocale: "en",
32+
locales: ["en"],
33+
},
34+
35+
presets: [
36+
[
37+
"classic",
38+
{
39+
docs: {
40+
sidebarPath: "./sidebars.ts",
41+
// Please change this to your repo.
42+
// Remove this to remove the "edit this page" links.
43+
editUrl:
44+
"https://github.com/trustification/trustification.github.io/tree/main",
45+
},
46+
blog: {
47+
showReadingTime: true,
48+
feedOptions: {
49+
type: ["rss", "atom"],
50+
xslt: true,
51+
},
52+
// Please change this to your repo.
53+
// Remove this to remove the "edit this page" links.
54+
editUrl:
55+
"https://github.com/trustification/trustification.github.io/tree/main",
56+
// Useful options to enforce blogging best practices
57+
onInlineTags: "warn",
58+
onInlineAuthors: "warn",
59+
onUntruncatedBlogPosts: "warn",
60+
},
61+
theme: {
62+
customCss: "./src/css/custom.css",
63+
},
64+
gtag: {
65+
trackingID: "G-HWS6R519CF",
66+
anonymizeIP: true,
67+
},
68+
} satisfies Preset.Options,
69+
],
70+
],
71+
72+
themeConfig: {
73+
// Replace with your project's social card
74+
image: "img/logo.svg",
75+
navbar: {
76+
title: "Trustification",
77+
logo: {
78+
alt: "Trustification Logo",
79+
src: "img/logo.svg",
80+
},
81+
items: [
82+
// {
83+
// type: "docSidebar",
84+
// sidebarId: "tutorialSidebar",
85+
// position: "left",
86+
// label: "Tutorial",
87+
// },
88+
{
89+
href: "https://docs.trustification.dev/",
90+
label: "Documentation",
91+
position: "left",
92+
},
93+
{ to: "/blog", label: "Blog", position: "left" },
94+
{
95+
href: "https://github.com/trustification",
96+
label: "GitHub",
97+
position: "right",
98+
},
99+
],
100+
},
101+
footer: {
102+
style: "dark",
103+
links: [
104+
{
105+
title: "Docs",
106+
items: [
107+
// {
108+
// label: "Tutorial",
109+
// to: "/docs/intro",
110+
// },
111+
{
112+
label: "Documentation",
113+
href: "https://docs.trustification.dev/",
114+
},
115+
{
116+
label: "Blog",
117+
to: "/blog",
118+
},
119+
],
120+
},
121+
{
122+
title: "Community",
123+
items: [
124+
{
125+
label: "Matrix",
126+
href: "https://app.element.io/?updated=1.11.32#/room/#trustification:matrix.org",
127+
},
128+
],
129+
},
130+
{
131+
title: "More",
132+
items: [
133+
// {
134+
// label: "Blog",
135+
// to: "/blog",
136+
// },
137+
{
138+
label: "GitHub",
139+
href: "https://github.com/trustification",
140+
},
141+
],
142+
},
143+
],
144+
copyright: `Copyright © ${new Date().getFullYear()} Trustification.`,
145+
},
146+
prism: {
147+
theme: prismThemes.github,
148+
darkTheme: prismThemes.dracula,
149+
},
150+
algolia: {
151+
appId: "UO35LKIYPP",
152+
apiKey: "a1e0ff4ab1305b5498c75f2842be01fb",
153+
indexName: "trustification.io",
154+
contextualSearch: false,
155+
},
156+
metadata: [{ name: "keywords", content: "supply chain, sbom, vex" }],
157+
} satisfies Preset.ThemeConfig,
158+
159+
stylesheets: [
160+
"https://fonts.googleapis.com/css2?family=Red+Hat+Text&display=swap",
161+
"https://fonts.googleapis.com/css2?family=Red+Hat+Text:wght@400;700&display=swap",
162+
],
163+
scripts: [],
164+
plugins: [
165+
async function myPlugin(context, options) {
166+
return {
167+
name: "docusaurus-tailwindcss",
168+
configurePostCss(postcssOptions) {
169+
// Appends TailwindCSS and AutoPrefixer.
170+
postcssOptions.plugins.push(require("tailwindcss"));
171+
postcssOptions.plugins.push(require("autoprefixer"));
172+
return postcssOptions;
173+
},
174+
};
175+
},
176+
],
177+
};
178+
179+
export default config;

0 commit comments

Comments
 (0)