Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have JS generation code preserve <base> directives #76

Closed
tidoust opened this issue Sep 18, 2017 · 0 comments · Fixed by #101
Closed

Have JS generation code preserve <base> directives #76

tidoust opened this issue Sep 18, 2017 · 0 comments · Fixed by #101

Comments

@tidoust
Copy link
Member

tidoust commented Sep 18, 2017

Via #68. The easiest way to manage translations of a roadmap is to put translated files in a separate subfolder and to add a <base href="../" /> directive to translated files to fix relative links. Problem is the JS currently overrides that directive with the template header.

Bonus: preserve other directives such as <link> and <style>.

tidoust added a commit to tidoust/media-web-roadmap that referenced this issue Oct 18, 2017
This commit implements the following changes:
- Custom directives in the <head> are now preserved. This makes it possible to
set a different <base> but also to override the CSS as well as to insert JS
code if needed (fixes w3c#76)
- Given an empty <a data-featureid="[feature]"></a>, the code automatically
sets the content of the link to the name of the feature if it exists, in other
words the "feature" value in the "data/[feature].json" file, or to the title of
the underlying specification otherwise (fixes w3c#78)
- IDs are automatically generated for sections, feature paragraphs and
individual feature references. The code used was stolen from Respec (fixes w3c#95)
@xfq xfq closed this as completed in #101 Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant