Giter VIP home page Giter VIP logo

hugopit's Introduction

Hugopit

An EXPERIMENTAL idea for a web based editor for Hugo.

UPDATE: Check a better project using Cockpit + Hugo, builti by @iakta.


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 Cockpit'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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hugopit's Issues

administer hugo posts from cockpit admin panel

Hi, I'm newbie to hugo & cockpit.
I have installed cockpit and logged in cockpit admin panel successfully.
Also I made hugo site on my home directory and replaced the contents with your repo.
Here I'm stuck.
How do I open/edit the hugo blogs staffs from cockpit admin panel?

Thanks for the work.

How do I get cockpit to run?

I left this post on your youtube page also.

This looks great. I downloaded it and ran Hugo server like you said and I get the Hugo+Cockpit page like in your video (localhost:1313). Problem is how do I run cockpit? Is Hugo server also supposed to serve Cockpit from localhost:1313?? If I run my other apache server to get just localhost, then run your index.php file, I get a page that wants to import to Cockpit the Hugo posts and pages etc. If I click on any of those links I get page not found or something to that effect. The links are something like 'localhost/posts', localhost/pages'.

I am running in www/hugopit folder, not root (www) folder. What am I doing wrong? Most likely a path problem, htaccess?? something in index.php??

Question about editor

Firstly, great job! Really like the flow of Hugopit.

Thinking of using in a classroom project but the users are in age group 9-12 years old.

My question is how hard would it be to integrate an editor like CKEditor and maybe with a file manager?

I understand that to many this would defeat ease of use and bulk, but some of the younger users (in my case) will need an easier editor when adding images, videos etc. Really thinking Hugo would fit nicely into our science classroom blogging environment.

Thanks for your time and sharing.

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.