LinkSearchMenuExpandDocument
Table of contents

Jekyllとはなにか

Jekyllは、個人、プロジェクト、または組織のサイト向けの、 シンプルなブログ対応の静的サイトジェネレーターです。

Quick Start

  1. 開発環境をインストール

  2. Jekylとbundlerをインストール

    gem install jekyll bundler
    
  3. ./mysiteに新しいJekyllサイトを作成

    bundle exec jekyll new mysite
    
  4. 作成したサイトのディレクトリに移動

    cd mysite
    
  5. テストサーバーの起動

    bundle exec jekyll serve
    

    _siteにHTMLファイルが生成され、同時に_siteをルートにした テストサーバーが起動します。

  6. http://localhost:4000にブラウザでアクセスしサイトを確認

チュートリアル

jekyll serveコマンドのオプション

❯ bundle exec jekyll serve --help
jekyll serve -- Serve your site locally

Usage:

  jekyll serve [options]

Options:
            --config CONFIG_FILE[,CONFIG_FILE2,...]  Custom configuration file
        -d, --destination DESTINATION  The current folder will be generated into DESTINATION
        -s, --source SOURCE  Custom source directory
            --future       Publishes posts with a future date
            --limit_posts MAX_POSTS  Limits the number of posts to parse and publish
        -w, --[no-]watch   Watch for changes and rebuild
        -b, --baseurl URL  Serve the website from the given base URL
            --force_polling  Force watch to use polling
            --lsi          Use LSI for improved related posts
        -D, --drafts       Render posts in the _drafts folder
            --unpublished  Render posts that were marked as unpublished
            --disable-disk-cache  Disable caching to disk in non-safe mode
        -q, --quiet        Silence output.
        -V, --verbose      Print verbose output.
        -I, --incremental  Enable incremental rebuild.
            --strict_front_matter  Fail if errors are present in front matter
            --ssl-cert [CERT]  X.509 (SSL) certificate.
        -H, --host [HOST]  Host to bind to
        -o, --open-url     Launch your site in a browser
        -B, --detach       Run the server in the background
            --ssl-key [KEY]  X.509 (SSL) Private Key.
        -P, --port [PORT]  Port to listen on
            --show-dir-listing  Show a directory listing instead of loading your index file.
            --skip-initial-build  Skips the initial site build which occurs before the server is started.
        -l, --livereload   Use LiveReload to automatically refresh browsers
            --livereload-ignore ignore GLOB1[,GLOB2[,...]]  Files for LiveReload to ignore. Remember to quote the values so your shell won't expand them
            --livereload-min-delay [SECONDS]  Minimum reload delay
            --livereload-max-delay [SECONDS]  Maximum reload delay
            --livereload-port [PORT]  Port for LiveReload to listen on
        -s, --source [DIR]  Source directory (defaults to ./)
        -d, --destination [DIR]  Destination directory (defaults to ./_site)
            --safe         Safe mode (defaults to false)
        -p, --plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]  Plugins directory (defaults to ./_plugins)
            --layouts DIR  Layouts directory (defaults to ./_layouts)
            --profile      Generate a Liquid rendering profile
        -h, --help         Show this message
        -v, --version      Print the name and version
        -t, --trace        Show the full backtrace when an error occurs

ブログ記事

下記に掲載を希望される方はご連絡ください (詳細)

抜粋は管理人が行なっています

Back to top


Back to top

Copyright © 2021 Otti

Page last modified: