wpgen

Wordpress theme generator

Usage no npm install needed!

<script type="module">
  import wpgen from 'https://cdn.skypack.dev/wpgen';
</script>

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 support
  • post.formats ['video'|'gallery'] - add post formats
  • images [object] - add images sizes
  • js [object] - js files
  • css [object] - css files
  • menus [object] - theme menus
  • configs [object] - theme configs

Test

npm test

Contacts

Jaroslav Khorishchenko

websnipter@gmail.com