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

Add site_logo block for site logo customization #952

Closed
wants to merge 2 commits into from
Closed

Add site_logo block for site logo customization #952

wants to merge 2 commits into from

Conversation

bozhodimitrov
Copy link

@bozhodimitrov bozhodimitrov commented Jan 6, 2019

Allow custom block for the logo, which will allow manual adjustments for that area.
Example use case - fixing broken logo images like this:
Wrong svg size

@squidfunk
Copy link
Owner

Blocks in partials actually don't allow for overriding, see the latest discussion on the Gitter channel and the issue on added/removed support within Jinja.

We would need to inline all partials that include blocks into the base.html to allow for that, but this would require some serious restructuring and is questionable in terms of maintainability. For now, I would recommend overriding the templates, not the blocks.

@bozhodimitrov
Copy link
Author

Oh well... Thanks for the info.
But then why we don't update the documentation to reflect that?
I made the PR based on the info from the docs :)

Also, should I close the PR, or you still think that it's good idea to have the site_logo block?
(I guess that it will be available, when/if you do the inlining)

@squidfunk
Copy link
Owner

I checked the partials: those that contain blocks and would need to be inlined are:

  • header.html
  • footer.html
  • nav.html (transitive)
  • source.html

I will need to think about this a little, but I think it should be worth. I will leave this PR open until I decided on how to proceed with this.

@squidfunk
Copy link
Owner

Thinking about it a little more: this would require a new major release because of the template structure changing in a backward-incompatible way with the potential for breaking a lot of projects. Partials that were there are now inlined, so they cannot be overridden on a per-file basis.

@sander76
Copy link

So this PR would allow for non-square logo's like described here ?

Currently there is no way of allowing non-square logo's is there?

@squidfunk
Copy link
Owner

Removed blocks from partials in a27372e.

@squidfunk squidfunk closed this Feb 9, 2019
@squidfunk
Copy link
Owner

@sander76 see the comments above, overriding never worked for blocks in partials. However, you can target the site logo with CSS and set the width and height accordingly.

@bozhodimitrov bozhodimitrov deleted the patch-1 branch February 9, 2019 20:31
@sander76
Copy link

sander76 commented Feb 9, 2019

Thanks. I'll do the css thingy then

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

4 participants