Commit Graph

8 Commits

Author SHA1 Message Date
David Segonds
4cc3fb26ce Modify breadcrumbs logic
First part of the breadcrumbs generation algorithm is to remove the
base URL from the parent's permalink URL.

In the existing code, this is achieve by replacing all instances of
base URL in the parent's permalink URL by an empty string.

This algorithm fails to produces breadcrumbs in the instance where the
base URL is "/" for example.

I believe this is erroneous as only the first instance of the base URLi,
starting at the beginning of the parent's permalink URL should be
replaced by an empty string.

This is the reason I replaced the call to "replace" by a call to
"replaceRE".
2023-01-06 09:11:50 +01:00
Aditya Telange
575cc0ca8c
Use site function instead of .Site or $.Site
- The site function provides global access to the same data as the .Site page method.
- Current context (`.`) is never considered.
2022-03-27 18:44:06 +05:30
Aditya Telange
196b82645e
Fix Spacing in overall repo 2021-03-30 18:26:43 +05:30
Aditya Telange
fe94d7f347
Revert "Remove trailing and leading slashes off the $url for Breadcrumb gen;"
This reverts commit 0f0e027def.
2021-03-28 20:14:11 +05:30
Aditya Telange
0f0e027def
Remove trailing and leading slashes off the $url for Breadcrumb gen;
so that no empty values remain in []interface

fixes: #331
2021-03-28 19:25:09 +05:30
Jason Lavoie
5e05ed6543
Enforce language url subsitution on path boundary for breadcrumbs (#254)
* Without this, the section name gets mangled when the language was a
  sub-string of the section.  For example, under 'en', a section named
  "fragment" changes to "fragmt".
2021-02-22 11:30:04 +05:30
Aditya Telange
034da04180
use local scratch var in breadcrumbs
- fix undisplayed breadcrumbs in section pages
 having pagination
2021-02-10 21:43:45 +05:30
Aditya Telange
43ddff0fde
breadcrumb nav as partial 2021-02-08 20:28:55 +05:30