more flexible header configuration

This commit is contained in:
Gaspard Jankowiak 2013-03-08 13:14:26 +01:00
parent 34fa3d58f2
commit 4a7b83ae3b
4 changed files with 34 additions and 5 deletions

View file

@ -9,3 +9,8 @@ safe: true
pygments: true
style: light
title: 'Gaspard Jankowiak · Ceremade · Université Paris Dauphine'
header-title: 'Page personnelle de Gaspard Jankowiak'
header-subtitle: 'Thésard au Ceremade — Université Paris Dauphine'
header-homelink: '/'

View file

@ -2,7 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<title>{{ page:title }}</title>
<title>
{% if page:title %}
{{ page:title }}
{% else %}
{{ site:title }}
{% endif %}
</title>
<link rel="icon" href="/images/favicon.png">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/x-mathjax-config">
@ -32,8 +38,25 @@
<section>
<div id="title">
<h1><a href="/">Page personnelle de Gaspard Jankowiak</a></h1>
<p>Thésard au Ceremade — Université Paris-Dauphine</p>
{% if page:header-homelink %}
{% assign homelink = page:header-homelink %}
{% else %}
{% assign homelink = site:header-homelink %}
{% endif %}
<h1><a href="{{ homelink }}">
{% if page:header-title %}
{{ page:header-title }}
{% else %}
{{ site:header-title }}
{% endif %}
</a></h1>
<p>
{% if page:header-subtitle %}
{{ page:header-subtitle }}
{% else %}
{{ site:header-subtitle }}
{% endif %}
</p>
<hr>
</div>

View file

@ -1,6 +1,8 @@
---
title: Gaspard Jankowiak · Ceremade · Université Paris Dauphine
layout: default
header-title: Gaspard Jankowiak's homepage
header-subtitle: PhD student at Ceremade &mdash; Université Paris Dauphine
header-homelink: /en
---
[FR](/)\|EN

View file

@ -1,5 +1,4 @@
---
title: Gaspard Jankowiak · Ceremade · Université Paris Dauphine
layout: default
---