Skip to content

synchronize your wordpress or github to hugo website automaticlly

License

Notifications You must be signed in to change notification settings

shreyaskorti/hugo-sync

 
 

Repository files navigation

logr -an amazing project

What is hugo-sync

hugo-sync is an automaticlly solution that update your site page from github or your wordpress site based on HUGO.

Benifit

  1. Backup:backup your web content in the github.
  2. Search:add search function to your hugo website(although the hugo version 1.0 will support search function,but the current is have no proper search solution).
  3. Automation:do noce,all is done!

Work flow

  1. set the github hook event.
    git hook event
  2. add hook code to your wordpress:通过wordpress钩子接口实现新增修改删除文章后执行相应动作
  3. deploy your hook server in your wordpress server and hugo server if necessary.
  4. write in your wordpress page or in the github.the github will send webservice hook event to our hook server.
  5. the hugo hook server will update the hugo content and start the hugo procedural after received the github hook event msg . 6. after the finish of hugo converting, the static html page will be in public folder of hugo.
  6. the hugo hook server deploy the html to our website .

all the action above will be done by the computor automatically. what the only we need to do is writing.
hugo-sync work flow

How to use

  1. install the hugo tools,and create a hugo website.
  2. download your favorite theme, and config the config.toml:
# Theme to use (located in /themes/THEMENAME/)    
theme = "hyde-z"
  1. clone the repo, and deploy the folder in your hugo website root dictionary.
  2. colne the markdown repo of your hugo website, and deploy the folder in your hugo website root dictionary.
  3. modity the shell as your own server environment
  4. add auto start script to the rc.local of your server,eg:
    /xx/xxx/python3 /xx/xx/wp-hook-svr.py
  5. reboot

Demo

Issues

welcome the issues and PR for the project .

License

MIT

About

synchronize your wordpress or github to hugo website automaticlly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.0%
  • Shell 14.0%