GitHubにはプロジェクトページをホスティングするGitHubページを機能があります。実際使っている人も多いでしょう。大抵はREADMEを掲載している程度ですが、より本格的にホスティングサイトとして使っている人もいます。 今回はそんな使いこなしている人にオススメなソフトウェア、Oghlinerを紹介します。Oghlinerを使うとGitHubページをオフライン対応します。

Oghlinerの使い方

Oghlinerはnpmでインストールできます。

npm install Oghliner -g

使い方として、まずはbootstrapサブコマンドを実行し、ベースを作成します。

$ oghliner bootstrap
Bootstrapping current directory as Oghliner app…

Your app's configuration is:

Name: offline-app
Repository: git@github.com:mykmelez/offline-app.git
Description: A template app bootstrapped with oghliner.
License: Apache-2.0

Would you like to change its configuration (y/N)? Y


Name: Offline-app
  :
✓ Overwriting README.md
✓ Skipping .gitignore
  :
✓ Skipping app/styles/stylesheet.css

✓ Creating files… done!
✓ Installing npm dependencies… done!

Your app has been bootstrapped! Just commit the changes and push the commit
to the origin/master branch:

git add --all && git commit -m"initial version of Oghliner app"
git push origin master

Then you can build, offline, and deploy the app using gulp commands.

ℹ For more information about building, offlining and deployment, see:
    https://mozilla.github.io/oghliner/

後はコードを修正し、GitHubリポジトリにPushするだけでOKです。

実際、オフラインに対応した場合です。外部の画像は取得できませんが、それ以外のリソースは表示できています。

HTML5のオフラインキャッシュは設定が面倒な割に様々な不具合を起こすことが多いのですが、Oghlinerのようにコマンドだけで使えるならばもっと積極的に使っても良さそうです。

Oghlinerはnode/JavaScript製、Apache License 2.0のオープンソース・ソフトウェアです。

Oghliner mozilla/oghliner