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

Incorrect src attribute for images in featured posts in bootblog4 theme #3471

Closed
txels opened this issue Nov 3, 2020 · 3 comments
Closed

Comments

@txels
Copy link

txels commented Nov 3, 2020

Environment

Python Version: 3.8.5

Nikola Version: 8.1.1

Operating System: Ubuntu 20.10

Description:

It appears that Nikola 8.1.1 has introduced either a bug or a backwards-incompatible change that makes images in featured posts using the bootblog4 template render incorrecty.

My featured posts include these headings:

.. status: featured
.. previewimage: /galleries/face-a-day-2020/20200817-me.png

My nikola site is rendered under a path:

# conf.py
SITE_URL = "https://carles.barrobes.com/drawing/"
# BASE_URL not set
  • With nikola 8.0.4, this would generate a correct src attribute galleries/face-a-day-2020/20200817-me.png
  • In nikola 8.1.1, this generates a relative path that doesn't work drawing/galleries/face-a-day-2020/20200817-me.png as it generates an invalid image URL of https://carles.barrobes.com/drawing/drawing/galleries/face-a-day-2020/20200817-me.png (duplicated drawing in the path).

The source of the issue seems to have been introduced here: e559cfd

@txels txels added the bug label Nov 3, 2020
@Kwpolska
Copy link
Member

Kwpolska commented Nov 3, 2020

The diff link doesn’t work, please link to the specific commit.

@txels
Copy link
Author

txels commented Nov 3, 2020

Hmmm. Possibly this commit then e559cfd

@Kwpolska
Copy link
Member

I created PR #3475 with a fix, please test.

Kwpolska added a commit that referenced this issue Nov 13, 2020
Fix #3471 — fix previewimages for non-server-root sites
devilgate pushed a commit to devilgate/nikola that referenced this issue Nov 15, 2020
This fixes previewimage path generation for non-server-root sites and simplifies the code for all cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants