jhvanderschee / hugobricks

MIT License
67 stars 23 forks source link

Are anchor links to a specific brick possible? #44

Closed iroQuai closed 11 months ago

iroQuai commented 12 months ago

First of all: I'm impressed how flexible and easy hugobricks is! It makes me capable of creating websites I never dreamed of creating in hugo (since i'm just a hobbyist with no formal training what so ever in this field). So: thank you for open sourcing this!!

My question: Is it possible to create a link to a specific brick on a page? Like https://www.hugobricks.preview.usecue.com/#cta to scroll to the call to action on the index page? If so, (where) can I specify the anchor name?

iroQuai commented 11 months ago

found my own answer: yes, it's possible when inspecting page, i found the ID of the H2 header i wanted to link to; this can be used to make the anchor link

Like this: https://www.hugobricks.preview.usecue.com#what-users-say-about-hugobricks

Only thing is a sticky header doesn't play nice with this, it overlaps the title...

jhvanderschee commented 11 months ago

Ah... there is a solution for that... I will take a look. Thank you for reporting this.