Skip to content
Open
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
12 changes: 9 additions & 3 deletions packages/docusaurus/config/remark/autoLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,24 @@ export const plugin = (userSpecs: Array<AutoLinkSpec>) => () => {

for (const segment of segments) {
if (node.type === `object`) {
if (!Object.hasOwn(node.properties, segment))
const bareSegment = segment.replace(`[]`, ``);
if (node.properties == null || !Object.hasOwn(node.properties, bareSegment))
return false;

node = node.properties[segment];
node = node.properties[bareSegment];

if (segment.endsWith(`[]`) && node.patternProperties != null) {
const key = Object.keys(node.patternProperties)[0];
node = node.patternProperties[key];
}
}
}

if (typeof node.title === `undefined`)
return false;

const url = !ancestors.find(ancestor => ancestor.type === `link`)
? spec.urlGenerator(segments.join(`.`))
? spec.urlGenerator(segments.map(i => i.replace(`[]`, ``)).join(`.`))
: null;

result = {
Expand Down
4 changes: 4 additions & 0 deletions packages/docusaurus/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ html.search-page-wrapper .row {
color: rgb(156, 220, 254);
}

.rjd-annotation a code {
cursor: pointer;
}

.terminal-code pre {
--prism-background-color: #393A34 !important;
--prism-color: #f6f8fa !important;
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/static/configuration/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"properties": {
"built": {
"title": "Define whether to run the postinstall script or not.",
"description": "If false, the package will never be built (deny-list). This behavior is reversed when the `enableScripts` yarnrc setting is toggled off - when that happens, only packages with `built` explicitly set to `true` will be built (allow-list); as for those with `built` explicitly set to `false`, they will simply see their build script warnings downgraded into simple notices.",
"description": "If false, the package will never be built (deny-list). This behavior is reversed when the [`enableScripts` yarnrc setting](yarnrc#enableScripts) is toggled off - when that happens, only packages with `built` explicitly set to `true` will be built (allow-list); as for those with `built` explicitly set to `false`, they will simply see their build script warnings downgraded into simple notices.",
"type": "boolean",
"examples": [false]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/static/configuration/yarnrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"enableScripts": {
"_package": "@yarnpkg/core",
"title": "Define whether to run postinstall scripts or not.",
"description": "If false, Yarn will not execute the `postinstall` scripts from third-party packages when installing the project (workspaces will still see their postinstall scripts evaluated, as they're assumed to be safe if you're running an install within them).\n\nNote that you also have the ability to disable scripts on a per-package basis using `dependenciesMeta`, or to re-enable a specific script by combining `enableScripts` and `dependenciesMeta`.",
"description": "If false, Yarn will not execute the `postinstall` scripts from third-party packages when installing the project (workspaces will still see their postinstall scripts evaluated, as they're assumed to be safe if you're running an install within them).\n\nNote that you also have the ability to disable scripts on a per-package basis using [`dependenciesMeta[].built`](manifest#dependenciesMeta.built), or to re-enable a specific script by combining `enableScripts` and [`dependenciesMeta[].built`](manifest#dependenciesMeta.built).",
"type": "boolean",
"default": true
},
Expand Down