jekyll doc theme
1.0.0
詳細な情報とデモについては、Web サイトにアクセスしてください。
開始する前に Ruby と gem が必要です。その場合:
# install bundler
gem install bundler
# clone the project
git clone https://github.com/aksakalli/jekyll-doc-theme.git
cd jekyll-doc-theme
# install dependencies
bundle install
# run jekyll with dependencies
bundle exec jekyll serve
Github Pages をサポートするための移行により、多くのファイルが/asset
フォルダーに再配置されました。
あるいは、本番環境でのパフォーマンスを向上させるために、Nginx からファイルを提供するマルチステージ Dockerfile を使用してデプロイすることもできます。
サイトのJEKYLL_BASEURL
のイメージを構築します。
docker build --build-arg JEKYLL_BASEURL="/your-base/url" -t jekyll-doc-theme .
(またはルートの場合は空のままにしておきます: JEKYLL_BASEURL=""
) それを提供します:
docker run -p 8080:80 jekyll-doc-theme
このテーマは、Remote Theme プラグインを使用して Github Pages でも利用できます。
Gemfile
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
_config.yml
# Configure the remote_theme plugin with the gh-pages branch
# or the specific tag
remote_theme: aksakalli/jekyll-doc-theme@gh-pages
プロジェクトのファイルは、同じ名前のテーマ ファイルをオーバーライドします。たとえば、最も多くのコメントが寄せられる使用例は、サイトのテーマや色の変更です。これを行うには、次の手順を実行する必要があります。
aksakalli/jekyll-doc-theme/asset/css/main.scss
の内容を独自のプロジェクトにコピーします (フォルダー構造を維持します)。 // Bootstrap variable overrides
$grid-gutter-width: 30px !default;
$container-desktop: (900px + $grid-gutter-width) !default;
$container-large-desktop: (900px + $grid-gutter-width) !default;
@import // Original import statement
{% if site.bootwatch %}
"bootswatch/{{site.bootwatch | downcase}}/variables",
{% endif %}
"bootstrap",
{% if site.bootwatch %}
"bootswatch/{{site.bootwatch | downcase}}/bootswatch",
{% endif %}
"syntax-highlighting",
"typeahead",
"jekyll-doc-theme"
;
// More custom overrides.
MITライセンスに基づいてリリースされています。