Hey,
I want to contribute to a project’s website which does use Jekyll.
They use the original postcss plugin which doesn’t work for me (Freezes on Windows 10 apparently), so I switched over to this variant in the hopes it works and… it kinda does.
While it doesn’t freeze the entire serve of Jekyll (Already a improvement to the postcss plugin), does it seem like there are some smaller issues with postcss-import?
I get some errors I have no idea how to fix, nor what they even mean exactly… There is apparently a file missing?
I assumed it could be due to the exclude
option in the _config.yml
containing said CSS file, but this strangely wasn’t solving the issue…
I’m at a huge loss here and believe it could be some wrong configuration of this plugin, postcss itself or something else, so if you can, I would appreciate some assistance were possible.
The current _config.yml
(Note that removing the syntax.css
file from the exclude
doesn’t change a thing with the errors):
# Site
title: "Social Networking Reimagined"
name: "fedi.foundation"
fullname: "Federated Diversity Foundation"
description: "Paving the Path of Federated Diversity Towards Social Networking Reimagined"
slogan: "United in Diversity"
logo: "/assets/images/android-icon-512x512.png"
image: "/assets/images/fedi-foundation-logo-black.png"
favicon: "/favicon.ico"
favicon_svg: "/assets/images/fedi-foundation-favicon.svg"
url: https://fedi.foundation
baseurl: ""
# Site Author
author:
name: "Fedi Foundation"
avatar: "avatar1.jpg"
bio: "We build with you."
location: "Fediverse"
links:
- label: "Mastodon"
icon: "fab fa-fw fa-mastodon"
url: https://mastodon.social/@humanetech
- label: "Codeberg"
icon: "fab fa-fw fa-codeberg"
url: "https://codeberg.org/fediverse"
# Licensing default, and licenses for specific page types.
licensing:
default: "CC0"
people: "CC BY-NC-SA"
# Settings
include: ["_pages"]
permalink: /:title/
# Collections
collections:
profile:
output: true
permalink: /people/:path/
# Defaults
defaults:
# _posts
- scope:
path: ""
type: posts
values:
layout: post
permalink: /:year/:month/:slug/
avatar: /assets/images/avatar1.jpg
# _pages
- scope:
path: "_pages"
values:
layout: page
# _profile
- scope:
path: "_profile"
values:
layout: page
type: people
# Syntax
markdown: kramdown
highlighter: rouge
# Paginate
paginate: 10
postcss:
script: node_modules/.bin/postcss
config: postcss.config.js
# Plugins
plugins:
- jekyll-feed
- jekyll-sitemap
- jekyll-paginate
- jekyll-postcss-v2
- jemoji
# Exclude development time dependencies
exclude: [
README.md,
Gemfile,
Gemfile.lock,
CONTRIBUTING.md,
CONTRIBUTORS.md,
package.json,
package-lock.json,
postcss.config.js,
tailwind.config.js,
assets/css/syntax.css
]
postcss.config.js
file:
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
...(process.env.JEKYLL_ENV == "production"
? [require('cssnano')({ preset: 'default' })]
: [])
]
};
Logs during bundle exec jekyll serve
Configuration file: D:/GitHub/fedi-foundation/_config.yml
Source: D:/GitHub/fedi-foundation
Destination: D:/GitHub/fedi-foundation/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Error: Failed to find 'assets/css/syntax'
in [
D:\GitHub\fedi-foundation\_site\assets\css
]
at D:\GitHub\fedi-foundation\node_modules\postcss-import\lib\resolve-id.js:35:13
at async LazyResult.runAsync (D:\GitHub\fedi-foundation\node_modules\postcss\lib\lazy-result.js:289:11)
at async Promise.all (index 0)
PostCSS v2: Rewrote /assets/css/style.css
done in 3.5 seconds.
Auto-regeneration: enabled for 'D:/GitHub/fedi-foundation'
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
Logs when loading site (Note that mentioned folders and files do not exist in the source itself, so they probs get auto-generated?):
[2023-08-24 13:15:42] ERROR `/assets/css/tailwindcss/utilities' not found.
[2023-08-24 13:15:42] ERROR `/assets/css/assets/css/syntax' not found.
[2023-08-24 13:15:42] ERROR `/assets/css/tailwindcss/base' not found.
[2023-08-24 13:15:42] ERROR `/assets/css/tailwindcss/components' not found.