Hugolify / hugolify-template

Hugolify is an Hugo template with Hugo theme and Decap CMS
https://www.hugolify.io
MIT License
9 stars 1 forks source link

Build failling when changing theme #12

Closed Mecanik closed 8 months ago

Mecanik commented 9 months ago

Hello,

Same issue as the one I just opened, if you change the theme:

- path: github.com/hugolify/hugolify-theme-2

The build will fail:

9:59:31 AM: $ yarn build
9:59:32 AM: yarn run v1.22.19
9:59:32 AM: $ hugo --noChmod --gc --minify
9:59:32 AM: go: downloading github.com/hugolify/hugolify-theme-2 v1.0.2
9:59:32 AM: go: added github.com/hugolify/hugolify-theme-2 v1.0.2
9:59:32 AM: go: added github.com/hugolify/hugolify-decap-cms v1.9.0
9:59:32 AM: hugo: collected modules in 652 ms
9:59:32 AM: Start building sites …
9:59:32 AM: hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e+extended linux/amd64 BuildDate=2023-09-24T15:20:17Z VendorInfo=gohugoio
9:59:32 AM: Total in 681 ms
9:59:32 AM: Error: error building site: assemble: "/opt/build/repo/content/legal-mentions/_index.md:13:49": failed to extract shortcode: template for shortcode "blank_link" not found
9:59:32 AM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
9:59:32 AM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Thanks

sebousan commented 9 months ago

Hi @Mecanik,

do you load github.com/hugolify/hugolify-theme too ? hugolify-theme is a Core theme and is required.

In this theme (neutral style), you have blank_link shortcode.

Thanks

Mecanik commented 9 months ago

I don't understand, I need to load 2 themes? Can you please show me a working config. Thanks

sebousan commented 9 months ago

In module config file

imports:
  - path: github.com/hugolify/hugolify-theme-2
  - path: github.com/hugolify/hugolify-theme
  - path: github.com/hugolify/hugolify-decap-cms

hugolify-theme-2 will add some style (sass basically)

hugolify-theme Core theme with all commons partials and functions

Import style in sass file assets/sass/main.sass

/*! purgecss start ignore */
// Theme
@import "hugolify-theme-2"
/*! purgecss end ignore */

Thanks

Mecanik commented 9 months ago

Thank you, however:

6:39:01 AM: Error: error building site: TOCSS: failed to transform "sass/main.sass" (text/x-sass): "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugolify/hugolify-theme-2@v1.0.2/assets/sass/theme/components/_hero.sass:5:20": Undefined variable: "$quaternary".
6:39:01 AM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
6:39:01 AM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
sebousan commented 9 months ago

Hi @Mecanik, could you please do a yarn update to update theme-2