Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a49697a
Add Breadcrumb component
itsyme Feb 12, 2023
9b2053d
Merge branch 'master' into add-breadcrumbs
itsyme Feb 12, 2023
8446b20
Merge branch 'master' into add-breadcrumbs
itsyme Feb 22, 2023
9e52b2c
Update Breadcrumb component to generate from url
itsyme Feb 22, 2023
26efe57
Merge branch 'master' into add-breadcrumbs
itsyme Feb 27, 2023
470d8c4
Merge branch 'master' into add-breadcrumbs
itsyme Mar 1, 2023
f81ad86
Merge branch 'master' into add-breadcrumbs
itsyme Mar 13, 2023
62f6a36
Change approach to use site-nav
itsyme Mar 13, 2023
e130ef4
Fix missing breadcrumb issue
itsyme Mar 14, 2023
3736018
Fix breadcrumbs returning first link instead of folder
itsyme Mar 14, 2023
d1a11c8
Change style for non-link breadcrumbs
itsyme Mar 14, 2023
52e0ee0
Merge branch 'master' into add-breadcrumbs
itsyme Mar 15, 2023
eaaed3d
Remove showBreadcrumb
itsyme Mar 15, 2023
58af2cc
Add documentation for Breadcrumbs
itsyme Mar 15, 2023
40f2420
Add bold
itsyme Mar 15, 2023
1577de8
Relocate to Navigation and add example
itsyme Mar 15, 2023
bcda8c0
Fix nits in docs
itsyme Mar 15, 2023
0681963
Merge branch 'master' into add-breadcrumbs
itsyme Mar 21, 2023
7417a27
Update non-link color
itsyme Mar 21, 2023
8a3eff0
Change color of non-links
itsyme Mar 21, 2023
a6eb601
Merge branch 'master' into add-breadcrumbs
itsyme Mar 24, 2023
0765cc9
Merge branch 'master' into add-breadcrumbs
itsyme Mar 25, 2023
7a78d3c
Merge branch 'master' into add-breadcrumbs
itsyme Mar 26, 2023
fbba3b5
Add breadcrumb to test site
itsyme Mar 26, 2023
dbcd040
Restore others docs page content
itsyme Mar 26, 2023
0fd9d9c
Add comments
itsyme Mar 26, 2023
b6c75ce
Add tests
itsyme Mar 27, 2023
838cf04
Add snapshot test for breadcrumbs
itsyme Mar 27, 2023
6dfcfc2
Undo breadcrumb in test site for merge
itsyme Mar 27, 2023
6c5b9ba
Merge branch 'master' into add-breadcrumbs
itsyme Mar 27, 2023
3d88001
Add breadcrumb to test site
itsyme Mar 27, 2023
d388747
Fix typo in test
itsyme Mar 27, 2023
34ba094
Merge branch 'master' into add-breadcrumbs
itsyme Mar 28, 2023
301881d
Merge branch 'master' into add-breadcrumbs
itsyme Mar 28, 2023
dba91ad
Make improvements
itsyme Mar 29, 2023
aa0a123
Make improvements
itsyme Mar 29, 2023
4c6c68c
Merge branch 'master' into add-breadcrumbs
itsyme Mar 29, 2023
95d1c28
Add breadcrumb to default template
itsyme Mar 29, 2023
45bae02
Update tests
itsyme Mar 29, 2023
c673b2f
Add tests that query from sitenav
itsyme Mar 30, 2023
d566ac3
Merge branch 'master' into add-breadcrumbs
itsyme Mar 30, 2023
e91d38e
Use nextTick for tests
itsyme Mar 30, 2023
52c6edf
Merge branch 'master' into add-breadcrumbs
itsyme Apr 1, 2023
e6b98df
Update tests
itsyme Apr 1, 2023
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 docs/_markbind/layouts/devGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
</div>
</nav>
<div id="content-wrapper">
<breadcrumb />
{{ content }}
</div>
<nav id="page-nav">
Expand Down
1 change: 1 addition & 0 deletions docs/_markbind/layouts/userGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
</div>
</nav>
<div id="content-wrapper">
<breadcrumb />
{{ content }}
</div>
<nav id="page-nav">
Expand Down
1 change: 1 addition & 0 deletions docs/userGuide/fullSyntaxReference.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

badges : ['Badges', ['presentation', 'reader-facing']],
boxes : ['Boxes', ['presentation', 'reader-facing']],
breadcrumbs : ['Breadcrumbs', ['navigation', 'reader-facing']],
panels : ['Panels', ['presentation', 'reader-facing']],
tabs : ['Tabs', ['presentation', 'reader-facing']],
pictures : ['Pictures', ['images-diagrams', 'reader-facing']],
Expand Down
47 changes: 47 additions & 0 deletions docs/userGuide/syntax/breadcrumbs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## Breadcrumbs

Breadcrumb components provide an easy way for readers to navigate the hierarchy of the site.

#### Usage

Simply include the breadcrumb component (`<breadcrumb />`) into the page you want and breadcrumbs for that page will be automatically generated.

You can also insert the breadcrumb component into a layout file to generate breadcrumbs for all pages using that layout.

%%CODE:%%

<div class="indented">

```html
<breadcrumb />
```

</div>

%%OUTPUT:%%

<div class="indented">

> <breadcrumb />

</div>

<box type="tip" seamless>
Breadcrumb components refer to the Site Navigation for the hierarchy of pages.

**Breadcrumbs will not appear if there is no Site Navigation present on the page!**
</box>

<!-- Included in syntax cheat sheet -->
<div id="short" class="d-none">

```html
<breadcrumb />
```

</div>

<!-- Included in readerFacingFeatures.md -->
<div id="examples" class="d-none">
<breadcrumb />
</div>
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</div>
</nav>
<div id="content-wrapper">
<breadcrumb />
{{ content }}
</div>
<nav id="page-nav">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>

<div class="website-content">
<p><strong>Bug Description</strong></p>
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/cli/test/functional/test_site/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>

<div class="website-content">
<p><strong>Test <code class="line-numbers hljs inline no-lang" v-pre>&lt;markdown&gt;</code> and <code class="line-numbers hljs inline no-lang" v-pre>&lt;md&gt;</code> elements</strong></p>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<p>This is a page from another MarkBind site.</p>
<h2 id="feature-list">Feature list<a class="fa fa-anchor" href="#feature-list" onclick="event.stopPropagation()"></a></h2>
<p>It is a list of features (or functionalities) grouped according to some criteria such as priority
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<p><strong>baseUrl in a nested sub-site should correctly evaluate to the nested sub-site</strong></p>
<p>The base url in the nested_sub_site is /test_site/sub_site/nested_sub_site.</p>
<div>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<p>Test for nunjucks' various functions that use a path.
By design, nunjucks' relative paths resolve from the configured template root directory.</p>
<p>Hence, in MarkBind, these paths should also follow this behaviour.
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<p>Test for nunjucks' various functions that use a path.
By design, nunjucks' relative paths resolve from the configured template root directory.</p>
<p>Hence, in MarkBind, these paths should also follow this behaviour.
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<hr>
<p>This is not a valid key-value syntax. It should be treated as a divider.</p>
<p>key: value (This should be shown literally)</p>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>

<p>test: This should not be processed.</p>
<hr>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>

<h1 id="root-file">Root file<a class="fa fa-anchor" href="#root-file" onclick="event.stopPropagation()"></a></h1>
<h1 id="should-have-anchor">should have anchor<a class="fa fa-anchor" href="#should-have-anchor" onclick="event.stopPropagation()"></a></h1>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<p><strong>Annotate with saved Image</strong></p>
<annotate src="./images/annotateSampleImage.png" width="500" alt="sampleImage">
<a-point x="25%" y="25%" content="Lorem ipsum dolor sit amet"></a-point>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>

<navbar type="dark">
<li><a href="/" class="nav-link">One</a></li>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<h1 id="center-text">Center Text<a class="fa fa-anchor" href="#center-text" onclick="event.stopPropagation()"></a></h1>
<p>This line is not centered.
<div class="text-center">But this line is</div>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<p><strong>Test: Code blocks</strong></p>
<p><strong>Normal fenced code should render correctly</strong></p>
<pre><code class="line-numbers hljs" v-pre><span>Content in a fenced code block
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>
<h2 id="dates">Dates<a class="fa fa-anchor" href="#dates" onclick="event.stopPropagation()"></a></h2>
<p>Mon 12 Aug should be Mon 12 Aug</p>
<p>12 08 2019 should be 12 08 2019</p>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>

<p>A page with an empty alternate frontmatter should still build.</p>
</div>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ <h3 id="testing-site-nav">Testing Site-Nav<a class="fa fa-anchor" href="#testing
</div>
</overlay-source>
<div id="content-wrapper">
<breadcrumb></breadcrumb>

<p>A page with an empty frontmatter should still build.</p>
</div>
Expand Down
Loading