-
Notifications
You must be signed in to change notification settings - Fork 295
Using generate_exclude.rb Script
unknown edited this page Apr 23, 2015
·
10 revisions
Due to the large amount of articles in our documentation, Jekyll builds the site quite slowly.
Normally, using the exclude
property in the _config.yml
file, Jekyll can exclude some of the folders.
exclude: [README.md,Gemfile,Gemfile.lock,deploy.sh,LICENSE,SlugLog.log,UrlMappings-and-conversion-logs/*,temp_exclude_result.tmp,generate_exlude.rb]
Using the generate_exclude.rb
script (located in the ajax-docs repository) you can generate the array for the exclude property.
Important: Running the script will always checkout the changes in the
_config.yml
file. If you have any important changes, you should first create a backup.
Example 1: Generating an exclude array that will build only the general-information
and controls/button
folders.
ruby generate_exclude.rb "general-information" "controls/button"
The command above will:
- checkout the
_config.yml
file; - read the passed arguments (unlimited number of paths can be passed);
- parse the original exclude array from the
_config.yml
file; - find all child folders in the root;
- find all child folders in the
controls
folder; - build the array to be used in the
_config.yml
file; - open notepad with the array as string, letting you to copy it.
Note that you should manually copy the text from notepad and paste/set it as value to the exclude property in the
_config.yml
file. - after closing notepad, temp file will be removed and the script will stop.
The following snapshots illustrate in steps how to use the script:
- Home
- Getting Started
- Deploying Documentation on IIS
- Git and GitHub Workflow
- Handling Redirects (link to the docs-seed wiki)
- Markdown Syntax (link to the docs-seed wiki)
- Markdown Nesting (link to the docs-seed wiki)
- Using Templates (link to the docs-seed wiki)
- Using Git and Git Bash
- Faster Jekyll Build via generate_exclude.rb Script
- Using Helper Tools
- Troubleshooting
- Use VS Diff tool with Git and SourceTree