Welcome to the official content repository for Linaro Connect's static Jekyll based website. Hosted in this repo are the markdown content files associated with the website. Feel free to submit a PR / Issue if there is anything you would like to change.
PR's related to the Dockerfile and build.sh will take considerably longer to review than Jekyll or content changes.
Below are a few guides that will help when adding content to the Linaro website.
In order to add a blog post to the Connect website copy an existing blog post from the _posts/blog/ folder. Posts on the Connect website are either typical blog posts (/blog/your-title/) or resource posts from a Linaro Connect event (/resources/yvr18/yvr18-100k1/).
The url for your title is based on the title provided in the filename e.g 2018-06-07-yvr18-wrap-up.md will have a url of /blog/yvr18-wrap-up/. Separate the words in your title by dashes and modify the date at the start of the filename as neccessary.
Modify the post front matter based on your post. Values to modify are:
- author:
- date:
- image:
- tags:
- description:
Change the author to a unique author shortname. If this is your first time posting then add your author values to the _data/authors.yml file. Make sure to add your profile image to the /assets/images/authors folder. Verify that the author name is an exact match to that provided as the author: in your post.
Modify the date to sometime before you post the blog otherwise Jekyll will see it as a future post and not render it until the time on the server exceeds/equals that provided as the date in the post front matter.
This value is used for the featured image displayed on your blog post and the image that is used when sharing the blog post on social media sites.
image:
featured: true
path: /assets/images/blog/yvr18-wrap-up.png
name: yvr18-wrap-up.png
thumb: yvr18-wrap-up.png
Make sure that the image you add in this section of front matter is placed in the /assets/images/blog folder.
These should be modified based on the content of your post as they are used for Meta keywords so that people can find your post based on the tags your provide.
Change this value to a short description of your blog post as this is used for the meta description of your blog post.
Write your post content in Markdown format; specifically the Kramdown Markdown flavour.
Please use the following code snipppet to add an image to your blog post. Make sure to add the images that you include to /assets/images/blog folder.
{% include image.html name="name-of-your-image.png" alt="The Alt text for your image" %}
You also align/scale your image using the following css classes.
Class | Details |
---|---|
small-inline | Small image aligned to the left |
small-inline right | Small image aligned to the right |
medium-inline | Medium image aligned to the left |
medium-inline right | Medium image aligned to the right |
large-inline | Large image aligned to the left |
large-inline right | Large image aligned to the right |
{% include image.html name="name-of-your-image.png" class="medium-inline" alt="The Alt text for your image" %}
Using this Jekyll include will allow your images to be lazy loaded and format the image HTML correctly.
We are using the rouge syntax highlighter to highlight your glorious code.
$ bundle exec jekyll serve --port 1337
See the full list of languages here.
To add a media element / YouTube video use the following Jekyll include.
{% include media.html media_url="https://youtu.be/GFzJd0hXI0c" %}
- Linux or *NIX-like OS: tested under Arch Linux and Ubuntu Linux 17.10 on x86_64, Dell XPS 15 (9560).
- Bash or ZSH.
- Docker Community Edition (and probably therefore Docker Enterprise Edition).
- >= 2GiB of free RAM.
- >= 2GiB free disk space.
This should build and run under Docker on Windows (10?) with Microsoft Hyper-V: documentation should be added here.
May work under Docker on FreeBSD, Mac OS, etc (totally untested).
When working on the Dockerfile, it may be useful to tag the image with a date-time stamp. For example:
docker build
...snip... -t "linaro/connect:$(date --iso-8601)"
would result in a TAG
value like linaro/connect:2017-07-31
.
Use the build script for convenience, or adapt the docker run
commands correspondingly. The build script will echo all commands run, including the results of variable expansions, etc, so you should easily be able to copy and paste the parts you want for debugging.
A modified build script is used for deployment onto AWS and is not currently publically available.
This build script should probably be replaced by a make file.
Run ./build.sh
in a Bash or ZSH shell.
Browse to http://127.0.0.1:4000/ to view the website.
git clone
this repojekyll build
andjekyll serve
the site so you can review your changes.- Commit messages must be succint: Pull Requests (PR's) must state the purpose of your changes.
Markdown files, SASS files, etc. must pass basic lint checks before your PR will be accepted. Please check them before submitting to save you and us time.
Links must be checked before submitting.