Closed rkdarst closed 1 year ago
The reason I think this is useful is that I can add this extension to any site and it's closer to being functional even without any configuration.
Would we want a way to tell it to disable the og:site_name
property? Right now, site_name can't be unset (assuming most sphinx projects have project
set).
Yes, there should be a way to turn this off, similar to ogp_image_alt.
Default ogp_site_name
to None
.
if ogp_site_name is None:
use project
elif ogp_site_name == False:
omit og:site_name
else:
use config site_name
Updated and works in my local test.
project
Sphinx config value seems like a reasonable default value for the site_name.ogp_site_name
is not set.og:site_name
for many projects where it previously wasn't set.Perhaps I should have asked before doing this, since the last point may be a blocker. But it was easier to do than think too much...