A template for Jekyll based static websites with plugins for SEO and Performance.
Read more [here] (https://jekyllrb.com/docs/installation/#requirements/)
Install bundler if not installed
gem install bundler
Run bundler to install the dependencies.
bundler install
Run the development server
jekyll serve
Open http://localhost:4000/ to browse the website
You should familiarise yourself with jekyll and jekyll-assets, but here is a quick cheatsheet:
- _assets
- scripts
- styles
- libs
- _includes
- _layouts
- _pages
- _sites
- _posts
- img
- fonts
YEAR-MONTH-DAY-title.md
. The permalinks can be customized for each
post, but the date and markup language are determined solely by the file name.
Read more here{% include file.ext %}
can be used to include the partial in
_includes/file.ext
.{{ content }}
is used to inject content into the web page.index.md
and about.md
. You can pass dynamic content from here and refer to template through layout.templates/includes
{% include head.html %}
{% css main %}
. .css
extension is not needed.js
extension is not neededtemplates/layout
. You can add templates to wrap your posts here._assets/styles
_assets/css
. As of now, we only have two css files - main.scss
and vendor.scss
{% css main %}
to include a css file within a HTML file. See _includes/head.html
for an example_assets/scripts
_assets/scripts/main.js
using the //= require menu.js
syntaxmain.js
are bundled, minified and versioned automatically{% js main %}
syntax. .js
extension is not needed_assets/libs
_assets/scripts/vendor.js
img
directory/img/someimage.png
, not img/someimage.png
.
Note the leading slash.Never overwrite/update existing images. Images are cached for a year, so they will not be updated. If you want to update an image, create a new one and use it instead.
See https://jekyllrb.com/docs/posts/
We host the website on S3, so you need AWS credentials to deploy. Request Devops for AWS credentials - you will get a key and secret.
Take the key and secret, and store it in a file .env
at the root of your project.
touch .env
Then, edit .env
and add your credentials
AWS_ACCESS_KEY_ID = YOUR-ACCESS-KEY
AWS_SECRET_ACCESS_KEY = YOU-SECRET-ACCESS-KEY
##Note
s3_bucket
value in s3_website.yml
.jekyll build
_site
directorypython -m SimpleHTTPServer
inside the _site
directory, and test it thoroughlyTo Deploy it on S3
./deploy.sh
To simulate a dry run, use the --dry-run flag
./deploy.sh --dry-run
s3_website only uploads changes. To force it to push everything again, use the --force flag
./deploy.sh --force