Open
Description
When Jekyll builds the site, all non-dotfiles are copied to the _site
folder and included on the hosted website.
For example:
It would be better to exclude these from the build. There are two approaches:
- List them in the
exclude
field of the config file. Easy, but have to maintain a list of files to exclude, and "In Jekyll 3, theexclude
configuration option replaces the default exclusion list.", which means the default exclude list also has to be included. Current repo would then have the following exclude list:
exclude:
- .jekyll-cache/
- .sass-cache/
- Dockerfile
- Gemfile
- Gemfile.lock
- README.md
- TRANSLATORS.md
- docker-compose.yml
- gemfiles/
- node_modules/
- package-lock.json
- package.json
- script/
- scripts/
- vendor/
- Create a separate folder for the website files, resulting in the following repo structure:
├── Dockerfile
├── Gemfile
├── Gemfile.lock
├── README.md
├── TRANSLATORS.md
├── docker-compose.yml
├── package-lock.json
├── package.json
├── public
│ ├── CNAME
│ ├── _config.yml
│ ├── _config_local.yml
│ ├── _layouts/
│ ├── assets/
│ ├── css/
│ ├── index.md
│ ├── js/
│ ├── lang/
│ └── spec/
├── script
│ ├── bootstrap
│ ├── cibuild
│ └── server
└── scripts
└── collect.js
This separates the jekyll files from the non-web repo files.
Metadata
Metadata
Assignees
Labels
No labels