This site has been created using Jekyll, GitHub and GitHub Pages.
- Jekyll is a simple, blog-aware, static site generator.
- GitHub is a development platform where you can host and review code.
- GitHub Pages is a static site hosting service designed to host your personal, organization, or project pages directly from a GitHub repository.
First install Ruby and RubyGems.
Then you can install Jekyll with the following command:
$ gem install jekyll bundler
Clone GitHub repo:
$ git clone [email protected]:yourusername/yoursitename.git
Change into your new directory:
$ cd yoursitename
Build the site on the preview server:
$ bundle exec jekyll server
Now browse to http://localhost:4000
♻️ Don't forget to reload your browser to apply new changes.
Site settings in the _config.yml
file, are used to personalize your new site.
If you look in the HTML files, you will see them accessed via
{{ site.title }}
, {{ site.email }}
, and so on. You can create any custom
variable you would like, and they will be accessible in the templates via
{{ site.myvariable }}
.
Indicate, for each post and page, its language (lang
) and an unique identifier
(ref
) to link the different translations. Jekyll will do the rest!
To do so, we will use lang
et ref
in the Front Matter of each post and page. For
instance, in Spanish:
---
title: ¡Hola mundo!
lang: es
ref: hola
---
Then, in English:
---
title: Hello world!
lang: en
ref: hola
---
Or, in Catalan:
---
title: Hola món!
lang: ca
ref: hola
---
More info:
Just edit the _config.yml
file to add or modify translations.
Example translation:
t:
es:
cookie_message:
text: "The Mount Data utiliza cookies"
text_link: "política de cookies"
...
ca:
cookie_message:
text: "The Mount Data fa servir galetes"
text_link: "política de galetes"
...
en:
cookie_message:
text: "The Mount Data uses cookies"
text_link: "cookie policy"
...
Then, in the cookie-message.html
file, do this to show up the translated
strings for the proper language:
<p>
{{ site.t[page.lang]cookie_message.text }}
<a href="#">{{ site.t[page.lang]cookie_message.text_link }}</a>
</p>
_config.yml
file is NOT reloaded automatically
when you use $ bundle exec jekyll serve
. If you change this file, please
restart the server process.
Jekyll's simplified build process with GitHub Pages is one of the biggest advantages of using Jekyll. GitHub Pages manages your site's build process with a single push to your site's publishing branch. This is Jekyll's build process for managing your site:
- Push file changes to your pages publishing branch.
- GitHub Pages publishes your site.
Example workflow (assuming master
branch is your pages publishing branch):
- Work in the
develop
branch. - When your work is finished, merge
develop
branch intomaster
. - Push your
master
branch. - GitHub Pages publishes your site to https://yoursitename.com.
More info:
This project has been designed and developed by 🎩 🐧 Mr. Puffin Studio, a communication studio based in Vilassar de Mar, Barcelona.
Nadal Soler @nadalsol Front-end Web Developer |
Miriam Soto @coolcolors Senior UI & Visual Designer / Creative Director |