Skip to content

Commit

Permalink
fix: remove global thumbnailUrl (#82)
Browse files Browse the repository at this point in the history
Removes global thumbnailUrl computed front matter value because not
every schema type has this property
  • Loading branch information
johnfraney committed May 15, 2024
1 parent c74abf3 commit 140fcdb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions blurry/markdown/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,12 @@ def convert_markdown_file_to_html(filepath: Path) -> tuple[str, dict[str, Any]]:

# Add inferred/computed/relative values
# https://schema.org/image
# https://schema.org/thumbnailUrl
front_matter.update({"url": content_path_to_url(filepath.relative_to(CONTENT_DIR))})
if image := front_matter.get("image"):
image_copy = deepcopy(image)
relative_image_path = get_relative_image_path_from_image_property(image_copy)
image_path = resolve_relative_path_in_markdown(relative_image_path, filepath)
front_matter["image"] = update_image_with_url(image_copy, image_path)
front_matter["thumbnailUrl"] = image_path_to_thumbnailUrl(image_path)
return html, front_matter


Expand Down
1 change: 0 additions & 1 deletion docs/content/templates/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ The template context variables are:
| ------------------------ | ---------------------------------------------------------------------------------------------- |
| `body` | an HTML string converted from Markdown |
| `url` | the absolute URL for the given page |
| `thumbnailUrl` | a path to the thumbnail version of the `image` front matter value |
| `schema_type_tag` | a `<script type="application/ld+json">` tag containing Schema.org markup |
| `open_graph_tags` | [Open Graph](https://ogp.me/) meta tags, like `<meta property="og:title" content="..." />` |
| `**schema_variables` | front matter from the Markdown file, like `datePublished` |
Expand Down

0 comments on commit 140fcdb

Please sign in to comment.