Skip to content

Commit 012ab72

Browse files
authored
fix(docs): fix code-blocks, theme and admonitions (#906)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent ffbc16a commit 012ab72

File tree

4 files changed

+1578
-826
lines changed

4 files changed

+1578
-826
lines changed

docs/docs/intro/intro.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ title: Introduction
88
import MailingListForm from "../partials/_mailing-list-form.mdx";
99
import Image from "@theme/IdealImage";
1010

11-
:::info UPDATE
12-
Chainloop is now Open Source! 🎉
13-
14-
Read more in [our announcement post](https://chainloop.dev/blog/chainloop-open-source)
15-
:::
16-
1711
Your name is Dyson, **you work on the Security and Operations (SecOps) team** at Cyberdyne solutions. You are in charge of making sure that the organization's Software Supply Chain (SSC) Security is improved end-to-end, from source code to packaging and distribution.
1812

1913
You feel pretty good about the current state of things. Your development teams are already signing their commits, scanning their first and third-party components, generating Software Bill of Materials (SBOMs), signing container images and even blocking releases based on vulnerability scanning or signature verification. Life is good!

docs/docusaurus.config.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require("prism-react-renderer/themes/github");
5-
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
4+
const { themes } = require("prism-react-renderer");
5+
const lightCodeTheme = themes.github;
6+
const darkCodeTheme = themes.dracula;
67

78
/** @type {import('@docusaurus/types').Config} */
89
const config = {
@@ -22,9 +23,10 @@ const config = {
2223
locales: ["en"],
2324
},
2425
// Register posthog only in production
25-
clientModules: process.env.NODE_ENV === "production"
26-
? [require.resolve("./src/client-modules/register-posthog.js")]
27-
: [],
26+
clientModules:
27+
process.env.NODE_ENV === "production"
28+
? [require.resolve("./src/client-modules/register-posthog.js")]
29+
: [],
2830

2931
plugins: [
3032
[
@@ -211,11 +213,6 @@ ${content
211213
routeBasePath: "/",
212214
editUrl: "https://github.com/chainloop-dev/chainloop/blob/main/docs",
213215
},
214-
blog: {
215-
showReadingTime: true,
216-
blogTitle: "Chainloop blog",
217-
blogDescription: "Chainloop blog",
218-
},
219216
theme: {
220217
customCss: require.resolve("./src/css/custom.css"),
221218
},
@@ -291,7 +288,7 @@ ${content
291288
prism: {
292289
theme: lightCodeTheme,
293290
darkTheme: darkCodeTheme,
294-
additionalLanguages: ["log", "cue"],
291+
additionalLanguages: ["log", "cue", "bash", "json"],
295292
},
296293
metadata: [
297294
{
@@ -301,7 +298,9 @@ ${content
301298
},
302299
],
303300
}),
304-
scripts: ["https://app.termly.io/resource-blocker/48c15f14-86c1-4734-bad4-8a627fa691fa?autoBlock=on"],
301+
scripts: [
302+
"https://app.termly.io/resource-blocker/48c15f14-86c1-4734-bad4-8a627fa691fa?autoBlock=on",
303+
],
305304
};
306305

307306
module.exports = config;

docs/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "^3.1.1",
18-
"@docusaurus/plugin-ideal-image": "^3.1.1",
19-
"@docusaurus/preset-classic": "^3.1.1",
20-
"@mdx-js/react": "^1.6.22",
17+
"@docusaurus/core": "^3.4.0",
18+
"@docusaurus/plugin-ideal-image": "^3.4.0",
19+
"@docusaurus/preset-classic": "^3.4.0",
20+
"@mdx-js/react": "^3.0.0",
2121
"clsx": "^1.2.1",
2222
"docusaurus-plugin-remote-content": "^4.0.0",
2323
"posthog-docusaurus": "^2.0.0",
24-
"prism-react-renderer": "^1.3.5",
24+
"prism-react-renderer": "^2.1.5",
2525
"raw-loader": "^4.0.2",
2626
"react": "^18.2.0",
2727
"react-dom": "^18.2.0"
2828
},
2929
"devDependencies": {
30-
"@docusaurus/module-type-aliases": "^3.1.1"
30+
"@docusaurus/module-type-aliases": "^3.4.0"
3131
},
3232
"browserslist": {
3333
"production": [

0 commit comments

Comments
 (0)