Giter VIP home page Giter VIP logo

twelvety's Issues

Referencing an external stylesheet prevents build

Howdy & thank you for building this.

When using an external stylesheet (https://cloud.typography.com/6984932/6762612/css/fonts.css, for fonts) in a tag in my default.liquid, I encounter the following error during build:

➜ project git:(master) ✗ npm run build

> [email protected] build /Users/jeffery/Sites/project
> cross-env ELEVENTY_ENV=production eleventy

Error writing templates: (more in DEBUG output)
> Having trouble writing template: dist/media/killing-me-softly/index.html

`TemplateWriterWriteError` was thrown
> /6984932/6762612/css/fonts.css:1:1: Unknown word

`CssSyntaxError` was thrown:
    CssSyntaxError: /6984932/6762612/css/fonts.css:1:1: Unknown word
        at Input.error (/Users/jeffery/Sites/project/node_modules/critical/node_modules/postcss/lib/input.js:128:16)
        at Parser.unknownWord (/Users/jeffery/Sites/project/node_modules/critical/node_modules/postcss/lib/parser.js:561:22)
        at Parser.other (/Users/jeffery/Sites/project/node_modules/critical/node_modules/postcss/lib/parser.js:166:12)
        at Parser.parse (/Users/jeffery/Sites/project/node_modules/critical/node_modules/postcss/lib/parser.js:75:16)
        at parse (/Users/jeffery/Sites/project/node_modules/critical/node_modules/postcss/lib/parse.js:17:12)
        at new LazyResult (/Users/jeffery/Sites/project/node_modules/critical/node_modules/postcss/lib/lazy-result.js:64:16)
        at Processor.<anonymous> (/Users/jeffery/Sites/project/node_modules/critical/node_modules/postcss/lib/processor.js:142:12)
        at Processor.process (/Users/jeffery/Sites/project/node_modules/critical/node_modules/postcss/lib/processor.js:121:23)
        at rebaseAssets (/Users/jeffery/Sites/project/node_modules/critical/src/file.js:284:8)
        at getStylesheet (/Users/jeffery/Sites/project/node_modules/critical/src/file.js:739:21)
Problem writing Eleventy templates: (more in DEBUG output)
> Having trouble writing template: dist/media/killing-me-softly/index.html

An initial guess is that that URL fails loading because it doesn't have a referrer when being loaded as part of the build process. The server responds with a 403 in this instance. Any way for it to remain unconsumed by the build process / postcss?

I've unsuccessfully tried the following:

  • Using @import url() in my SASS.
  • Wrapping the <link> in {% raw %}

Note, things work great during development. It's just build that causes the problem.

I'll keep experimenting & report back.

Add a blog

It would be good to add a blog because many sites have it!

Generating AVIF images is very slow

Since #6, builds are taking much longer. It might be worth reverting the changes for now, or giving the user an option of which image formats to generate (no AVIF by default).

The AVIF images also seem strangely large compared to benchmarks I have seen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.