Skip to content

Commit

Permalink
Adjust OpenGraph settings
Browse files Browse the repository at this point in the history
- Use new logo image
- Set description length to 300
- Disable use of "first image"
  • Loading branch information
amotl committed Sep 1, 2023
1 parent 56e36e9 commit 1409520
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ CHANGES
Unreleased
----------

- Adjust OpenGraph settings: Logo image, description length, "first image" use


2023/08/30 0.29.4
-----------------
Expand Down
26 changes: 21 additions & 5 deletions src/crate/theme/rtd/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,28 @@
}

# Configure OpenGraph extension
ogp_site_url = "https://crate.io/"
ogp_description_length = 150
ogp_site_name = "CrateDB documentation"
ogp_image = "https://crate.io/hubfs/static/og_crateio.jpg"
#
# About text lengths.
#
# Original documentation says:
# - ogp_description_length
# Configure the amount of characters taken from a page. The default of 200 is probably good
# for most people. If something other than a number is used, it defaults back to 200.
# -- https://sphinxext-opengraph.readthedocs.io/en/latest/#options
#
# Other people say:
# - og:title 40 chars
# - og:description has 2 max lengths:
# When the link is used in a Post, it's 300 chars. When a link is used in a Comment, it's 110 chars.
# So you can either treat it as 110, or, write your Descriptions to 300 but make sure the first 110
# is the critical part and still makes sense when it gets cut off.
# -- https://stackoverflow.com/questions/8914476/facebook-open-graph-meta-tags-maximum-content-length
ogp_site_url = "https://crate.io/docs/"
ogp_description_length = 300
ogp_site_name = "CrateDB Documentation"
ogp_image = "https://crate-docs-theme.readthedocs.io/en/latest/_static/images/cratedb-logo-h400.png"
ogp_image_alt = False
ogp_use_first_image = True
ogp_use_first_image = False
ogp_type = "website"
ogp_enable_meta_description = True

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1409520

Please sign in to comment.