Skip to content

Commit

Permalink
Use jekyll-postcss-v2 to prune tailwind using _site
Browse files Browse the repository at this point in the history
  • Loading branch information
imustafin committed Jun 18, 2024
1 parent 0173f1a commit c1c2258
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'jekyll', '~> 4.3', '>= 4.3.3'

group :jekyll_plugins do
gem 'jekyll-postcss', '~> 0.5.0'
gem 'jekyll-postcss-v2', '~> 1.0', '>= 1.0.2'
gem 'jekyll-seo-tag',
github: 'imustafin/jekyll-seo-tag'
# path: '/home/ilgiz/jekyll-seo-tag'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ GEM
jekyll (>= 2.0, < 5.0)
jekyll-plantuml (1.4.2)
jekyll (> 2.0)
jekyll-postcss (0.5.0)
jekyll-postcss-v2 (1.0.2)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (3.0.0)
Expand Down Expand Up @@ -136,7 +136,7 @@ DEPENDENCIES
jekyll (~> 4.3, >= 4.3.3)
jekyll-node-module (~> 0.1.3)
jekyll-plantuml (~> 1.4, >= 1.4.2)
jekyll-postcss (~> 0.5.0)
jekyll-postcss-v2 (~> 1.0, >= 1.0.2)
jekyll-redirect-from (~> 0.16.0)
jekyll-seo-tag!
jekyll_picture_tag (~> 2.1)
Expand Down
5 changes: 1 addition & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ markdown: kramdown
plugins:
- jekyll-redirect-from
- jekyll-plantuml
- jekyll-postcss
- jekyll-postcss-v2
- jekyll-node-module

node_modules:
copy:
- source: '@fontsource-variable/roboto-slab/files'
target: 'assets/css/files'

postcss:
cache: false

redirect_from:
json: false

Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include_in_sitemap: false
---
@import "@fontsource-variable/roboto-slab";

@import "assets/css/rouge-github.css";
@import "rouge-github.css";

object.plantuml {
@apply max-w-full;
Expand Down
8 changes: 8 additions & 0 deletions assets/css/rouge-github.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
include_in_sitemap: false
---

@layer components {

.highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
.highlight .cm {
Expand Down Expand Up @@ -207,3 +213,5 @@
.highlight {
background-color: #f8f8f8;
}

}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"autoprefixer": "^10.4.19",
"cssnano": "^7.0.1",
"postcss": "^8.4.38",
"postcss-cli": "^11.0.0",
"postcss-import": "^16.1.0",
"tailwindcss": "^3.4.3"
},
Expand Down
10 changes: 1 addition & 9 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@ let fontsSerif = '"Roboto Slab", Rockwell, "Rockwell Nova", '

module.exports = {
darkMode: 'class',
content: [
'./**/_drafts/**/*.html',
'./**/_includes/**/*.html',
'./**/_layouts/**/*.html',
'./**/_posts/**/*.md',
'./*.md',
'./*.html',
'_config.yml',
],
content: ['_site/**/*.html'],
theme: {
extend: {
colors: {
Expand Down
Loading

0 comments on commit c1c2258

Please sign in to comment.