README
WPGEN
Node util for generating wordpress themes.
Install
npm i -g wpgen
Using
Create .wpgen.json
file in your theme's root directory with the next content:
{
"name": "Hromadske UA",
"uri": "http://kgtv.com.ua/",
"author": {
"name": "Jaroslav Khorishchenko",
"uri": "https://fb.com/snipter"
},
"description": "Тема для сайту #Hromadske.Kremenchuk",
"fullDescription": "Тема для сайту #Hromadske.Kremenchuk",
"version": "1.0.0",
"license": {
"name": "GNU General Public License v2 or later",
"uri": "http://www.gnu.org/licenses/gpl-2.0.html"
},
"tags": [ "hromadske" ],
"domain": "hromadske",
"prefix": "hromadske",
"directory": "./demo",
"post": {
"thumbnails": true,
"formats": ["video","gallery"]
},
"images": {
"tripel": { "w": 300, "h": 331, "crop": true },
"bigshot": { "w": 1280, "h": 583, "crop": true }
},
"css": {
"theme": { "path": "~/css/style.css"}
},
"js": {
"vendor": { "path": "~/js/vendor.js", "v": "1.0.1", "footer": true },
"app": { "path": "~/js/app.js", "v": "1.0.1", "deps": ["vendor"], "footer": true }
},
"menus": {
"main-menu": {"name":"Головне меню"},
"main-links": {"name":"Головні посилання"},
"main-tags": {"name":"Теги"},
"main-pages": {"name":"Головні сторінки"},
"footer-menu": {"name":"Меню підвалу"}
},
"configs": {
}
}
Run:
wpgen .
Configuration
post.thumbnails [true|false] (default:true)
- enable post thumbnails supportpost.formats ['video'|'gallery']
- add post formatsimages [object]
- add images sizesjs [object]
- js filescss [object]
- css filesmenus [object]
- theme menusconfigs [object]
- theme configs
Test
npm test
Contacts
Jaroslav Khorishchenko