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

Support page titles #81

Closed
evilnick opened this issue Apr 22, 2014 · 6 comments
Closed

Support page titles #81

evilnick opened this issue Apr 22, 2014 · 6 comments
Assignees

Comments

@evilnick
Copy link
Member

This is probably a longer term goal, but for better SEO, we would like to set the page title for each HTML page instead of the default "Juju Documentation"

A possible way to implement this would be to use the Metadata extension for markdown. This would require some template processing but would enable us to set page titles independently of the HTML name of the page, which would be useful for different languages, for example.

@marcoceppi
Copy link
Contributor

Now that we're building docs statically, we can do this. The question is where to get the source of the page title. Should it just be what's in the Navigation sidebar?

@JoshStrobl
Copy link
Contributor

Considering we have fairly concise explanations of the purpose of the document as a "header 1" at the top of the markdown docs (example: # Charm configuration in authors-charm-config.md), maybe we can grab that and set it as the <title> content during build.

I think we should stray away from dynamically setting the page title in JavaScript (I don't think that would be beneficial since I doubt indexers wait until dynamic changes are made, rather they just fetch it in the current static state without JavaScript execution), but I'd be 100% happy to quickly change the main.js file to set the page title to the `article h1 content if nobody objects to that or offers up a better idea :D

@mitechie
Copy link
Contributor

We do this in the build we're working on at jujucharms.com. You can see an example on the QA site.

http://qa.storefront.theblues.io:6543/docs/config-aws

At some point next week this should be up and working.

@JoshStrobl
Copy link
Contributor

That is good to hear. I definitely think it'll make managing having multiple Juju documentation tabs open at once a lot easier.

@evilnick
Copy link
Member Author

Just FYI, when we move to the new build tool the docs titles will be set
from metadata.
On Nov 14, 2014 2:11 AM, "Joshua Strobl" notifications@github.com wrote:

That is good to hear. I definitely think it'll make managing having
multiple Juju documentation tabs open at once a lot easier.


Reply to this email directly or view it on GitHub
#81 (comment).

@evilnick
Copy link
Member Author

I'm closing this - not all pages have been given metadata yet, but where it exists it is used, and where it doesn't the website reverts to using the initial heading, which works well

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

No branches or pull requests

4 participants