-
Notifications
You must be signed in to change notification settings - Fork 4
Adds Schema.org schemas to pages #408
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
Open
JakubMastalerz
wants to merge
19
commits into
main
Choose a base branch
from
BAU/TWE-670-add-schemas
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c0e8dec
add organisation schema to homepage
JakubMastalerz 7bf1ab7
add breadcrumb schema to base template
JakubMastalerz 05a019e
add blogposting schema
JakubMastalerz 2537dc5
Fix blog JSON-LD tests to use direct template rendering
kevinhowbrook 5f04de5
Add comprehensive Organization JSON-LD test coverage
kevinhowbrook f5b769c
Use higher resolution logo for Organization schema
kevinhowbrook 896c186
Clean up JSON-LD test imports
kevinhowbrook 91d2d8e
Simplify JSON-LD tests with helper methods
kevinhowbrook b60e50e
Correct import style
kevinhowbrook cf350e6
use BeautifulSoup for JSON-LD parsing
kevinhowbrook ea8d3cc
Use built-in test client instead of render_to_string in JSON-LD tests
kevinhowbrook dc2c3a5
Use assertCountEqual to test social links list directly
kevinhowbrook 2759764
Remove redundant test
kevinhowbrook 834227a
Remove redundant assertions
kevinhowbrook 7d69cf4
Test breadcrumb JSON-LD against parsed dict instead of raw HTML
kevinhowbrook f772e23
Test against actual blog page
kevinhowbrook d0550c7
Remove redundant template existence tests
kevinhowbrook f11a111
Remove redundant test_multiple_jsonld_scripts test
kevinhowbrook c986e19
Build BlogPosting JSON-LD as Python dict instead of in template
kevinhowbrook File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tbx/project_styleguide/templates/patterns/navigation/components/breadcrumbs-jsonld.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| {% load wagtailcore_tags %} | ||
| {% wagtail_site as current_site %} | ||
| {% if page.breadcrumbs %} | ||
| <script type="application/ld+json"> | ||
| { | ||
| "@context": "https://schema.org/", | ||
| "@type": "BreadcrumbList", | ||
| "itemListElement": [{% for crumb in page.breadcrumbs %} | ||
| { | ||
| "@type": "ListItem", | ||
| "position": {{ forloop.counter }}, | ||
| "name": "{% if crumb.depth == 2 %}Home{% else %}{{ crumb.title|escapejs }}{% endif %}", | ||
| "item": "{{ current_site.root_url }}{% pageurl crumb %}" | ||
| }{% if not forloop.last %},{% endif %}{% endfor %} | ||
| ] | ||
| } | ||
| </script> | ||
| {% endif %} | ||
17 changes: 17 additions & 0 deletions
17
tbx/project_styleguide/templates/patterns/pages/home/home_page.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.