Skip to content

Commit

Permalink
Merge pull request #161 from KyoriPowered/feat/opengraph
Browse files Browse the repository at this point in the history
Add opengraph previews to site
  • Loading branch information
zml2008 authored Feb 3, 2024
2 parents bbafb6a + 4ffc0ed commit 82a07ee
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 88 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pygments = "*"
sphinx-github-role = { git = "https://github.com/astrojuanlu/sphinx-github-role.git", ref = "main", editable = true }
myst-parser = "*"
sphinxcontrib-spelling = "*"
sphinxext-opengraph = "*"

[dev-packages]

Expand Down
186 changes: 98 additions & 88 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added source/_static/logo-notext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@
Please consult the pull request to view any discussion and existing reviews.
"""
html_baseurl = f"https://kyoripowered.github.io/adventure-docs-previews/pull/{pr_number}/"
else:
html_baseurl = "https://docs.advntr.dev/"

ogp_site_url = html_baseurl

# -- General configuration ---------------------------------------------------

# Add local extensions
Expand All @@ -79,6 +82,7 @@
'sphinx_reredirects',
'sphinx_github_role',
'sphinx_copybutton',
'sphinxext.opengraph',
'minimessage_hl',
'myst_parser',
'adventure_docs_extensions'
Expand Down Expand Up @@ -156,3 +160,10 @@
spelling_word_list_filename='../.config/spelling_wordlist.txt'
spelling_show_suggestions=True
spelling_suggestion_limit=5

# sphinxext-opengraph

ogp_image = "_static/logo-notext.png"
ogp_social_cards = {
"enable": False
}

0 comments on commit 82a07ee

Please sign in to comment.