#READ ME
-
Fork the repository locally.
-
Install Jekyll.
The Coveo Docs Site is generated with Jekyll, so you must install Jekyll and its requirements such as Ruby. Tom Johnson's installation procedure work:
-
Intall html-proofer to allow testing external links in the content:
gem install html-proofer
-
Install s3_website to be able to push to AWS S3:
gem install s3_website
Build the site locally to validate your changes:
-
In the terminal:
-
Go to the repository root folder.
-
Run
bundle exec jekyll serve --incremental
Tip: You can also use the defined Visual Studio Code task
Jekyll - Build Prod incremental
:- In Visual Studio Code, open the Command Palette (
shift
+cmd
+ 'P'). - In the Command Palette, type
tasks
and then select Tasks: Run tasks. - In the drop-down list, select Jekyll - Build Prod incremental.
- In the drop-down list, select Never scan the task output. A TERMINAL window opens and the command to build the Jekyll site locally starts.
Alternate commangs:
- If you want sitemap.xml links to contain the production hostname (not localhost:4000), run:
JEKYLL_ENV=production bundle exec jekyll serve --incremental
The default value is
JEKYLL_ENV=development
(see Specifying a Jekyll environment at build timePermalink).- If
baseurl
was not empty in_config.yml
and you want to the local site to start from the root, run:
bundle exec jekyll serve --baseurl '' --incremental
- In Visual Studio Code, open the Command Palette (
-
-
In a browser, go to
http://localhost:4000/
to view the site. -
Make your changes to the site.
-
Validate your changes in the local site.
-
In the terminal, run the HTML-Proofer to validate links, images, scripts and more are working .
htmlproofer --assume-extension --allow-hash-href --alt-ignore --check-external-hash ./_site
Options:
--assume-extension
adds.html
extensions to extensionless paths--allow-hash-href
ignores the<a href="#" ..>
occurrences--alt-ignore
safely ignore image missingalt
attributes--check-external-hash
check bookmarks in external links (can slow down the check)
-
In the terminal, run the s3_website command to push changes to the S3
coveo-products-docs
bucket:s3_website push
-
Make a pull request to propose your changes.