Skip to content

Commit

Permalink
Merge pull request #11 from pganssle/custom_css
Browse files Browse the repository at this point in the history
Add support for custom CSS files
  • Loading branch information
dploeger authored Jul 5, 2018
2 parents 0efbb60 + fb4c067 commit 582835b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ You can configure almost any reveal.js setting using the _config.yml-settings fi
* reveal_dependencies: Additional reveal.js [dependencies][]
* reveal_path: Path to the reveal.js-installation [reveal.js]

You can also further customize the presentation:

* extra_css: Additional CSS files added after the reveal theme []

## Custom reveal.js-themes

If you want to use your custom reveal.js-theme, we recommend adding a directory "theme", putting the file(s)
Expand Down
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ reveal_transition: default
# Path to the used theme (defaults to the Reveal.js standard theme path)
reveal_theme_path: reveal.js/css/theme/

# Additional custom CSS paths
extra_css:

# Embed Server-side speaker notes?
reveal_notes_server: false

Expand Down
5 changes: 5 additions & 0 deletions _layouts/reveal.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

<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 %}
{% endif %}

<!-- For syntax highlighting -->
<link rel="stylesheet" href="{{ site.reveal_path }}lib/css/zenburn.css">
Expand Down

0 comments on commit 582835b

Please sign in to comment.