Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #18 by reading description and author from the site configuration #27

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ Jekyll will assume that each post has been made on the first of January, 2001 (w

You can configure almost any reveal.js setting using the `_config.yml` settings file in the root directory.

- `title`: The title of your presentation (displayed in the browser's title bar)
- `title`: The title of your presentation (displayed in the browser's title bar, optional and defaults to your repository’s name thanks to the `jekyll-github-metadata` plugin)
- `description`: A description for your presentation (displayed in the HTML head, optional and defaults to your repository’s description thanks to the `jekyll-github-metadata` plugin)
- `author`: Your name (displayed in the HTML head)
- `reveal_theme`: The reveal.js-theme to use [default.css]
- `reveal_transition`: The reveal.js-transition to use [default]
- `reveal_theme_path`: The path to the reveal.js-theme (can be changed for custom themes) [reveal.js/css/theme/]
Expand Down
7 changes: 6 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Your presentation title
title: Jekyll and Reveal.js

# Your presentation description (optional)
description: A framework for easily creating beautiful presentations using HTML

# Your name (optional)
author: jekyll-revealjs contributors

# The Reveal theme
reveal_theme: black.css
Expand Down
68 changes: 34 additions & 34 deletions _layouts/reveal.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@
<head>
<meta charset="utf-8">

<title>{{ site.title }}</title>
{% if site.title %}<title>{{ site.title }}</title>{% endif %}

<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
<meta name="apple-mobile-web-app-capable" content="yes" />
{% if site.description %}<meta name="description" content="{{ site.description }}">{% endif %}
{% if site.author %}<meta name="author" content="{{ site.author }}">{% endif %}
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<link rel="stylesheet" href="{{ site.reveal_path }}css/reveal.css">
<link rel="stylesheet" href="{{ site.reveal_theme_path }}{{ site.reveal_theme }}" id="theme">
{% if site.extra_css %}
{% for css_file in site.extra_css %}
<link rel="stylesheet" href="{{ css_file }}">
{% endfor %}
{% for css_file in site.extra_css %}
<link rel="stylesheet" href="{{ css_file }}">
{% endfor %}
{% endif %}

<!-- For syntax highlighting -->
{% if site.highlight_style_sheet %}
{% assign highlight_style_sheet = site.highlight_style_sheet %}
{% else %}
{% capture highlight_style_sheet %}{{ site.reveal_path }}lib/css/zenburn.css {% endcapture %}
{% endif %}
<link rel="stylesheet" href="{{ highlight_style_sheet }}">
{% if site.highlight_style_sheet %}
{% assign highlight_style_sheet = site.highlight_style_sheet %}
{% else %}
{% capture highlight_style_sheet %}{{ site.reveal_path }}lib/css/zenburn.css {% endcapture %}
{% endif %}
<link rel="stylesheet" href="{{ highlight_style_sheet }}">

<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
Expand All @@ -43,7 +43,7 @@

<div class="reveal">

<div class="slides">
<div class="slides">

{% for post in site.posts reversed %}
<section data-markdown data-separator="^\n---\n$" data-separator-vertical="^\n--\n$" data-notes="^Note:">
Expand All @@ -53,7 +53,7 @@
</section>
{% endfor %}

</div>
</div>

</div>

Expand All @@ -73,17 +73,17 @@
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: '{{ site.reveal_transition }}', // default/cube/page/concave/zoom/linear/fade/none

{% if site.reveal_options %}
{% if site.reveal_options.first.first %}
// Reveal options generated from mapping
{% for option in site.reveal_options %}
{{ option[0] }}: "{{ option[1] }}",
{% endfor %}
{% else %}
// Reveal options generated from a list of strings
{{ site.reveal_options | append:',' }}
{% endif %}
{% endif %}
{% if site.reveal_options %}
{% if site.reveal_options.first.first %}
// Reveal options generated from mapping
{% for option in site.reveal_options %}
{{ option[0] }}: "{{ option[1] }}",
{% endfor %}
{% else %}
// Reveal options generated from a list of strings
{{ site.reveal_options | append:',' }}
{% endif %}
{% endif %}

// Optional libraries used to extend on reveal.js
dependencies: [
Expand All @@ -92,15 +92,15 @@
{ src: '{{ site.reveal_path }}plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ site.reveal_path }}plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '{{ site.reveal_path }}plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{% if site.reveal_notes_server %}
{ src: '{{ site.reveal_path }}socket.io/socket.io.js', async: true },
{ src: '{{ site.reveal_path }}plugin/notes-server/client.js', async: true }
{% else %}
{% if site.reveal_notes_server %}
{ src: '{{ site.reveal_path }}socket.io/socket.io.js', async: true },
{ src: '{{ site.reveal_path }}plugin/notes-server/client.js', async: true }
{% else %}
{ src: '{{ site.reveal_path }}plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
{% endif %}
{% if site.reveal_dependencies %}
, {{ site.reveal_dependencies }}
{% endif %}
{% endif %}
{% if site.reveal_dependencies %}
, {{ site.reveal_dependencies }}
{% endif %}
]
});

Expand Down