Your password is mandatory to install Python Pygments.
make install
vagrant up
make server-start
make server-start-fr
make server-start-en
4 main categories are available into two i18n folders (EN/FR)
- Infra (content/infra)
- Dev (content/dev)
- Elao (content/news)
- Tech (content/tech)
You need to create your post inside one of them.
Simply create your markdown file (.md extension) into the choosen category (content/infra, content/dev ... ) And add the front matter skeleton:
---
type: "post"
title: "My title"
date: "2015-01-16"
publishdate: "2015-01-16"
draft: false
slug: "slug-of-my-post"
description: "Description of my post."
thumbnail: "/images/posts/thumbnails/path_to_file"
header_img: "/images/posts/headers/path_to_file"
tags: ["x", "y"]
categories: ["x", "y"]
author_username: "elao"
---
hugo new dev/my-first-post.md
The new file is located at content/dev/my-first-post.md
ALL media files to be stored into static/images
Medias are moved when static files are build in public directory. Be careful to the quality of the media, don't worry about optimization it's handle by the build/optimize tasks.
All media files linked to an article need to be stored into the static directory and more precisely into the static/images/posts (Group by year of publication)
To display a media into a post use Hugo shortcode figure
like the following:
<p class="text-center">
{{< figure src="[locale]/images/posts/2014/proxmox_partition_elao_1000.png" title="Partitionnement personnalisé" alt="Partitionnement-d-un-serveur-proxmox - Partitionnement personnalisé">}}
</p>
Hugo is using Python Pygments
package for code highlighting so you can highlight your code with the dedicated tag like this:
{{< highlight php >}}
{{< /highlight >}}
You need to add a new yaml file into data/authors with the following informations:
en:
display_name: Elao
short_bio: ""
long_bio: ""
job_title": "Agence web experte Symfony"
fr:
display_name: Elao
short_bio: ""
long_bio: ""
job_title: "Agence web experte Symfony"
social:
website: http://www.elao.com
twitter: Elao
github: Elao
email: [email protected]
avatar_url: ~
google_plus_id: "~"
Your post is good to go ? Create a PR and ask for review to a team member once it's done you're ready going to production.
make deploy@prod
You need to be sure to have those tools installed:
- optipng (
brew install optipng
) - imagemagick (
brew link jpeg --overwrite && brew install imagemagick
) - jpegtran
cd /tmp && \
wget http://jpegclub.org/jpegcrop.tar.gz && \
tar xvfz jpegcrop.tar.gz && \
cd /tmp/jpegcrop/jpeg-9b && \
./configure && \
make && \
sudo make install