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

Include roboto folder on NPM package #354

Open
gforcada opened this issue Dec 11, 2023 · 0 comments
Open

Include roboto folder on NPM package #354

gforcada opened this issue Dec 11, 2023 · 0 comments

Comments

@gforcada
Copy link
Member

gforcada commented Dec 11, 2023

If one wants to use only part of this theme to style the website (see #128 ) the first approach is to do:

On package.json:

  "dependencies": {
    "@plone/plonetheme-barceloneta-base": "^3.2.0-alpha.0",
  }

And on your own SCSS:

@import "~@plone/plonetheme-barceloneta-base/scss/barceloneta";

Doing this works, and you get ALL barceloneta CSS, but it breaks as there is a relative path to point to the roboto fonts folder, but the folder is not shipped with the NPM package 😕

Adding to plonetheme.barceloneta/package.json:

  "files": [
    "/scss",
    "/plonetheme/barceloneta/theme/tinymce/*.css",
    "/plonetheme/barceloneta/theme/roboto/*"
  ],

Gets the roboto folder shipped with the NPM package, though the location is still wrong, as the top-level CSS (in scss/_roboto-webfont.scss) asks to have it at the top-level as well:

$roboto-base-path: "../roboto/" !default;

So, two questions:

  • how does it work now? as the SCSS is at the top-level but it tries to reference a roboto folder that is buried inside plonetheme/barceloneta/theme/roboto
  • adding this extra line on package.json so that the roboto folder is also shipped would be acceptable? Otherwise are we meant to ship that ourselves due to licensing or so? 🤔
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

No branches or pull requests

1 participant