Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msudgh/hexo-breadcrumb
Generate breadcrumb for Hexo
https://github.com/msudgh/hexo-breadcrumb
breadcrumb hexo nodejs
Last synced: 24 days ago
JSON representation
Generate breadcrumb for Hexo
- Host: GitHub
- URL: https://github.com/msudgh/hexo-breadcrumb
- Owner: msudgh
- License: mit
- Created: 2018-03-15T06:37:06.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-04T09:51:13.000Z (about 2 months ago)
- Last Synced: 2024-10-13T01:06:12.918Z (about 1 month ago)
- Topics: breadcrumb, hexo, nodejs
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/hexo-breadcrumb
- Size: 641 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-breadcrumb
[![NPM](https://img.shields.io/npm/v/hexo-breadcrumb)](https://www.npmjs.com/package/hexo-breadcrumb)
[![License](https://img.shields.io/github/license/msudgh/hexo-breadcrumb)](LICENSE)A Hexo plugin to generate breadcrumb navigation for post and page layouts.
## Features
- Compatible with post and page layouts.
- Set custom title for the home page.
- Customize delimiter and styling.
- Accessible navigation with ARIA attributes of navigation.## Installation
1. [**ni**](https://github.com/antfu/ni): `ni hexo-breadcrumb -D`
2. [**npm**](https://npmjs.com/): `npm i hexo-breadcrumb -D`
3. [**yarn**](https://yarnpkg.com/): `yarn add hexo-breadcrumb -D`
4. [**pnpm**](https://pnpm.io/): `pnpm add hexo-breadcrumb -D`## Usage
### Configuration
In `_config.yml` file, specify the breadcrumb settings as following:
```yaml
breadcrumb:
delimiter:
# /, >, etc.
content: "/"
# Applied on ::after pseudo element.
style: "font-weight: bold;"
aria:
nav: "Breadcrumb"
homepage:
# Customize the title for the homepage in the breadcrumb.
title: Home
templates:
- layout: post
tokens:
- home
- category
- title
- layout: page
tokens:
- home
- title
```### Integration with Hexo themes
Add the following snippets to a layout file in order to display the breadcrumb.
```ejs
<%- page.breadcrumb %>
```## License
This project is licensed under the [MIT License](LICENSE).