Skip to content
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

Center post body horizontally if there is no toc nor related blocks #690

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ramiro
Copy link
Contributor

@ramiro ramiro commented May 28, 2024

If there is no table of contents or related contents block defined the post page layout still leaves horizontal room for them to the right of the main content block. This, along "measure" results in the post body to be artificially shifted to the left.

This PR changes that to center the body horizontally in the screen if there is no need for such a right side aside tag.

Sample using the example site. Screenshots taken on a 1792 x 1120 desktop display:

Before:

After:

Copy link

netlify bot commented May 28, 2024

Deploy Preview for gohugo-ananke-theme-demo canceled.

Name Link
🔨 Latest commit 7fc271a
🔍 Latest deploy log https://app.netlify.com/sites/gohugo-ananke-theme-demo/deploys/665645db9c0aa6000873b3ad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant