All Projects → titpetric → Pendulum

titpetric / Pendulum

Licence: wtfpl
A simple markdown editor for static files (Hugo, Nexo, Jekyll, MkDocs, ...)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Pendulum

readme-in-static-site
💎 Transform and insert your GitHub readme in your static site.
Stars: ✭ 24 (-84.71%)
Mutual labels:  static-site-generator, hugo, static-site
jekyll-skeleton
Scaffolding to start with a Jekyll website
Stars: ✭ 27 (-82.8%)
Mutual labels:  jekyll, static-site-generator, static-site
neofeed-theme
A personal feed for Neocities, GitHub Pages, or anywhere else, built with Hugo. #IndieWeb friendly and all yours. It's better than Twitter.
Stars: ✭ 62 (-60.51%)
Mutual labels:  static-site-generator, hugo, static-site
Vanilla Back To Top
Simple and smooth Back To Top button
Stars: ✭ 179 (+14.01%)
Mutual labels:  jekyll, static-site-generator, hugo
Create Static Site
Create static websites with no build configuration.
Stars: ✭ 124 (-21.02%)
Mutual labels:  jekyll, hugo, static-site
Post Scheduler
Schedule posts & content updates for static websites (Jekyll, Hugo, Gatsby, Phenomic etc)
Stars: ✭ 184 (+17.2%)
Mutual labels:  jekyll, static-site-generator, hugo
hugo-initio
Hugo Theme port of Initio bootstrap template by GetTemplate
Stars: ✭ 58 (-63.06%)
Mutual labels:  static-site-generator, hugo, static-site
contentful-hugo
A CLI tool that pulls data from Contentful and turns it into markdown files for Hugo and other static site generators. It also includes an express server that can be used for local development and content previews
Stars: ✭ 31 (-80.25%)
Mutual labels:  static-site-generator, hugo, static-site
Ng Static Site Generator
ng-static-site-generator is a webpack-based command line build tool that builds an Angular app and Jekyll-style blog entry html files into a static html and css website. It also supports building a client app so you can have static pages that are also capable of running dynamic functionality coded in Angular.
Stars: ✭ 42 (-73.25%)
Mutual labels:  jekyll, static-site-generator, static-site
Forty Jekyll Theme
A Jekyll version of the "Forty" theme by HTML5 UP.
Stars: ✭ 695 (+342.68%)
Mutual labels:  jekyll, static-site-generator, static-site
Staticman
💪 User-generated content for Git-powered websites
Stars: ✭ 2,098 (+1236.31%)
Mutual labels:  jekyll, static-site-generator, hugo
Hugo Boilerplate
A Hugo boilerplate for building modern websites
Stars: ✭ 58 (-63.06%)
Mutual labels:  static-site-generator, hugo, static-site
Awesome Static Hosting And Cms
A collection of awesome static hosting & CMS providers
Stars: ✭ 163 (+3.82%)
Mutual labels:  jekyll, hugo, static-site
Jekyll Doc Theme
Jekyll theme for creating project documentation websites
Stars: ✭ 203 (+29.3%)
Mutual labels:  jekyll, static-site-generator, static-site
Hugs
🤗 A super simple starting point for Hugo websites.
Stars: ✭ 162 (+3.18%)
Mutual labels:  static-site-generator, hugo, static-site
Publii
Publii is a desktop-based CMS for Windows, Mac and Linux that makes creating static websites fast and hassle-free, even for beginners.
Stars: ✭ 3,644 (+2221.02%)
Mutual labels:  static-site-generator, static-site, vuejs2
Awesome Docs With Static Site Generators
Pointers to all templates and implementations based on static site generators
Stars: ✭ 44 (-71.97%)
Mutual labels:  jekyll, static-site-generator, hugo
Hugo Theme Basic
Basic site theme styled with minimal tachyons, syntax highlighting, and blog series configuration. 📦
Stars: ✭ 89 (-43.31%)
Mutual labels:  static-site-generator, hugo, static-site
Hugo Coder
A minimalist blog theme for hugo.
Stars: ✭ 1,374 (+775.16%)
Mutual labels:  static-site-generator, hugo
Hugo Theme Nix
Nix is a simple, minimal theme for Hugo
Stars: ✭ 101 (-35.67%)
Mutual labels:  static-site-generator, hugo

Pendulum

A simple editor for markdown/txt files. Supports saving changes into git repositories hosted anywhere (git add, git commit).

Docker image and built binaries are provided. Written by @TitPetric and licensed under the permissive WTFPL.

Codeship Status for titpetric/pendulum

Running it in docker

To run it in Docker:

docker run -d --name pendulum \
	--restart=always \
	-p 8080:8080 \
	-v $(pwd):/app/contents \
	titpetric/pendulum

This will expose your current directory to Pendulum for editing. You can open the interface on http://localhost:8080/ and start editing those files right away.

Download executable

There are binaries for 64bit Linux and Windows available on the releases page. Usage is simple. Download the .tgz file, unpack the binary and run it with any options like this:

# ./pendulum -?
flag provided but not defined: -?
Usage of pendulum:
  -addr string
        Address for server (default ":8080")
  -contents string
        Folder for display (default ".")

If you want to serve contents of a test folder on port 8081 you would run it as:

./pendulum -addr :8081 -contents test

It's also supported to pass the contents folder as a normal argument. This is the shortest way of starting pendulum serving a custom folder: ./pendulum folder.

Screenshot

As you write or scroll either the textarea or the preview pane, the scroll positions are synchronised based on percentage. In case of images in the text, accuracy can be quite off, but it's possible to improve this behaviour in the future.

Most of the development is basically related with the preview of whatever it is you're editing. The editor itself doesn't care about anything other than the contents of the text file you're opening and trying to save.

Thanks

If you want to thank me, please consider buying a book or three:

This project exists only because of the last book on the list.

Why did I make this?

There's a distinct lack of friendly solutions that just let you point to a folder and edit a bunch of text or markdown files. I wrote about three books on Leanpub (see above), and it was useful to provide me with a way to review those markdown files. I'm also blogging with Hugo, used to blog with Hexo, have some Jekyll files for my GitHub page, and I tend to write documentation with MkDocs. That's about five systems which I actively write content into and those are just the public ones.

How is it made?

There's a very simple API that powers the editor. The API provides exactly three calls:

  1. /api/list - lists folders and files for navigation,
  2. /api/read - reads a single file for editing,
  3. /api/store - stores a single file contents (can create new files)

It operates exclusively on the contents folder and the files you provide in there. The editor doesn't care what kind of files you put there, currently only files starting with a dot are excluded, ie, .git, .gitignore,...

Go server + API

A full HTTP server is implemented with Go. By default it listens on port 8080, but it's trivial to change this, just by passing the -addr option when you run it.

go run *.go -addr :80

Note: Pendulum supports git versioning. It does require you to set git config for user.name and user.email. Without those, Pendulum will not add/commit files, regardless if a git repository is present or not.

Special syntax

Software Type Syntax Support
Leanpub Citation A> Note Yes
Leanpub Pagebreak {pagebreak} Yes
Hugo Pagebreak <!--more--> Yes
Hexo Image asset_img Yes

I'm trying to add new features here. Feel free to submit a PR if there's a syntax you'd like to support, with the appropriate tests under front/src/markdown/*.

Status

  • [x] Full API for list, read and store,
  • [x] Navigation of folders and files on the front-end,
  • [x] Editor component with synchronised scrolling with preview,
  • [x] Marked preview,
  • [ ] (partially done) Add support for some of Leanpub syntax (A>, page break,...),
  • [ ] Add support for some of Hugo syntax (<!--more-->, metadata, ...),
  • [x] Actually save the contents that are being edited (client-side ajax),
  • [x] Check if git has user.name && user.email set before commiting with git
  • [x] Add git support to Go API
  • [ ] Add option for HTTP auth
  • [x] Deprecate/remove PHP API
  • [x] Support images with relative links in rendering
  • [x] Display images from preview markdown pane
  • [ ] More markdown styling (done: blockquote, code, image, needs: tables,...)
  • [x] Docker image for delivery
  • [x] Go server for delivery
  • [x] Git support from Go / Docker
  • [x] Codeship CI,
  • [x] Semver (sort of),
  • [x] Pack public_html data into release binary
  • [x] Downloadable builds on GitHub
  • [x] Windows build
  • [x] Create new files over front-end interface

I guess unit testing should be somewhere on the list, if this thing ever gets any traction.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].