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

11802 convert faq block titles to headings #12023

Closed
wants to merge 4 commits into from

Conversation

Dieterrr
Copy link
Contributor

@Dieterrr Dieterrr commented Jan 14, 2019

Summary

This PR can be summarized in the following changelog entry:

  • Improves the rendering and results from our SEO analysis on pages which use an FAQ block by converting the question paragraphs into headings.

Relevant technical choices:

  • As headings levels need to match the correct hierarchy, each question now has a <H{x}> tag, where x is determined by the place of the FAQ block in the page structure. The last heading block before the FAQ block determines the heading level. Other factors, such as manually added headings by entering html blocks, are ignored.
  • The heading level for a question can never be lower than 2 or higher than 6.

Test instructions

This PR can be tested by following these steps:

  • Build this branch.
  • Add a FAQ block, see that the questions are now headings instead of paragraphs with <strong> tags. If there is only a title in the post the heading tags of the questions should be h2. If there is a heading block before the FAQ block the h tags should be one level smaller than the heading block (so if the heading block is h4, the questions in the FAQ block should be h5).
  • Any heading blocks after the FAQ block should be ignored.
  • The headings in the FAQ block should update instantly when changed.
  • The headings should also be correct in the front end, but make sure the post is saved.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Fixes #11802

@IreneStr
Copy link
Contributor

Closing, because this PR is very outdated

@IreneStr IreneStr closed this Jan 14, 2020
@IreneStr IreneStr deleted the 11802-convert-faq-block-titles-to-headings branch January 14, 2020 12:55
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 this pull request may close these issues.

Convert FAQ titles to headings
2 participants