{"id":19922211,"url":"https://github.com/sutara79/jquery.breadcrumbs-generator","last_synced_at":"2025-05-03T07:30:35.751Z","repository":{"id":29859493,"uuid":"33404466","full_name":"sutara79/jquery.breadcrumbs-generator","owner":"sutara79","description":"jQuery plugin to generate breadcrumb list automatically from sitemap.","archived":false,"fork":false,"pushed_at":"2018-07-27T00:43:45.000Z","size":723,"stargazers_count":3,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T04:03:38.273Z","etag":null,"topics":["breadcrumbs","jquery-plugin"],"latest_commit_sha":null,"homepage":"https://sutara79.github.io/jquery.breadcrumbs-generator","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sutara79.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-04T12:17:40.000Z","updated_at":"2021-05-12T22:01:56.000Z","dependencies_parsed_at":"2022-09-07T13:11:15.852Z","dependency_job_id":null,"html_url":"https://github.com/sutara79/jquery.breadcrumbs-generator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sutara79%2Fjquery.breadcrumbs-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sutara79%2Fjquery.breadcrumbs-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sutara79%2Fjquery.breadcrumbs-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sutara79%2Fjquery.breadcrumbs-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sutara79","download_url":"https://codeload.github.com/sutara79/jquery.breadcrumbs-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252156716,"owners_count":21703332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["breadcrumbs","jquery-plugin"],"created_at":"2024-11-12T22:10:00.632Z","updated_at":"2025-05-03T07:30:35.191Z","avatar_url":"https://github.com/sutara79.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jquery.breadcrumbs-generator\n\n[![npm version](https://img.shields.io/npm/v/jquery.breadcrumbs-generator.svg)](https://www.npmjs.com/package/jquery.breadcrumbs-generator)\n[![Build Status](https://travis-ci.org/sutara79/jquery.breadcrumbs-generator.svg?branch=master)](https://travis-ci.org/sutara79/jquery.breadcrumbs-generator)\n\njQuery plugin to generate breadcrumb list automatically from sitemap.  \nIf you can use server-side language (e.g. PHP, Ruby, Perl), you don't need this plugin.\n\n![screenshot](./sample/ss1.png)\n\n\n## Demo\nhttps://sutara79.github.io/jquery.breadcrumbs-generator\n\n\n## Install\n- [GitHub](https://github.com/sutara79/jquery.breadcrumbs-generator): Clone or download. Only you need is `dist/`.\n- [npm](https://www.npmjs.com/package/jquery.breadcrumbs-generator): `npm i jquery.breadcrumbs-generator`\n- CDN ([jsDelivr](https://github.com/jsdelivr/jsdelivr#usage)):\n    - jquery.breadcrumbs-generator.min.js: [v1.0.3](https://cdn.jsdelivr.net/npm/jquery.breadcrumbs-generator@1.0.3/dist/jquery.breadcrumbs-generator.min.js)\n\n\n## Usage\n###### \u0026lt;head\u0026gt;\n```html\n\u003cscript src=\"https://code.jquery.com/jquery-3.2.1.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"jquery.breadcrumbs-generator.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n$(function() {\n  $('#breadcrumbs').breadcrumbsGenerator();\n});\n\u003c/script\u003e\n```\n\n###### \u0026lt;body\u0026gt;\n```html\n\u003col id=\"breadcrumbs\"\u003e\u003c/ol\u003e\n\u003cul id=\"sitemaps\"\u003e\n  \u003cli\u003e\n    \u003ca href=\"index.html\"\u003eHome\u003c/a\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003ca href=\"menu1.html\"\u003eMenu1\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"menu2.html\"\u003eMenu2\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"menu3.html\"\u003eMenu3\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n```\n\n###### CSS\n```css\n#breadcrumbs li {\n  display: inline-block;\n}\n#breadcrumbs li:not(:first-child) {\n  margin-left: 0.4em;\n}\n#breadcrumbs li:not(:first-child):before {\n  content: '\u003e';\n  margin-right: 0.4em;\n}\n```\n\n## Note\n##### Breadcrumbs structure\nThis plugin creates like `\u003cli\u003e\u003ca href=\"#\"\u003efoo\u003c/a\u003e\u003c/li\u003e`.  \nSo, you should use `\u003col\u003e` or `\u003cul\u003e` for breadcrumbs.\n\n##### Sitemaps structure\nThis plugin searches for current-page and its ancestors in href-attributes of the sitemaps.  \nSo, you don't use href-attribute for other purpose in the sitemaps.\n\n##### How to move the home-link to the list of breadcrumbs\nIf you use `#sitemaps` as a global-navi, and don't need the home-link, you can also move it to `#breadcrumbs`.\n\n```html\n\u003col id=\"breadcrumbs\"\u003e\u003cli\u003e\u003ca href=\"index.html\"\u003eHome\u003c/a\u003e\u003c/li\u003e\u003c/ol\u003e\n\u003cul id=\"sitemaps\"\u003e\n  \u003cli\u003e\u003ca href=\"menu1.html\"\u003eMenu1\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"menu2.html\"\u003eMenu2\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"menu3.html\"\u003eMenu3\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n```\n\n## Options\nYou can set options like followings.\n\n```javascript\n$('#breadcrumbs').breadcrumbsGenerator({\n  sitemaps: '#sitemaps',\n  index_type: 'index.html'\n});\n```\n\n|Name      |Type  |Default     |Description                |\n|----------|------|------------|---------------------------|\n|sitemaps  |string|'#sitemaps' |jQuery selector for sitemap|\n|index_type|string|'index.html'|Filename of directory index. This is for when the requested url is a directory (e.g. `example.com/`), not a file (e.g. `example.com/index.html`).|\n\n\n## Compatibility\n- jQuery: \u003e=3.0.0 ([because of XSS vulnerability](https://nodesecurity.io/advisories/jquery_xss))\n- Browser: Chrome58, Firefox53, IE11, Edge14\n\n\n## License\n[MIT](http://www.opensource.org/licenses/mit-license.php)\n\n\n## Author\n[Yuusaku Miyazaki](http://sutara79.hatenablog.com/entry/2015/04/04/215219)\n( \u003ctoumin.m7@gmail.com\u003e )","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsutara79%2Fjquery.breadcrumbs-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsutara79%2Fjquery.breadcrumbs-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsutara79%2Fjquery.breadcrumbs-generator/lists"}