codebushi / gatsby-starter-dimension

Gatsby.js V2 starter template based on Dimension, designed by HTML5 UP. Check out https://codebushi.com/gatsby-starters-and-themes/ for more Gatsby starters.
Other
319 stars 196 forks source link

Internal Linking #47

Open kerrywuhoo opened 4 years ago

kerrywuhoo commented 4 years ago

I may be just overlooking something, but I'm still super new to webdev. But when you click on the "check out my awesome work." on the about me page it should pop open the work article right? But the link https://gatsby-dimension.surge.sh/#work just goes to the homepage and not the work article.

ChangoMan commented 4 years ago

Thanks Kerry, the site currently isn't hooked up to open the proper article based on a direct link. I may try to add this feature in the future if enough people request it.

Basically you need to detect the window.location url and if there is something like #work in the url, then you have that article open up on page load. You could try to hook that up if you want.

smw-wagnerma commented 4 years ago

I also vote for this feature, internal linking from a word or text line is often need, for example moving directly from an article to the contact form, or from a word on the landing page directly to an article.

DevS1993 commented 4 years ago

@ChangoMan Are you accepting PR's?

I am using this starter for my personal portfolio (thanks btw :smile:) and through state i am able to switch between articles. I can extract that code and submit a PR.

jeremydulong commented 3 years ago

@DevS1993 Are you able to share that code somehow? I do want to use it