Browse Source

Trying to make PostCSS work as Hexo plugin

Artur Paikin 9 years ago
parent
commit
69290b112d

+ 6 - 0
website/_config.yml

@@ -122,6 +122,12 @@ node_sass:
   precision: 5
   sourceComments: false
 
+postcss:
+  plugins:
+    postcss-svg:
+      paths: ['images']
+      defaults: "[fill]: #000000"
+
 # Deployment
 ## Docs: https://hexo.io/docs/deployment.html
 # deploy:

+ 2 - 0
website/package.json

@@ -24,7 +24,9 @@
     "browserify": "^12.0.1",
     "chalk": "^1.1.1",
     "glob": "^6.0.1",
+    "hexo-renderer-postcss": "^1.0.1",
     "multi-glob": "^1.0.1",
+    "postcss-svg": "^1.0.4",
     "watchify": "^3.6.1"
   }
 }

+ 6 - 0
website/themes/uppy/_config.yml

@@ -3,3 +3,9 @@ node_sass:
   outputStyle: nested
   precision: 5
   sourceComments: false
+
+postcss:
+  plugins:
+    postcss-svg:
+      paths: ['images']
+      defaults: "[fill]: #000000"

+ 3 - 0
website/themes/uppy/source/css/test.css

@@ -0,0 +1,3 @@
+body {
+  background-image: svg('uppy.svg', '[fill]: black');
+}