vertigo

command module
v0.0.0-...-be087da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2015 License: MIT Imports: 38 Imported by: 0

README

vertigo

wercker status Coverage Status Gobuild Download ![Gitter](https://badges.gitter.im/Join Chat.svg) Deploy Vertigo

Vertigo is blogging platform similar to Wordpress, Ghost, Medium, Svbtle or Tumblr. You can make multiple accounts and write multiple posts, which then appear on your front page. You can also make unlisted pages similar to Wordpress, which you can link to navigation with help of HTML, similar to Tumblr.

Written Go, Vertigo is not only fast, but can be run on all major operating systems like Windows, Linux and MacOSX without the language development tools.

##Is Vertigo free?

It is. Not only is the source code available online for anyone to use on MIT license, you can also deploy Vertigo to Heroku free of charge. Just click the Deploy to get started. If you are worried that Heroku might own your content, you can also deploy Vertigo to a normal server or even run it privately on your own desktop. More at Install instructions.

##How is Vertigo's frontend code handled?

The frontend code is powered by Go's template/html package, which syntax is similar to Mustache.js. The template files are in plain HMTL and JavaScript (vanilla) only appears on a few pages, such as the post edit page, where it is used to provide backup for any writings you make. JavaScript in general is aimed to be stripped down as much as possible to provide a better user experience on different devices.

Vertigo's routes by default can lead to either HTML templates or JSON endpoints depending on what URL is used. This means that as features as implemented, they are both available on /api/ and the normal frontend site. This makes it easy to add your preferred JavaScript MVC's on top of Vertigo. You can also code your own plugins or generate your own widgets from the data accessible from /api/ endpoint. This means that you create users, submit posts and read user data even without writing a single line of Go code. So basically, one could write a SPA application on top of the Go code with only using JavaScript. Whether you want to take that path or just edit the template files found in /templates/ is up to you.

##Demo

See my personal website

##Install instructions

Note: By default the HTTP server starts on port 3000. This can changed by declaring PORT environment variable or by passing one with the binary execution command.

###Binaries

Gobuild Download

###Heroku

Deploy

For advanced usage, see Advanced Heroku deployment

Note: To deploy to Heroku you need to have a credit card linked to them. If you wish not to link one, you may follow instructions on here to remove Mailgun from Heroku add-ons list. If you remove Mailgun you cannot use password reminder, but everything else should work.

###Source

  1. Install Go (I recommend using gvm)
  2. go get github.com/tools/godep
  3. git clone github.com/9uuso/vertigo
  4. cd vertigo && godep get ./ && godep go build
  5. Start Vertigo PORT="80" MARTINI_ENV="production" ./vertigo

###Docker

  1. Install docker
  2. cd vertigo
  3. docker build -t "vertigo" .
  4. docker run -d -p 80:80 vertigo

###Environment variables

  • DEV - required to run go test
  • PORT - the HTTP server port
  • MARTINI_ENV - used by Martini to enable production optimizations such as template caching
  • MAILGUN_API_KEY - Mailgun API key (declared by default with Heroku Mailgun Addon)
  • MAILGUN_SMTP_LOGIN - Another Mailgun API key (declared by default with Heroku Mailgun Addon)
  • DATABASE_URL - Database connection URL for PostgreSQL - if not declared, SQLite will be used

##Features

  • Installation wizard
  • JSON API
  • SQLite and PostgreSQL support
  • Search
  • Multiple account support
  • Auto-saving of posts to LocalStorage
  • RSS and Atom feeds
  • Password recovery with Mailgun
  • Markdown support

##Support

There are no real support channels existing right now, but I've tried to document the code as much as possible. Top of that, you can visit ![Gitter](https://badges.gitter.im/Join Chat.svg) to page me personally.

##License

MIT

Documentation

Overview

This file contains two cryptographic functions for both storing and comparing passwords. You should not modify this file unless you know what you are doing.

Blog in Go

Feeds.go contain HTTP routes for rendering RSS and Atom feeds.

Main.go contains settings related to the web server, such as template helper functions, HTTP routes and Martini settings.

This file contains bunch of miscful helper functions. The functions here are either too rare to be assiociated to some known file or are met more or less everywhere across the code.

This file contains about everything related to posts. At the top you will find routes and at the bottom you can find CRUD options. Some functions in this file are analogous to the ones in users.go.

Settings.go includes everything you would think site-wide settings need. It also contains a installation wizard route at the bottom of the file. You generally should not need to change anything in here.

This file contains about everything related to users aka users. At the top you will find routes and at the bottom you can find CRUD options. Some functions in this file are analogous to the ones in posts.go.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/cascadia
The cascadia package is an implementation of CSS selectors.
The cascadia package is an implementation of CSS selectors.
_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_workspace/src/code.google.com/p/go.crypto/bcrypt
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm.
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm.
_workspace/src/code.google.com/p/go.crypto/blowfish
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
_workspace/src/code.google.com/p/go.net/html
Package html implements an HTML5-compliant tokenizer and parser.
Package html implements an HTML5-compliant tokenizer and parser.
_workspace/src/code.google.com/p/go.net/html/atom
Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id".
Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id".
_workspace/src/code.google.com/p/go.net/html/charset
Package charset provides common text encodings for HTML documents.
Package charset provides common text encodings for HTML documents.
_workspace/src/github.com/PuerkitoBio/goquery
Package goquery implements features similar to jQuery, including the chainable syntax, to manipulate and query an HTML document.
Package goquery implements features similar to jQuery, including the chainable syntax, to manipulate and query an HTML document.
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
Package inject provides utilities for mapping and injecting dependencies in various ways.
_workspace/src/github.com/go-martini/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
_workspace/src/github.com/go-sql-driver/mysql
Go MySQL Driver - A MySQL-Driver for Go's database/sql package The driver should be used via the database/sql package: import "database/sql" import _ "github.com/go-sql-driver/mysql" db, err := sql.Open("mysql", "user:password@/dbname") See https://github.com/go-sql-driver/mysql#usage for details
Go MySQL Driver - A MySQL-Driver for Go's database/sql package The driver should be used via the database/sql package: import "database/sql" import _ "github.com/go-sql-driver/mysql" db, err := sql.Open("mysql", "user:password@/dbname") See https://github.com/go-sql-driver/mysql#usage for details
_workspace/src/github.com/gorilla/context
Package gorilla/context stores values shared during a request lifetime.
Package gorilla/context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/feeds
Syndication (feed) generator library for golang.
Syndication (feed) generator library for golang.
_workspace/src/github.com/gorilla/securecookie
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values.
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values.
_workspace/src/github.com/gorilla/sessions
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
_workspace/src/github.com/gosimple/slug
Package slug generate slug from unicode string, URL-friendly slugify with multiple languages support.
Package slug generate slug from unicode string, URL-friendly slugify with multiple languages support.
_workspace/src/github.com/kennygrant/sanitize
Package sanitize provides functions for sanitizing text.
Package sanitize provides functions for sanitizing text.
_workspace/src/github.com/lib/pq
Package pq is a pure Go Postgres driver for the database/sql package.
Package pq is a pure Go Postgres driver for the database/sql package.
_workspace/src/github.com/lib/pq/listen_example
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
_workspace/src/github.com/lib/pq/oid
Package oid contains OID constants as defined by the Postgres server.
Package oid contains OID constants as defined by the Postgres server.
_workspace/src/github.com/mailgun/mailgun-go
The mailgun package provides methods for interacting with the Mailgun API.
The mailgun package provides methods for interacting with the Mailgun API.
_workspace/src/github.com/martini-contrib/binding
Package binding transforms, with validation, a raw request into a populated structure used by your application logic.
Package binding transforms, with validation, a raw request into a populated structure used by your application logic.
_workspace/src/github.com/martini-contrib/render
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
_workspace/src/github.com/martini-contrib/sessions
Package sessions contains middleware for easy session management in Martini.
Package sessions contains middleware for easy session management in Martini.
_workspace/src/github.com/martini-contrib/strict
Package strict provides helpers for implementing strict APIs in Martini.
Package strict provides helpers for implementing strict APIs in Martini.
_workspace/src/github.com/mattn/go-sqlite3
Package sqlite3 provides interface to SQLite3 databases.
Package sqlite3 provides interface to SQLite3 databases.
_workspace/src/github.com/mbanzon/simplehttp
Package simplehttp provides some simple methods and types to do HTTP queries with form values and parameters easily - especially if the returned result is expected to be JSON or XML.
Package simplehttp provides some simple methods and types to do HTTP queries with form values and parameters easily - especially if the returned result is expected to be JSON or XML.
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
_workspace/src/github.com/onsi/ginkgo/ginkgo
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
_workspace/src/github.com/onsi/ginkgo/reporters
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
_workspace/src/github.com/pkg/browser
Package browser provides helpers to open files, readers, and urls in a browser window.
Package browser provides helpers to open files, readers, and urls in a browser window.
_workspace/src/github.com/pkg/browser/examples/Open
Open is a simple example of the github.com/pkg/browser package.
Open is a simple example of the github.com/pkg/browser package.
_workspace/src/github.com/russross/blackfriday
Blackfriday markdown processor.
Blackfriday markdown processor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL