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

CDN destination is treated as boolean #657

Open
3 of 18 tasks
mwt opened this issue Feb 15, 2021 · 0 comments
Open
3 of 18 tasks

CDN destination is treated as boolean #657

mwt opened this issue Feb 15, 2021 · 0 comments

Comments

@mwt
Copy link

mwt commented Feb 15, 2021

  • I tried updating to the latest version
    • I can't, there is an issue
    • This is about an < latest
      • I understand older versions may be unsupported
  • I Am on Windows
    • Ubuntu Bash on Windows
    • Fedora Bash on Windows
    • Other Bash on Windows
  • I Am on Linux
    • Ubuntu
    • Fedora
    • CentOS
    • Redhat
    • Debian
  • I am on macOS 10.13
  • I am on macOS 10.14
  • I'm on Docker
    • I understand Docker may be unsupported

Description

I am having an issue similar to #567. The assets:cdn:destination is currently being used as a boolean. If true, it applies assets:destination to the CDN URL. This blocks the usage of CDNs with subdirectories and contradicts the documentation.

assets:
  compression: true
  defaults:
    js: { integrity: false }
    css: { integrity: false }
    img: { integrity: false }
  cdn:
    baseurl: false
    destination: "/v7"
    url: "https://ajsxgydazo.cloudimg.io"

I have tried the following two commands

JEKYLL_ENV=production bundle exec jekyll build

and

bundle exec jekyll build

I drafted a fix in my fork that I am using in production. I don't actually know ruby though. In fact, this is my first time looking at the language. So, it's probably junk.

Steps

  • Try to use the CDN destination feature in the config.

Output

<link rel="stylesheet" type="text/css" href="https://ajsxgydazo.cloudimg.io/assets/main-4ecf126146f6368f46cfd8662ce8d6d5be9ad0976851eea92e4cb69161a1f6d5e115a469e29a2d56716a05ec266a06e45ec58f50f5dde89611b34df744964544.css">

Expected

<link rel="stylesheet" type="text/css" href="https://ajsxgydazo.cloudimg.io/v7/assets/main-4ecf126146f6368f46cfd8662ce8d6d5be9ad0976851eea92e4cb69161a1f6d5e115a469e29a2d56716a05ec266a06e45ec58f50f5dde89611b34df744964544.css">
@mwt mwt changed the title CDN config is ignored CDN description is treated as boolean Feb 16, 2021
@mwt mwt changed the title CDN description is treated as boolean CDN destination is treated as boolean Feb 16, 2021
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