Coder Social home page Coder Social logo

sjsd / static-site-generator-from-wordpress-rest-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 760 KB

Static site generator based on Wordpress REST API

License: MIT License

CSS 70.62% JavaScript 25.53% HTML 3.85%
wordpress metalsmith gulp handlebars wordpress-api wordpress-rest-api static-site-generator

static-site-generator-from-wordpress-rest-api's Introduction

Static Site Generator

Description

Based on Wordpress REST API. Build with Node, Metalsmith, Handlebars and Gulp.

A setup to create a simple and very fast blog / static site based on a Wordpress blog. Some background information at the blog.

Getting startet

  • Clone the code git clone https://github.com/sjsd/static-site-generator-from-wordpress-rest-api.git
  • Add URLs to the ./gulp-task/localjson.js. First line.
  • Install dependencies: npm install
  • Build local JSON for post gulp json-posts
  • Build local JSON for pages gulp json-pages
  • Run a clean build gulp build
  • We're done! Your site is now in the ./build folder.

Some options

Where do I set URL to my Wordpress? Open ./gulp-task/localjson.js and change the variable for wordpressURL. Like this: const wordpressURL = 'your-wordpress-blog.wordpress.com'.

Note: it can be self hosted installation. Then you set something like this www.your-domain-name.com

Are you kidding me? The posts order the wrong way! Yeah, well .. you can change that. Open ./gulp-task/metalsmith.js and find the options for collections. Change the value to true. Like this: reverse: true.

I want my own design Go ahead! Knock your self out! The script use Metalsmith and Handlebars. Or you can change the script to use what ever you prefer.

Roadmap

Larger than Google Maps

Thank you!

This code is based on and inspired by Metalsmith Boilerplate. The design is free template from HTML5 Up

static-site-generator-from-wordpress-rest-api's People

Contributors

escio-helge avatar sjsd avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

shishak

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.