From 5924eb19f6730e80d886337bf84874c570089a6a Mon Sep 17 00:00:00 2001 From: Malathi Date: Mon, 7 Sep 2020 23:08:06 +0530 Subject: [PATCH] Use data file to render table at `/docs/configuration/options/#global-configuration` (#8377) Merge pull request 8377 --- docs/_data/config_options.yml | 37 +++++++ docs/_docs/configuration/options.md | 163 ++++------------------------ 2 files changed, 56 insertions(+), 144 deletions(-) create mode 100644 docs/_data/config_options.yml diff --git a/docs/_data/config_options.yml b/docs/_data/config_options.yml new file mode 100644 index 00000000..a2430caf --- /dev/null +++ b/docs/_data/config_options.yml @@ -0,0 +1,37 @@ +global: +- name: Site Source + description: Change the directory where Jekyll will read files + option: "source: DIR" + flag: -s, --source DIR +- name: Site Destination + description: Change the directory where Jekyll will write files + option: "destination: DIR" + flag: -d, --destination DIR +- name: Safe + description: "Disable non-whitelisted plugins, caching to disk, and ignore symbolic links." + option: "safe: BOOL" + flag: --safe +- name: Disable Disk Cache + version-badge: 4.1.0 + description: "Disable caching of content to disk in order to skip creating a .jekyll-cache or similar directory at the source to avoid interference with virtual environments and third-party directory watchers. Caching to disk is always disabled in safe mode." + option: "disable_disk_cache: BOOL" + flag: --disable-disk-cache +- name: Ignore theme configuration + version-badge: 4.1.0 + description: "Jekyll 4.0 started allowing themes to bundle a _config.yml to simplify theme-onboarding for new users. In the unfortunate situation that importing a bundled theme configuration messes up the merged site-configuration, the user can configure Jekyll to not import the theme-config entirely." + option: "ignore_theme_config: BOOL" +- name: Exclude + description: "Exclude directories and/or files from the conversion. These exclusions are relative to the site's source directory and cannot be outside the source directory." + option: "exclude: [DIR, FILE, ...]" +- name: Include + description: "Force inclusion of directories and/or files in the conversion. .htaccess is a good example since dotfiles are excluded by default." + option: "include: [DIR, FILE, ...]" +- name: Keep files + description: "When clobbering the site destination, keep the selected files. Useful for files that are not generated by jekyll; e.g. files or assets that are generated by your build tool. The paths are relative to the destination." + option: "keep_files: [DIR, FILE, ...]" +- name: Time Zone + description: "Set the time zone for site generation. This sets the TZ environment variable, which Ruby uses to handle time and date creation and manipulation. Any entry from the IANA Time Zone Database is valid, e.g. America/New_York. A list of all available values can be found here. When serving on a local machine, the default time zone is set by your operating system. But when served on a remote host/server, the default time zone depends on the server's setting or location." + option: "timezone: TIMEZONE" +- name: Encoding + description: "Set the encoding of files by name (only available for Ruby 1.9 or later). The default value is utf-8 starting in 2.0.0, and nil before 2.0.0, which will yield the Ruby default of ASCII-8BIT. Available encodings can be shown by the command ruby -e 'puts Encoding::list.join(\"\\n\")'." + option: "encoding: ENCODING" diff --git a/docs/_docs/configuration/options.md b/docs/_docs/configuration/options.md index ab81ada5..42dfd4bc 100644 --- a/docs/_docs/configuration/options.md +++ b/docs/_docs/configuration/options.md @@ -20,150 +20,25 @@ class="flag">flags (specified on the command-line) that control them. - - -

Site Source

-

Change the directory where Jekyll will read files

- - -

source: DIR

-

-s, --source DIR

- - - - -

Site Destination

-

Change the directory where Jekyll will write files

- - -

destination: DIR

-

-d, --destination DIR

- - - - -

Safe

-

- Disable non-whitelisted plugins, caching to disk, - and ignore symbolic links. -

- - -

safe: BOOL

-

--safe

- - - - -

- Disable Disk Cache - 4.1.0 -

-

- Disable caching of content to disk in order to skip creating a - .jekyll-cache or similar directory at the source - to avoid interference with virtual environments and third-party - directory watchers. - Caching to disk is always disabled in safe mode. -

- - -

disable_disk_cache: BOOL

-

--disable-disk-cache

- - - - -

- Ignore theme configuration - 4.1.0 -

-

- Jekyll 4.0 started allowing themes to bundle a _config.yml - to simplify theme-onboarding for new users. - In the unfortunate situation that importing a bundled theme configuration - messes up the merged site-configuration, the user can configure Jekyll - to not import the theme-config entirely. -

- - -

ignore_theme_config: BOOL

- - - - -

Exclude

-

- Exclude directories and/or files from the - conversion. These exclusions are relative to the site's - source directory and cannot be outside the source directory. -

- - -

exclude: [DIR, FILE, ...]

- - - - -

Include

-

- Force inclusion of directories and/or files in the conversion. - .htaccess is a good example since dotfiles are excluded - by default. -

- - -

include: [DIR, FILE, ...]

- - - - -

Keep files

-

- When clobbering the site destination, keep the selected files. - Useful for files that are not generated by jekyll; e.g. files or - assets that are generated by your build tool. - The paths are relative to the destination. -

- - -

keep_files: [DIR, FILE, ...]

- - - - -

Time Zone

-

- Set the time zone for site generation. This sets the TZ - environment variable, which Ruby uses to handle time and date - creation and manipulation. Any entry from the - IANA Time Zone - Database is valid, e.g. America/New_York. A list of all - available values can be found - here. When serving on a local machine, the default time zone is set by your operating system. But when served on a remote host/server, the default time zone depends on the server's setting or location. -

- - -

timezone: TIMEZONE

- - - - -

Encoding

-

- Set the encoding of files by name (only available for Ruby - 1.9 or later). - The default value is utf-8 starting in 2.0.0, - and nil before 2.0.0, which will yield the Ruby - default of ASCII-8BIT. - Available encodings can be shown by the - command ruby -e 'puts Encoding::list.join("\n")'. -

- - -

encoding: ENCODING

- - + {% for setting in site.data.config_options.global %} + + +

+ {{ setting.name }} + {% if setting.version-badge %} + {{ setting.version-badge }} + {% endif %} +

+

{{ setting.description }}

+ + +

{{ setting.option }}

+ {% if setting.flag %} +

{{ setting.flag }}

+ {% endif %} + + + {% endfor %}

Defaults