Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional breadcrumb trail #166

Merged
merged 1 commit into from
Mar 5, 2021
Merged

Add optional breadcrumb trail #166

merged 1 commit into from
Mar 5, 2021

Conversation

h-enk
Copy link
Member

@h-enk h-enk commented Mar 5, 2021

Set in ./config/_default/params.toml:

[options]
  breadCrumb = true

Example:

Snag_2d29ad1

Markup:

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="//localhost:1313/">Home</a></li>
    <li class="breadcrumb-item"><a href="//localhost:1313/docs/">Docs</a></li>
    <li class="breadcrumb-item"><a href="//localhost:1313/docs/prologue/">Prologue</a></li>
    <li class="breadcrumb-item active" aria-current="page">Introduction</li>
  </ol>
</nav>

Note: this is an optional user breadcrumb trail — next to the already implemented JSON-LD for rich results:

{
  "@context":"http://schema.org",
  "@type":"BreadcrumbList",
  "itemListElement":[
    {
      "@type":"ListItem",
      "position":1,
      "name":"Home",
      "item":"https:\/\/getdoks.org"
    },
    {
      "@type":"ListItem",
      "position":3,
      "name":"Docs",
      "item":"https:\/\/getdoks.org\/docs\/"
    },
    {
      "@type":"ListItem",
      "position":4,
      "name":"Prologue",
      "item":"https:\/\/getdoks.org\/docs\/prologue\/"
    },
    {
      "@type":"ListItem",
      "position":5,
      "name":"Introduction",
      "item":"https:\/\/getdoks.org\/docs\/prologue\/introduction\/"
    }
  ]
}

@h-enk
Copy link
Member Author

h-enk commented Mar 5, 2021

@h-enk h-enk self-assigned this Mar 5, 2021
@h-enk h-enk linked an issue Mar 5, 2021 that may be closed by this pull request
@h-enk h-enk merged commit 4a3e093 into master Mar 5, 2021
@h-enk h-enk deleted the doks-breadcrumb-navigation branch March 5, 2021 20:23
adhadse pushed a commit to adhadse/doks that referenced this pull request Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Breadcrumb Navigation
1 participant