1.0.2 • Published 2 years ago

hyvor-blogs-cli v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Hyvor Blogs CLI

This is a tool for developing Hyvor Blogs themes. See Theme Development Documentation to learn about developing themes.

Usage

  1. If you don't have Node.js/npm, install it first.
  2. Install this CLI tool globally in your computer using NPM
npm install -g hyvor-blog-cli
  1. Create a new folder for your theme.
mkdir my-theme
  1. cd and run this tool there.
cd my-theme
hyvor-blogs-cli

This will create all required folders and files of your theme for you to start and will also start a local server, which allows you to test your theme.

  1. Visit 127.0.0.1:8855 to test the theme.

How it works

This tool does two things. First, it syncs your local files with our production system using the uuid in .hb.cli.json. Then, it works as a local server (at port 8855). This server DOES NOT render content. It sends requests to our production server to render content and it just serves them (kind of like a proxy). It makes sure that your theme will work exactly same locally and in production. And, yes, because of that, you will need an active internet connection to develop the theme.

If you are interested in how this proxy thing works, see our delivery API.

Data of the blog is from our demo blog (demo.hyvorblogs.io). It has a several posts, pages, tags, and authors. It has the default routes. Using a custom blog as a data source is currently not supported. If you would like that feature, please create an issue.

Using GIT

If you are using GIT, make sure to add .hb.cli.json to .gitignore.