hugo-theme-codex icon indicating copy to clipboard operation
hugo-theme-codex copied to clipboard

Make tag breadcrumb href value dynamic

Open miketmoore opened this issue 5 years ago • 8 comments

Hi @jakewies - I really like your theme and I made this change in my fork since I have a different URL for my blog.

miketmoore avatar Jul 21 '20 03:07 miketmoore

Hey @miketmoore ! Glad you're enjoying the project. This a useful change. Hardcoded urls in a theme should definitely be avoided. My only concern is that we aren't defining .Site.params.blogurl. Unless this is a built-in Hugo value (which I don't think it is), we'd have to make further adjustments:

  • Add a default value to exampleSite/config.toml
  • Document in the README that this value exists
  • Make sure that anywhere else in the project using a hardcoded "/blog" string gets refactored to .Site.params.blogurl

I'd also prefer to use camel casing, so .Site.params.blogUrl.

What do you think?

jakewies avatar Jul 21 '20 14:07 jakewies

Thanks for the response @jakewies - I agree with you on all points! I'll make the updates. Thanks!

miketmoore avatar Jul 24 '20 00:07 miketmoore

Will this change break existing sites until people add the field to their config file?

RLesser avatar Aug 09 '20 14:08 RLesser

@RLesser I believe existing sites running this theme won't receive the change unless they pull in changes. But I could be wrong. I'm not too familiar with using a Hugo theme since I technically don't use one.

jakewies avatar Aug 09 '20 20:08 jakewies

Thanks for the feedback everybody. I haven't forgotten about this but have been very busy. I'll try to get to it sooner than later.

miketmoore avatar Sep 19 '20 21:09 miketmoore

Hey @miketmoore , just pinging to see if there is any update on this 😄

jakewies avatar Oct 18 '20 16:10 jakewies

Should this also include a change for seo-schema.html?

https://github.com/jakewies/hugo-theme-codex/blob/da2d16a4f95fc37e71548dfc139d51e22ebb09bd/layouts/partials/seo-schema.html#L4

@jakewies @miketmoore

estahn avatar Jan 10 '21 03:01 estahn

@jakewies Sorry to leave this sitting here. I'll try to make time soon! I'll also review the other comments by @RLesser and @estahn.

miketmoore avatar Jan 11 '21 15:01 miketmoore