FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: remove heading autolinks and duplicate index nav items · patternfly-java/patternfly-java@0f80b0f · GitHub

Commit 0f80b0f

Browse files
committed
fix: remove heading autolinks and duplicate index nav items
Remove rehype-autolink-headings plugin so markdown headers are plain text instead of clickable links. Remove the separate index navigation item from folder groups — the route is still registered but the duplicate "Concepts" child item under the "Concepts" group is gone.
1 parent 600ae56 commit 0f80b0f

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

‎showcase/markdown.mjs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import remarkGfm from 'remark-gfm';
2121
import remarkFrontmatter from 'remark-frontmatter';
2222
import remarkRehype from 'remark-rehype';
2323
import rehypeSlug from 'rehype-slug';
24-
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
24+
2525
import rehypeShiki from '@shikijs/rehype';
2626
import rehypeStringify from 'rehype-stringify';
2727
import YAML from 'yaml';
@@ -94,7 +94,6 @@ async function createProcessor() {
9494
.use(extractToc)
9595
.use(remarkRehype, {allowDangerousHtml: true})
9696
.use(rehypeSlug)
97-
.use(rehypeAutolinkHeadings, {behavior: 'wrap'})
9897
.use(addHeadingClasses)
9998
.use(rehypeShiki, {
10099
theme: 'github-light',

‎showcase/src/main/java/org/patternfly/showcase/MarkdownManifest.java‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
import static elemental2.dom.DomGlobal.fetch;
3232
import static org.jboss.elemento.router.Place.place;
33-
import static org.jboss.elemento.router.Places.places;
33+
3434
import static org.patternfly.component.navigation.ExpandableNavigationGroup.expandableNavigationGroup;
3535
import static org.patternfly.component.navigation.NavigationItem.navigationItem;
3636

@@ -70,7 +70,7 @@ private void indexItems(ManifestItem[] items) {
7070
// ------------------------------------------------------ places
7171

7272
public Places places() {
73-
Places allPlaces = places();
73+
Places allPlaces = Places.places();
7474
addPlaces(allPlaces, items);
7575
return allPlaces;
7676
}
@@ -115,10 +115,6 @@ public org.patternfly.component.navigation.ExpandableNavigationGroup navGroup(Pl
115115
}
116116
org.patternfly.component.navigation.ExpandableNavigationGroup navGroup =
117117
expandableNavigationGroup(group.id, group.title);
118-
if (group.hasContent) {
119-
Place place = pm.place(group.route);
120-
navGroup.addItem(navigationItem(place.route, place.title, place.route));
121-
}
122118
if (group.children != null) {
123119
for (ManifestItem child : group.children) {
124120
if ("page".equals(child.type)) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL