Total Pageviews

Monday, 27 April 2026

Deploy Jekyll sites anywhere using jekyll-hook

 

This tutorial covers using jekyll-hook to automatically deploy changes from your GitHub repo to your own server.

What is jekyll-hook? Direct link to this section

jekyll-hook is a Node.js program which runs on a server. It listens for new commits on a GitHub repository using webhooks. When there is a commit, jekyll-hook pulls the latest source code, builds the site with Jekyll, then deploys the built site to a directory.

Setup Direct link to this section

I'm using Ubuntu 14.04 so adjust the instructions for your operating system.

Install Git, Node.js, Ruby and Jekyll:


$ sudo apt-get update

$ sudo apt-get install git nodejs ruby ruby1.9.1-dev npm

$ sudo gem install jekyll -v 2.4.0

Symlink nodejs to node:


$ sudo ln -s /usr/bin/nodejs /usr/bin/node

Clone the jekyll-hook repo from GitHub:


$ git clone https://github.com/developmentseed/jekyll-hook.git

Install the dependencies:


$ cd jekyll-hook

$ npm install

Configuration Direct link to this section

Copy the sample configuration to config.json:


$ cp config.sample.json config.json

Open config.json in a text editor.

With this script you can configure jekyll-hook to listen to a particular server, run special build scripts for a particular Git branch or send an email every time there's a build. The default config.json get us most of the way there, we just need to ensure changes can be pulled in from our account.

Change accounts to your GitHub account or organisation.


$ nano config.json

Here's my complete config.json:


{

"gh_server": "github.com",

"temp": "/home/ubuntu/jekyll-hook",

"public_repo": true,

"scripts": {

"#default": {

"build": "./scripts/build.sh",

"publish": "./scripts/publish.sh"

}

},

"secret": "",

"email": {

"isActivated": false,

"user": "",

"password": "",

"host": "",

"ssl": true

},

"accounts": [

"cloudcannon",

"mneumegen"

]

}

As you can see from the configuration, jekyll-hook is going to run ./scripts/build.sh when it detects a change. The default build script pulls the latest commits to the local repository and runs jekyll build. We don't need to change anything in this file.

Here's my ./scripts/build.sh:


#!/bin/bash

set -e

# This script is meant to be run automatically

# as part of the jekyll-hook application.

# https://github.com/developmentseed/jekyll-hook

repo=$1

branch=$2

owner=$3

giturl=$4

source=$5

build=$6

# Check to see if repo exists. If not, git clone it

if [ ! -d $source ]; then

git clone $giturl $source

fi

# Git checkout appropriate branch, pull latest code

cd $source

git checkout $branch

git pull origin $branch

cd -

# Run jekyll

cd $source

jekyll build -s $source -d $build

cd -

After the build finishes, jekyll-hook, runs ./scripts/publish.sh. This script moves the built site to your web server directory.

By default jekyll-hook deploys the site to /usr/share/nginx/html/$repo. $repo is one of the variables jekyll-hook makes available to use in the path. You can also use $branch, $owner, $giturl, $source and $build.

Change site to your desired location.


$ nano scripts/publish.sh

Here's my complete scripts/publish.sh:


#!/bin/bash

set -e

# This script is meant to be run automatically

# as part of the jekyll-hook application.

# https://github.com/developmentseed/jekyll-hook

repo=$1

branch=$2

owner=$3

giturl=$4

source=$5

build=$6

# Set the path of the hosted site

site="/home/ubuntu/$repo"

# Remove old site files, move new ones in place

# On amazon EC2 use sudo if nginx html forlder has root ownership

rm -rf $site

Jekyll-hook is set up to listen for changes from GitHub. When there is a change it will build the site and deploy it to a folder.

Webhook Direct link to this section

Now we need GitHub to send jekyll-hook a webhook when there's a commit to the repository.

Open your repository on GitHub. Then go to Settings -> Webhooks & services.

![GitHub webhooks](https://cc-dam.imgix.net/blog/images/blog/jekyll-hook/github.png)\

Click Add webhook. Set the Payload URL to point at your jekyll-hook server http://example.org:8080/hooks/jekyll/:branch where :branch is the branch you want to publish. The rest of the defaults are fine, press Add webhook.

![GitHub webhook](https://cc-dam.imgix.net/blog/images/blog/jekyll-hook/github-webhook.png)\

Deploying the site Direct link to this section

Run jekyll-hook. It listens for changes on port 8080:


$ ./jekyll-hook.js

If you're running this on EC2 remember you'll need to open port 8080 in your security group.

Make a change in the repository and you'll see logs appear in your jekyll-hook program. If nothing happens have a look at your webhook logs on GitHub.

Check the deployment directory to see a built version of your Jekyll site. Now you just need to configure your webserver to serve the site.

from  https://cloudcannon.com/blog/deploy-jekyll-sites-anywhere-using-jekyll-hook/

------

相关帖子:

 https://briteming.blogspot.com/2013/06/linux-vpsruby-jekyll.html

awesome-static-website-services

 A curated list of awesome static websites services.

Table of Contents

Audio
  • SoundCloud - Audio hosting with an embeddable player. Up to 3 hours of content is free.
  • Mixcloud - Audio hosting with unlimited uploads and an embeddable player.
  • Spotify - You can embed any song, album, or playlist with a Spotify Play Button.

Books

Calendar and Scheduling

  • Google Calendar - Embeddable calendar that you can collaborate with other people.
  • Booking.js - Beautiful embeddable booking widget.
  • zenplanner - Paid - Online scheduling for fitness.

Images

  • Flickr - Online photo hosting by Yahoo.
  • Cloudinary - Image hosting, manipulation and delivery.

Maps

  • Google Maps - Google maps are easily embeddable.
  • Mapbox - Really nice looking embeddable maps.
  • uMap - Create and embed personalized maps, based on the great OpenStreetMap dataset.

Presentations

  • Prezi - Online presentations with really transitions that can zoom and rotate.
  • Reveal.js - HTML presentation framework.
  • Slides.com - A place for creating, presenting and sharing slide decks.
  • SpeakerDeck - Upload your slides as a PDF, and get an online, shareable presentation.

Video

  • Mux - Paid - An API to play videos directly to the client. Can also power live streams.
  • YouTube - Embeddable videos with unlimited uploads.
  • Vimeo - Paid - Embeddable videos with no ads.
  • Vevo - Embeddable music videos.
  • Wistia - Free plan has a limit of 25 videos.

Code

  • Codepen - A playground of embeddable front-end code examples.
  • JS Bin - Embeddable front-end code examples.
  • JSFiddle - Embeddable front-end code examples.
  • highlight.js - Syntax highlighting for the web.
  • Indiepen - A privacy-friendly solution to embed front-end code examples.

Functions as a Service

  • 1Backend - Deploy your backend in seconds. Free tier included. Open source.
  • AWS Lambda - AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume
  • Google Cloud Functions - Create single-purpose, stand-alone functions that respond to Cloud events without the need to manage a server or runtime environment
  • Webtask by Auth0 - Call code on the server with simple HTTP, easier to set up by far than Lambda or Google's
  • Azure Functions - by Microsoft - same premise as Lambda on the Azure cloud
  • IronWorkers - by Iron.io - Run code in a multilanguage containerized environment with unlimited scale and simple pricing
  • IronFunctions - by Iron.io - IronFunctions is an open source serverless computing platform for any cloud - private, public, or hybrid.
  • OpenWhisk by IBM - part of their BlueMix hosting platform, and open source, ties into their Watson AI ecosystem nicely
  • StackPath EdgeEngine - Write functions as a service in the language of your choice and deploy them to a global network of data centers. All the networking, including intelligent routing and load balancing, is managed by StackPath over a private backbone.
  • Cloud 66 - Build and deploy static websites to your own cloud account.
  • Vercel - Vercel lets people write functions as a service in their language of choice and deploy as part of a monorepo.
  • Azure Static Web Apps - Full-stack static app hosting including serverless Functions, authentication, CDN and more
  • Qoddi - Full stack app hosting with data storage included, similar to Heroku with a developer centric approach. Free to use up to 3 apps.
  • Autocode - Autocode turns functions into scalable web services in an instant, no configuration required; serverless hosting available with an in-browser IDE, an API library that’s easy to use, and seamlessly managed authentication.

GraphQL

  • FaunaDB - Serverless GraphQL database. Free tier with no time limit. Easily included in Netlify apps.

Community

Comments system

  • Staticman - Staticman is a Node.js application that receives user-generated content and uploads it as data files to a GitHub repository. In practice, this allows you to have dynamic content (e.g. blog post comments) as part of a fully static website, as long as your site automatically deploys on every push to GitHub, as seen on GitHub Pages, Netlify and others.
  • Disqus - Easily embeddable comments with nested replies, multiple login methods, and email notifications.
  • Facebook Comments - Embeddable comments for your site by Facebook.
  • IntenseDebate Comments - Embeddable comments with nested replies, multiple login methods, and email notifications.
  • LiveFyre - Real-time comments, SEO-optimized, stocked with social features, and beautiful on both desktop and mobile.
  • Redditjs Embed Widget - Embed Reddit comments on your site. If it hasn't been posted, it will show a link to encourage the user to submit.
  • Muut.com - Embeddable comments, forum and private messaging. A lot of functionality, but really low footprint left on your website.
  • Gitment - Comment system based on GitHub Issues, which can be used in the frontend without any server-side implementation.
  • giscus - A comments widget built on GitHub Discussions.
  • utterances - A lightweight comments widget built on GitHub issues.

Forms

Really Simple Forms

  • Formspree - Receive emails from a form on your static website.
  • elFormo - Simple form processing and response retrieval via email.
  • Flipmail - Simple form processing and response retrieval via email.
  • MailThis - Simple form submissions via email with optional attachments.
  • Simple Form - Simple forms with optional file attachments, email notifications, and online submission viewing.
  • Brisk Forms - Free form submission service emails you responses while keeping your email address private and is open source.
  • 99 Inbound - Form endpoint service with email/Slack notifications and third party app integrations (e.g. MailChimp)
  • Getform - Form backend platform for designers and developers, with email and integrations.
  • HeyForm - Free, easy-to-use drag & drop form maker capable of crafting powerful online forms. Includes 40+ field types, integrations, analytics, and more.
  • Form.taxi - Backend to handle form submissions easily and reliably, with email notifications, file uploads and GDPR-compliant data processing.

Normal Forms

  • Formcarry - Hassle-free HTML form endpoints for your form, powerful dashboard, reliable spam blocking, attachment uploads and Zapier integrations.
  • Formcake - The form backend built for developers: Zapier integrations, simple endpoint API, unlimited forms.
  • Google Forms - Saves results into Google Sheets and can email you when there is a submission.
  • FormKeep - Paid - View form submissions in a beautiful web interface. It has spam filtering and it integrates with webhooks such as Gmail, Trello, and Basecamp.
  • 123 Contact Form - Connects to other online services such at MailChimp, Salesforce, and Google Drive. It also integrates with payment Processers and includes security and analytics.
  • FormAssembly - Allows you to build any kind of form that can include complex branching logic and multiple pages.
  • FormSite - Form builder with payments and form management.
  • FormStack - Forms with A/B testing, partial submission, analytics, and integrations.
  • Sheetsu - POST and GET your data to Google Spreadsheet.
  • Typeform - Awesome forms that can be embedded.
  • Wufoo - Free or Paid - Forms that you can build with a form designer, with notifications, reports, and payments.
  • Zoho - Forms with file upload and captcha.
  • GitHub Issues - This is an interesting way for developers to get comments/questions. See github.com/sindresorhus/ama for an example.
  • Utterences - A lightweight comments widget built on GitHub issues.
  • FormBackend - Create form-backends and submit your HTML forms to our backend. View the entries online and connect to other services. Receive an email every time a new entry is submitted.
  • Pageclip - A flexible server / backend for HTML forms. View your data in the realtime web interface, or use the API to get CSV and JSON output.
  • Formester - Forms and email marketing (lead collection, email campaigns, and newsletters) with integrations.
  • StaticKit - Modern forms for static sites, with native support for React.
  • SheetDB - Turn a Google Spreadsheet into a JSON API.
  • Form2Channel - Post your HTML form to Form2Channel to store submissions in Google Sheets and receive them via email, Slack or Telegram. No signups, no costs, no limits.
  • reCAPTCHAme - reCAPTCHA and hCAPTCHA token verification service. Post your form to reCAPTCHAme to avoid getting spammed. Made for static websites, no server-side coding required.
  • Formware - Conversational forms with unlimited responses that can be embedded on any website.

Provided by the Host

  • Netlify - Netlify comes with built-in form handling.

Live Chat

  • jivochat - JivoSite is a professional live chat for websites that was specifically designed to increase your online sales.
  • LiveChat - Live chat on your website.
  • Olark - Live chat on your website. You can also see who's on your website and what they're doing.
  • SnapEngage - Live chat with integrations and custom styles.
  • tawk.co - Lets you monitor and chat with visitors on your website.
  • WebsiteAlive - Live chat for your website & social networks.
  • Zopim - Live chat with free trial.
  • Tiledesk - Free Live Chat with open source chatbot builder.

Newsletters

  • MailChimp - Free email marketing. You can pay to add more features.
  • Constant Contact - Email marketing with campaigns, autoresponders, and analytics.
  • AWeber - Email marketing with campaigns, autoresponders, and analytics.
  • Campaign Monitor - Email marketing with campaigns, autoresponders, and analytics.
  • MailerLite - Free email marketing. You can pay for more subscribers.

Social Media

  • Pinterest - Pin It Button.
  • Twitter - Embedded tweets.
  • Facebook - Facebook embedded plugins.
  • ShareThis - Sharing buttons for multiple social networks.
  • Kontaktify - A contact widget that provides an easy way for visitors to get in touch.

Surveys

  • Google Forms - You can use Google forms for surveys or for forms on your site.
  • SurveyMonkey - Easy to use and free surveys.
  • Typeform - Really beautiful forms.
  • Qualaroo - Embed surveys anywhere on your website that comes up from the bottom right side of the screen.
  • Insight Stash - Fast, Simple survey forms.
  • Formware - Create stunning surveys with unlimited responses for free.

E-Commerce

  • Ecwid - Embeddable shopping cart.
  • FoxyCart - Add a shopping cart with basic html code.
  • Snipcart - Include a few lines of code for a full online shop.
  • Gumroad - An all-in-one solution to sell your work.
  • Payhip - An embeddable way to sell digital downloads & memberships
  • Moltin - Add eCommerce functionality to anything.
  • Trolley - Add a popup cart to any website - designed for static & JAMstack sites.
  • Commerce Layer - Add enterprise ecommerce to your JAMstack.

Payments

Search

Self-hosted:

  • lunr.js - Simple full-text search in your browser.
  • itemsjs - Full text, faceted, almost dependency free search engine in javascript
  • minisearch - Tiny and powerful JavaScript full-text search engine for browser and Node
  • flexsearch - Next-Generation full text search library for Browser and Node.js
  • fuse.js - Powerful, lightweight fuzzy-search library, with zero dependencies
  • static-search - A Go program to generate JSON index of HTML files, and a JavaScript component with optional UI to search this index
  • elasticlunr - Lightweight full-text search engine developed in JavaScript for browser search and offline search based on Lunr.js
  • tinysearch - Tiny, full-text search engine for static websites built with Rust and Wasm
  • js-search - Client-side searches of JavaScript and JSON objects, ES5 compatible and does not require jQuery or any other third-party libraries
  • search-index - A persistent, network resilient, full text search library for the browser and Node.js
  • fuzzysearch - Tiny and blazing-fast fuzzy search in JavaScript
  • fuzzy - Fuzzy search / filter for browser and node
  • fullproof - Javascript library that provides high-quality full-text search in the browser
  • Jets.js - Native CSS search engine
  • Hulipaa - Static full-text search engine capable of handling thousands of pages with a minimalist searchbar UI to add to your static website.

Third party integration:

  • Google Custom Search Engine - Search your site with a custom Google Search.
  • Algolia - Hosted Search API that delivers instant and relevant results from the first keystroke.
  • CloudSh - Powerful search for your website with a few lines of JavaScript.

Analytics

Authentication

  • Uthentic - Serverless, passwordless login for static sites in 2 lines of code.

Utilities

  • BulkPicTools - A privacy-first, browser-based batch image processor for static site creators, leveraging WebAssembly for local compression and conversion.

Other

Related Lists

from  https://github.com/agarrharr/awesome-static-website-services

赖岳谦 | 美国让位给中国

-赖岳谦真是个有远见的战略家

中国该变了!时机已到

-中国现在的军事实力碾压美国,中国的电磁弹射系统更是远胜美国。

伊朗不急!川普没辄!

 

-伊朗已看透川普的底牌

stormkit

 

Self-hostable alternative to Vercel/Netlify. Deploy modern web apps with automated CI/CD, custom domains, and environment management.

 

Stormkit is a hosting solution for seamless deployment and management of modern web applications.

Self-Hosted Edition

The Self-Hosted Edition of Stormkit gives you the flexibility to host your own instance of Stormkit on your infrastructure. This version is ideal for organizations that require more control over their hosting environment, need to comply with specific regulatory requirements, or prefer to manage their own infrastructure.

Getting Started

To get started with the Self-Hosted Edition of Stormkit, you can choose to use either the provided binaries or Docker images.

Using docker containers

You can use Docker images to run the Self-Hosted Edition. The following images are available:

  • ghcr.io/stormkit-io/workerserver:latest
  • ghcr.io/stormkit-io/hosting:latest

Additional services

In addition to the Stormkit's microservices, a PostgreSQL database and a Redis Instance is also required for Stormkit to function properly.

Local Development

To run Stormkit locally:

Prerequisites

  • Go 1.21+
  • Node.js 22+
  • PostgreSQL 14+
  • Redis 7+
  • Mise
  • Docker

You can install go and node using Mise, which is a polyglot tool version manager.

# Trust the dependencies specified in `mise.toml` and install them
mise trust && mise install

Running the services

# Clone the repository
git clone https://github.com/stormkit-io/stormkit-io
cd stormkit-io

# Start all services (includes database setup and migrations)
make dev

After starting the services:

  • The landing page will be available at https://localhost:5500
  • The application will be available at https://localhost:5400
  • The API will be available at http://api.localhost:8888

Project Structure

stormkit-io/
├── src/
│   ├── ce/                   # Community Edition (AGPL-3.0)
│   │   ├── api/              # REST API server
│   │   ├── hosting/          # Hosting service
│   │   ├── runner/           # Build and deployment runner
│   │   └── workerserver/     # Background job processing
│   ├── ee/                   # Enterprise Edition (Commercial)
│   │   ├── api/              # Enterprise API features
│   │   ├── hosting/          # Enterprise hosting features
│   │   └── workerserver/     # Enterprise background services
│   ├── lib/                  # Shared libraries and utilities
│   ├── migrations/           # Database migrations
│   ├── mocks/                # Test mocks and fixtures
│   └── ui/                   # Frontend React
│   └── www/                  # Landing page React
├── scripts/                  # Build and deployment scripts

Component Overview

  • Community Edition (src/ce/): Open source components under AGPL-3.0
  • Enterprise Edition (src/ee/): Commercial features requiring a license
  • Shared Libraries (src/lib/): Common utilities used by both editions
  • Frontend (src/ui/): React-based web interface

Testing

Tests require PostgreSQL with a test database named sktest and Redis to be running.

Setup

# Start services
docker compose up -d db redis

# Create test database
docker compose exec db createdb -U ${POSTGRES_USER} sktest

Running Tests

# Run backend and frontend tests
make test

# Run only backend tests
make test-be

# Run only frontend tests
make test-fe

Generating mocks

When adding or changing interfaces under src/lib (or other packages) we generate testify mocks using mockery so tests can inject fakes.

Recommended command (run from the repository root):

# generate mocks for all interfaces in the repo that require the alibaba and imageopt build tags
mockery --case=underscore --dir ./ --tags=alibaba,imageopt --all --output=./src/mocks

Notes:

  • You can run mockery via go run if you don't want to install the binary globally:
go run github.com/vektra/mockery/v2@latest --case=underscore --dir ./ --tags=alibaba,imageopt --all --output=./src/mocks
  • If you need expecter helpers for testify, add --with-expecter to the command.
  • Use --case=underscore to match repository naming conventions for generated files.
  • After regenerating mocks, run gofmt/go vet and go test ./... and commit the updated files under src/mocks.

Troubleshooting

For detailed troubleshooting steps, see our dedicated troubleshooting guide.

from  https://github.com/stormkit-io/stormkit-io

我使用其 Cloud Edition部署web application(比如静态博客程序)失败。找时间试试它的Self-Hosted Edition


Sunday, 26 April 2026

骆驼草

 

-多亏了这些人,在为中国成为强国默默打基础.