Code Monkey home page Code Monkey logo

hugopit's Introduction

Hugopit

An EXPERIMENTAL idea for a web based editor for Hugo.

THIS IS IN APLHA STATE.

I stumbled upon on the Cockpit CMS, which is built in PHP and uses SQLite (or MongoDB) as database. I've found it very neat, as it has custom fields and other cool stuff and appears to be very fast.

But I wondered if I could adapt it as an editor for Hugo, a static site generator built in Go. As a matter of fact, it worked better than expected. :)

I put together a quick demo video to show my approach and how things worked. I used it's PHP API to create the .md files for Hugo.

The project's code is all here, but you will need to install Hugo on your machine, of course. You also need to have the requirements for running Cockpit:

  • PHP >= 5.4
  • PDO + SQLite (or MongoDB)
  • GD extension
  • mod_rewrite enabled (on apache)

Screenshots

  1. Cockpit dashboard: https://raw.githubusercontent.com/sjardim/Hugopit/master/cockpit-screenshot.png
  2. Hugo website: https://raw.githubusercontent.com/sjardim/Hugopit/master/hugo-screenshot.png

Why use it?

Although Cockpit appears to have great performance, it still depends on a server running PHP. With this solution, you can have the UX of a web based editor and use Hugo to create a static site that can run everywhere (Github pages, S3, etc). Nothing beats this approach in security (no files and database to worry about).

Why NOT use it

You can't import Hugo content to it, unless you make such code. This was an experiment and only works on creating new content.

Instructions

  1. Download this repo contents
  2. Create a new hugo site: hugo new site mysite
  3. Replace mysite folder contents with the contents you just downloaded
  4. Run hugo server --watch

Note: I recorded the screen on my ultra wide monitor wich has a proportion of 21:9. I noticed after that it wasn't the best of ideas, specially if you watch it on a small monitor.

hugopit's People

Contributors

sjardim avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.