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

Add id attribute on "Twig Reference" headline element #1564

Closed
xabbuh opened this issue Nov 7, 2014 · 6 comments
Closed

Add id attribute on "Twig Reference" headline element #1564

xabbuh opened this issue Nov 7, 2014 · 6 comments

Comments

@xabbuh
Copy link
Contributor

xabbuh commented Nov 7, 2014

It would be nice if we had an id attribute on the h1 element for the "Twig Reference" headline on http://twig.sensiolabs.org/documentation. This way, we were able to directly link to this section from the Symfony documentation.

@weaverryan
Copy link
Contributor

Tiny detail, but +1. We reference this in the Symfony docs by saying "go to this URL and scroll down to Twig Reference".

Thanks!

@wouterj
Copy link
Contributor

wouterj commented Nov 7, 2014

👍

@lyrixx
Copy link
Contributor

lyrixx commented Nov 12, 2014

I submitted a PR in the website repository. But it's not yet merged / deployed.

diff --git a/templates/documentation.html b/templates/documentation.html
index 371bba1..01ce4ea 100644
--- a/templates/documentation.html
+++ b/templates/documentation.html
@@ -5,7 +5,7 @@
 {% block title 'Documentation' %}

 {% block content %}
-    <h1>Twig Documentation</h1>
+    <h1 id="documentation">Twig Documentation</h1>

     <p>Read the online documentation to learn more about Twig.</p>

@@ -47,7 +47,7 @@

     <div class="clearfix"></div>

-    <h1>Twig Reference</h1>
+    <h1 id="reference">Twig Reference</h1>

     <p>
         Browse the online reference to learn more about built-in features.

@xabbuh
Copy link
Contributor Author

xabbuh commented Nov 12, 2014

Thank you @lyrixx

@fabpot
Copy link
Contributor

fabpot commented Nov 12, 2014

deployed

@fabpot fabpot closed this as completed Nov 12, 2014
@xabbuh
Copy link
Contributor Author

xabbuh commented Nov 12, 2014

Thanks to both of you. There's just one minor issue. Due to the horizontal bar at the top of the page, the headline is only partly visible when directly jumping to http://twig.sensiolabs.org/documentation#reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants