[
https://issues.apache.org/jira/browse/BEAM-12372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Huntsperger updated BEAM-12372:
-------------------------------------
Description: On page load of a doc page, we get the current location and,
if it matches a link in the left nav, we make that link active and we open
collapsible parent nodes. The logic is
[here|https://github.com/apache/beam/blob/master/website/www/site/static/js/section-nav.js#L84-L96].
But this functionality is broken on the Hugo live server (i.e. the dev
server). It looks like the hostname and port are included in the left nav links
when running on the dev server, but not on the production server. For example,
{{href="/documentation/basics/"}} on the production site will be
{{href="//localhost:1313/documentation/basics/"}} on the dev server. That’s not
the behavior I’d expect. In any case, the localhost slug causes the script not
to match the current link. We could rewrite the script to work with both types
of path, or try to prevent the localhost name from being prepended, or …(?).
(was: On page load of a doc page, we get the current location and, if it
matches a link in the left nav, we make that link active and we open
collapsible parent nodes. The logic is
[here|https://github.com/apache/beam/blob/master/website/www/site/static/js/section-nav.js#L84-L96].
But this functionality is broken on the Hugo live server (i.e. the dev
server). It looks like the hostname and port are included in the left nav links
when running on the dev server, but not on the production server. For example,
{{href="/documentation/basics/"}} on the production site will be
{{href="//localhost:1313/documentation/basics/" }}on the dev server. That’s not
the behavior I’d expect. In any case, the localhost slug causes the script not
to match the current link. We could rewrite the script to work with both types
of path, or try to prevent the localhost name from being prepended, or …(?).)
> Doc section nav doesn’t open/close on live server
> -------------------------------------------------
>
> Key: BEAM-12372
> URL: https://issues.apache.org/jira/browse/BEAM-12372
> Project: Beam
> Issue Type: Bug
> Components: website
> Reporter: David Huntsperger
> Assignee: David Huntsperger
> Priority: P2
>
> On page load of a doc page, we get the current location and, if it matches a
> link in the left nav, we make that link active and we open collapsible parent
> nodes. The logic is
> [here|https://github.com/apache/beam/blob/master/website/www/site/static/js/section-nav.js#L84-L96].
> But this functionality is broken on the Hugo live server (i.e. the dev
> server). It looks like the hostname and port are included in the left nav
> links when running on the dev server, but not on the production server. For
> example, {{href="/documentation/basics/"}} on the production site will be
> {{href="//localhost:1313/documentation/basics/"}} on the dev server. That’s
> not the behavior I’d expect. In any case, the localhost slug causes the
> script not to match the current link. We could rewrite the script to work
> with both types of path, or try to prevent the localhost name from being
> prepended, or …(?).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)