@tenjuu99/blog 0.2.28 → 0.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenjuu99/blog",
3
- "version": "0.2.28",
3
+ "version": "0.2.30",
4
4
  "description": "blog template",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "chokidar": "^3.6.0",
24
+ "chokidar": "^4.0.x",
25
25
  "marked": "^13.x"
26
26
  },
27
27
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  import { allData, config } from '@tenjuu99/blog'
2
2
 
3
- export function breadcrumbList(pageName) {
3
+ export function breadcrumbList(pageName, topPageName = 'top') {
4
4
  const pageData = allData[pageName]
5
5
  const entries = Object.entries(allData)
6
6
  const breadCrumbs = ['/']
@@ -28,7 +28,7 @@ export function breadcrumbList(pageName) {
28
28
 
29
29
  const output = breadCrumbs.map(v => {
30
30
  const href = config.relative_path ? config.relative_path + v[0] : v[0]
31
- return `<div class="breadcrumbs-item"><a href="${href}">${v[0] === '/' ? 'top' : v[1]}</a></div>`
31
+ return `<div class="breadcrumbs-item"><a href="${href}">${v[0] === '/' ? topPageName : v[1]}</a></div>`
32
32
  }).join('') + `<div class="breadcrumbs-item">${last[1]}</div>`
33
33
  return '<div class="breadcrumbs">'
34
34
  + output