astro-accelerator-utils 0.2.15 → 0.2.16

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.
@@ -25,9 +25,10 @@ export class Navigation {
25
25
  * Returns a list of breadcrumbs
26
26
  * @param {URL} currentUrl
27
27
  * @param {string} subfolder
28
+ * @param {number} customCount
28
29
  * @returns {NavPage[]}
29
30
  */
30
- breadcrumbs(currentUrl, subfolder) {
31
+ breadcrumbs(currentUrl, subfolder, customCount) {
31
32
  const allPages = this.posts.all();
32
33
 
33
34
  const pathParts = currentUrl.pathname.split('/');
@@ -50,7 +51,9 @@ export class Navigation {
50
51
  }
51
52
  });
52
53
 
53
- navPages[navPages.length -1].url = currentUrl.pathname;
54
+ if (customCount === 0) {
55
+ navPages[navPages.length -1].url = currentUrl.pathname;
56
+ }
54
57
 
55
58
  this.setCurrentPage(navPages, currentUrl);
56
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-accelerator-utils",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "Astro utilities for Astro Accelerator.",
5
5
  "main": "index.mjs",
6
6
  "type": "module",