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

Handle themes in the new file cache (images, assets) #5460

Closed
onedrawingperday opened this Issue Nov 22, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@onedrawingperday
Contributor

onedrawingperday commented Nov 22, 2018

Following the discussion from gohugoio/hugoThemes#506 (comment) I am opening this issue to report that I am seeing the exact same behavior described over here: #5226 (comment)

Reverting commit 5df2b79 seems to fix the issue.

CC / @digitalcraftsman

@onedrawingperday onedrawingperday referenced this issue Nov 22, 2018

Closed

New Theme: Evie #506

10 of 10 tasks complete
@bep

This comment has been minimized.

Member

bep commented Nov 22, 2018

How can that commit be a problem for the "themes site"? It is not released?

@onedrawingperday onedrawingperday changed the title from Commit 5df2b79 is causing problems with Hugo Pipes Assets on the Themes website to Commit 5df2b79 is causing problems when testing Theme Submissions while on Hugo 0.52 Dev Nov 22, 2018

@bep

This comment has been minimized.

Member

bep commented Nov 22, 2018

OK, now I see what that issue was all about -- I think ...

@bep bep changed the title from Commit 5df2b79 is causing problems when testing Theme Submissions while on Hugo 0.52 Dev to Check relpermalink vs sub-path vs resource transformations Nov 22, 2018

@bep bep added this to the v0.52 milestone Nov 22, 2018

@onedrawingperday

This comment has been minimized.

Contributor

onedrawingperday commented Nov 22, 2018

Steps to reproduce.

  • Clone Hugo Themes repo
  • git submodule add https://github.com/desimone/evie-hugo
  • cd _script/
  • ./generateThemeSite.sh > errors.txt
  • ERROR log: ==== PROCESSING evie-hugo ====== Building site for theme evie-hugo using its own exampleSite to ../themeSite/static/theme/evie-hugo/ ERROR 2018/11/22 21:05:53 error: failed to transform resource: TOCSS: failed to transform "css/style.css" (text/css): this feature is not available in your current Hugo version FAILED to create exampleSite for evie-hugo

Hugo version

Hugo Static Site Generator v0.52-DEV-E82B2DC8:CHROMA-1B755A9 linux/amd64 BuildDate: 2018-11-22T20:58:37+0200

Here is the relevant commit in the Evie Theme's repository desimone/evie-hugo@9caa8e1

From layouts/partials/header.html

{{ $style := slice $e1 $e2 $e3 $e4 $e5 $e6 $e7 $e8 $e10 $e11 $e12 $e13 $e14 $e15 $e16 $e17 $e18 $e19 $e20 $e21 $c | resources.Concat "css/style.css" | resources.ToCSS | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
<link rel="stylesheet" type="text/css" href="{{ $style.RelPermalink }}" />

@bep

This comment has been minimized.

Member

bep commented Nov 22, 2018

OK, I see what's happening. Will fix.

@bep

This comment has been minimized.

Member

bep commented Nov 23, 2018

Note that for the "evie Hugo" example, this is not related to any "base path", this was broken in my recently "cache consolidation" PR.

We cache resources, and in case "feature is not available" (aka Netlify), we fall back to cached SCSS result. The cache consolidation did not consider ... themes, which in most cases would not be visible (you just recache it the first time you run Hugo on the site itself), but not so for the "demo site".

I will fix this, just thought I should add a little context. The cache consolidation code is not in a released Hugo version, and the "relpermalink vs canonify" was an obvious bugfix.

@bep bep changed the title from Check relpermalink vs sub-path vs resource transformations to Handle themes in the new file cache (images, assets) Nov 23, 2018

bep added a commit to bep/hugo that referenced this issue Nov 23, 2018

Handle themes in the new file cache (for images, assets)
In the newly consolidated file cache implementation, we forgot that we also look in the theme(s) for assets (SCSS transformations etc.), which is not good for Netlify and the demo sites.

Fixes gohugoio#5460

bep added a commit to bep/hugo that referenced this issue Nov 23, 2018

Handle themes in the new file cache (for images, assets)
In the newly consolidated file cache implementation, we forgot that we also look in the theme(s) for assets (SCSS transformations etc.), which is not good for Netlify and the demo sites.

Fixes gohugoio#5460

@bep bep closed this in #5462 Nov 23, 2018

bep added a commit that referenced this issue Nov 23, 2018

Handle themes in the new file cache (for images, assets)
In the newly consolidated file cache implementation, we forgot that we also look in the theme(s) for assets (SCSS transformations etc.), which is not good for Netlify and the demo sites.

Fixes #5460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment