Giter Site home page Giter Site logo

H2OBJECT

English

H2OBJECT 是什么?

H2OBJECT 同 hexo, hugo 一样是一个通过 markdown 文件快速创建内容型站点的工具。不同的是, H2OBJECT 参考了 Docker Pull/Push 的方式实现快速本地到线上站点的一键发布。

deploy.png

同时, 用户可以申请h2object.io平台提供的仅运行h2obect应用的docker容器运行线上站点.

快速开始

二进制安装

如果你无法直接源码安装或者不想被GFW扰乱心绪, 就直接下载可执行程序吧:

h2object-darwin-amd64.tar.gz

h2object-linux-amd64.tar.gz

h2object-windows-amd64.tar.gz

解压后,将 h2object 放入系统执行路径中。

源码安装

	$: go get github.com/h2object/h2object

国内安装吐槽(VPN 用户跳过)

取经求助

虽然已经竭尽全力减少对墙外包的依赖, 国内安装还是得提前做些准备工作:

由于项目中使用了以下两个国内绝对不能直接go get 的依赖包。

  • golang.org/x/net
  • golang.org/x/text
  • golang.org/x/image

请在 GOPATH 目录下创建相应目录:

mkdir -p $GOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/net.git
git clone https://github.com/golang/text.git
git clone https://github.com/golang/image.git

本地运行

$: h2object -w=/path/to/workdir http start

站点主题

主题查询

$: h2object theme search

主题下载

下载他人分享的站点主题

$: h2object  -w=/path/to/workdir theme pull [provider/name:version]

主题发布

将个人站点主题分享给其他用户,请先在配置文件中配置好[theme]项

$: h2object  -w=/path/to/workdir theme push

容器申请

  • 创建容器

容器创建前必须到h2object.io平台申请容器邀请码。

$: h2object -w=/path/to/workdir container create [邀请码]
  • 运行容器
$: h2object -w=/path/to/workdir container start [container id]

站点发布

将容器提供的appid,secret,host,port配置到本地发布站点的[deploy]配置项中

[deploy]
# 远端部署服务 域名 或 地址
host= h2object.io
# 远端部署服务 端口
port= 80
# 远端应用ID
appid= 
# 远端应用密钥
secret= 

再通过以下命令一键发布站点

$: h2object -w=/path/to/workdir deploy push

加入QQ群讨论(159823022)

开发指南

参考&使用的项目

非常欢迎您使用并推荐 H2OBJECT 项目。

H2O (HTTP to OBJECT)'s Projects

alipay icon alipay

支付宝开发包(pure alipay package base on net/http package )

apistore icon apistore

baidu api store for golang, 百度APIStore接口Golang实现

cast icon cast

safe and easy casting from one type to another in Go

config icon config

Configuration file parser for INI format

feeds icon feeds

golang rss/atom generator library

go-api icon go-api

http to object client sdk api for golang

go-daemon icon go-daemon

A library for writing system daemons in golang.

godnspod icon godnspod

DNSPod API Golang 客户端开发包。极简!

h2forward icon h2forward

http reverse proxy with http api to control the virtual hosts to forward

h2o icon h2o

HTTP to OBJECT, Powerful API & SDK

h2object icon h2object

h2object, another http server for markdown & static websites

homebrew icon homebrew

:beer: The missing package manager for OS X.

log icon log

Extension module of golang logging

log4go icon log4go

code.google.com/p/log4go, you know the reason for @ china

mapstructure icon mapstructure

Go library for decoding generic map values into native Go structures.

mux icon mux

A powerful URL router and dispatcher for golang.

oauth2 icon oauth2

用户认证,主要支持国内平台:qq、weibo、weixin

oxy icon oxy

Go middlewares for HTTP servers & proxies

pb icon pb

Console progress bar for Golang

rpc icon rpc

RPC for normal HTTP request with a special response Analyser interface.

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.