getbem.github.io icon indicating copy to clipboard operation
getbem.github.io copied to clipboard

Fix failed view load when url has an ID (#147)

Open ghost opened this issue 7 years ago • 0 comments

This fix resolves the dead link bug described in issue https://github.com/getbem/getbem.com/issues/147

Currently, the url if statement is looking for a view that does not exist. This is because it is checking against the url post '/'. i.e. 'faq/#custom-tags-for-blocks' is interpreted as a page rather than the page '/faq' AND an anchor '#custom-tags-for-blocks'.

To solve this, we check to see if the URL contains an ID. If true, we remove the ID and load the appropriate view.

ghost avatar Feb 21 '18 22:02 ghost