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

Provide <title> tags for doc pages #1537

Merged
merged 6 commits into from Feb 18, 2020

Conversation

pablobm
Copy link
Collaborator

@pablobm pablobm commented Jan 23, 2020

The lack of <title> tags may be harming SEO (I'm thinking of people looking for Administrate's documentation).

There's also the matter that each page has two h1s, but that's another matter and can be treated separately.

Admittedly, my solution is a bit dirty. Is it worth my spending a bit more time to make it more presentable? Do you have any ideas?

@nickcharlton
Copy link
Member

Oh that's a bit exciting.

The only alternative I can think of is to add something like YAML front matter, so each Markdown file would have something like:

---
title: The Page Title
---

What do you think?

@nickcharlton nickcharlton added the views-and-styles how administrate looks and is interacted with label Feb 12, 2020
@pablobm
Copy link
Collaborator Author

pablobm commented Feb 13, 2020

Yes, I think that's worth looking into. I have given it a go at master...pablobm:frontmatter, which builds on top of this PR. However I have noticed one snag.

Currently, we include the contributing guide from the documentation, as a symlink to the standard one that you can normally read on GitHub. The snag is that this page now has to choose to either show the main title as a markdown # title or as a frontmatter title. The former reads better on GitHub, and the latter reads better in the documentation site. See an example of what I'm talking about: https://github.com/pablobm/administrate/blob/frontmatter/CONTRIBUTING.md

What do you think?

@nickcharlton
Copy link
Member

I think whilst having a box above the top is a bit strange, it doesn't really matter in the hope of making everything look good on the docs site (somewhere we control, rather than GitHub)

@pablobm
Copy link
Collaborator Author

pablobm commented Feb 13, 2020

Sounds good 👍 I incorporated the Frontmatter changes on this PR now.

@nickcharlton nickcharlton temporarily deployed to administrate-demo-prer-pr-1537 February 13, 2020 16:52 Inactive
@nickcharlton
Copy link
Member

I deployed a review app so we can take a look at it: https://administrate-demo-prer-pr-1537.herokuapp.com/

@nickcharlton
Copy link
Member

Two quick thoughts:

  1. We should set something as the default, maybe Administrate? I'm not sure if this should become Page Title — Administrate, what do you think?
  2. The index page is missing a title

@pablobm
Copy link
Collaborator Author

pablobm commented Feb 13, 2020

I agree on both. Also a third one: the pages have now lost their h1 heading. There's one in the sidebars, but I think it should be demoted (in a different PR).

Working on it.

@nickcharlton nickcharlton temporarily deployed to administrate-demo-prer-pr-1537 February 13, 2020 18:07 Inactive
@pablobm
Copy link
Collaborator Author

pablobm commented Feb 13, 2020

OK, first weird thing: the index page is the readme, so now we have the Frontmatter table on the project's home page on GitHub. I think this is more awkward than the previous situation with the contributing page. What do you think?

@nickcharlton nickcharlton temporarily deployed to administrate-demo-prer-pr-1537 February 13, 2020 18:20 Inactive
@pablobm
Copy link
Collaborator Author

pablobm commented Feb 13, 2020

Addressed all three issues.

(By the way, if at some point you think my initial proposal was better, that's fine. I'm not very attached to this code. It's a useful experiment.)

@nickcharlton
Copy link
Member

Huh nice.

Omg, how is this such a difficult problem! We're in a much better state than we were, but let me think about it a bit next

@pablobm
Copy link
Collaborator Author

pablobm commented Feb 13, 2020

Yeah, who would have thought! 😄 No worries.

@nickcharlton
Copy link
Member

I think this is the best approach, so I'm going to merge it. Thanks!

@nickcharlton nickcharlton merged commit 46beb19 into thoughtbot:master Feb 18, 2020
@pablobm pablobm deleted the titles-for-doc-pages branch June 24, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
views-and-styles how administrate looks and is interacted with
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants