Skip to content

Commit eac2f14

Browse files
committed
Documentation: Add highlight.js to README
- overwork headlines - correct links
1 parent be1a162 commit eac2f14

File tree

1 file changed

+83
-69
lines changed

1 file changed

+83
-69
lines changed

README.md

Lines changed: 83 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
11
# reveal-jekyll
22

3-
Transforms Markdown files into presentation slides using [reveal.js](#revealjs) and [Jekyll](#jekyll). The theme is based on [Solarized Colors](//github.com/altercation/solarized) (by Ethan Schoonover) containing a light and a dark theme.
3+
Transforms Markdown files into presentation slides using [reveal.js](#revealjs) and [Jekyll](#jekyll). The theme is based on [Solarized Colors](https://github.com/altercation/solarized) (by Ethan Schoonover) containing a light and a dark theme.
44
**reveal-jekyll** is ready for [GitHub Pages](https://pages.github.com/) :octocat:.
55

66
[![Build Status](https://travis-ci.org/tasmo/reveal-jekyll.svg?branch=master)](https://travis-ci.org/tasmo/reveal-jekyll)
77

8-
Try the **[DEMO presentation](http://gh.tasmo.de/reveal-jekyll/)** (how to use Jekyll written in German).
8+
Try the **[DEMO presentation](https://gh.tasmo.de/reveal-jekyll/)** (how to use Jekyll written in German).
99

10-
## Howto
10+
## Get reveal-jekyll
1111

12-
### Get reveal-jekyll
12+
### Hosting on Github Pages
1313

14-
#### Hosting on Github Pages
14+
Follow the instructions on [get started with GitHub Pages](https://pages.github.com/).
1515

16-
Follow the instructions on [get started with GitHub Pages](//pages.github.com/).
16+
#### As a User or Organization Site
1717

18-
##### As a User or Organization Site
18+
To set up a user or organization site `https://${yourname}.github.io/`, fork [reveal-jekyll](https://github.com/tasmo/reveal-jekyll) and name your fork with your user or organization name like `${yourname}.github.io`. Your site will build off the master branch.
1919

20-
To set up a user or organization site `https://${yourname}.github.io/`, fork [reveal-jekyll](//github.com/tasmo/reveal-jekyll) and name your fork with your user or organisation name like `${yourname}.github.io`. Your site will build off the master branch.
21-
22-
##### As a Project Site
20+
#### As a Project Site
2321

2422
To set up a [project site](https://help.github.com/articles/user-organization-and-project-pages/#project-pages) `https://${yourname}.github.io/${projectname}`:
2523

2624
- Fork as above, but name your fork with whatever `${projectname}` you want.
2725
- Your site will build from the `gh-pages` branch, so you should [set that as the default branch](https://help.github.com/articles/setting-the-default-branch/).
2826
- In [\_config.yml](./_config.yml) in your `gh-pages` branch, change `baseurl: ""` to `baseurl: /${projectname}`. This is [needed](https://byparker.com/blog/2014/clearing-up-confusion-around-baseurl/) to construct asset include and internal link URLs correctly when you are serving your site from a non-root path.
2927

30-
##### For an Existing Repository
28+
#### For an Existing Repository
3129

3230
- clone your repository
3331
- go into it
34-
- add [reveal-jekyll](//github.com/tasmo/reveal-jekyll) as an upstream remote
32+
- add [reveal-jekyll](https://github.com/tasmo/reveal-jekyll) as an upstream remote
3533
- create an empty branch named `gh-pages`
3634
- delete all cached files of new `gh-pages` branch from git
3735
- clean the directory from uncached files
38-
- merge [reveal-jekyll](//github.com/tasmo/reveal-jekyll)/master with your `${repository}/gh-pages`
36+
- merge [reveal-jekyll](https://github.com/tasmo/reveal-jekyll)/master with your `${repository}/gh-pages`
3937

4038
```shell
4139
git clone git@github.com/${yourname}/${repository}.git
@@ -47,17 +45,17 @@ git clean -fdx
4745
git merge upstream/master
4846
```
4947

50-
#### With Jekyll:
48+
### Local Jekyll
5149

52-
Install [RubyGems](//rubygems.org/pages/download) for your system.
50+
Install [RubyGems](https://rubygems.org/pages/download) for your system.
5351

54-
Clone [reveal-jekyll](//github.com/tasmo/reveal-jekyll) with submodule reveal.js (recommended):
52+
Clone [reveal-jekyll](https://github.com/tasmo/reveal-jekyll) with submodule reveal.js (recommended):
5553

5654
```shell
5755
git clone --recursive --depth 1 https://github.com/tasmo/reveal-jekyll.git
5856
```
5957

60-
…or just download the [zip file](//github.com/tasmo/reveal-jekyll/archive/master.zip).
58+
…or just download the [zip file](https://github.com/tasmo/reveal-jekyll/archive/master.zip).
6159

6260
Make sure you have a `Gemfile` in the root of your project containing at least:
6361

@@ -67,17 +65,19 @@ source "https://rubygems.org"
6765
gem 'github-pages'
6866
```
6967

70-
Install [Bundler](http://bundler.io/) and the dependencies:
68+
Install [Bundler](https://bundler.io/) and the dependencies:
7169

7270
```shell
7371
gem install bundler \
7472
bundle install
7573
```
7674

77-
### Write your slides
75+
---
76+
77+
## Write Your Slides
7878

79-
Put your Markdown slides in the `_posts` folder.
80-
Name the files in order with pattern `YEAR-MONTH-DAY-TITLE.md` like:
79+
Put your Markdown slides in the `_posts` folder [like in any Jekyll](https://jekyllrb.com/docs/posts/) instance.
80+
Name the files in numbered order or dated following a pattern like `YEAR-MONTH-DAY-TITLE.md`:
8181

8282
```text
8383
2014-1-1-start.md
@@ -89,7 +89,7 @@ Name the files in order with pattern `YEAR-MONTH-DAY-TITLE.md` like:
8989
2014-9-9-very-last-slide.md
9090
```
9191

92-
Write the slide's header in [Front-matter](http://jekyllrb.com/docs/frontmatter/) and put the Markdown formatted content below. In the header you need at least the `layout: slide` attribute:
92+
Write the slide's header in [Front-matter](https://jekyllrb.com/docs/frontmatter/) and put the Markdown formatted content below. In the header you need at least the `layout: slide` attribute:
9393

9494
```markdown
9595
---
@@ -100,7 +100,7 @@ title:
100100
MARKDOWN_FOMATTED_SLIDE_CONTENT
101101
```
102102

103-
### Personalize
103+
## Personalize
104104

105105
In the `_config.yml` give your slide show an name, author's name and a description:
106106

@@ -110,7 +110,7 @@ author: Thomas Friese
110110
description: Reveal.js for Jekyll with Solarized Color theme
111111
```
112112
113-
### Start your slide show
113+
## Start Your Slide Show
114114
115115
On GitHub Pages you are done. Just watch `https://YOUR_GITHUB_NAME.github.io/`.
116116

@@ -120,41 +120,41 @@ An your local machine run:
120120
bundle exec jekyll serve
121121
```
122122

123-
…and go to `http://127.0.0.1:4000/`.
123+
…and go to `https://127.0.0.1:4000/`.
124124

125125
---
126126

127-
## [reveal.js](http://lab.hakim.se/reveal-js/)
127+
# [reveal.js](https://lab.hakim.se/reveal-js/)
128128

129129
A framework for easily creating beautiful presentations using HTML.
130130

131-
[reveal.js](//github.com/hakimel/reveal.js) comes with a broad range of features including [nested slides](//github.com/hakimel/reveal.js#markup), [markdown contents](//github.com/hakimel/reveal.js#markdown), [PDF export](//github.com/hakimel/reveal.js#pdf-export), [speaker notes](//github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](//github.com/hakimel/reveal.js#api). It's best viewed in a browser with support for CSS 3D transforms but [fallbacks](//github.com/hakimel/reveal.js/wiki/Browser-Support) are available to make sure your presentation can still be viewed elsewhere.
131+
[reveal.js](https://github.com/hakimel/reveal.js) comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). It's best viewed in a browser with support for CSS 3D transforms but [fallbacks](https://github.com/hakimel/reveal.js/wiki/Browser-Support) are available to make sure your presentation can still be viewed elsewhere.
132132

133-
### Links for reveal.js:
133+
## Links for reveal.js:
134134

135135
- [Installation](#installation): Step-by-step instructions for getting reveal.js running on your computer.
136-
- [Changelog](//github.com/hakimel/reveal.js/releases): Up-to-date version history.
137-
- [Examples](//github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own!
138-
- [Browser Support](//github.com/hakimel/reveal.js/wiki/Browser-Support): Explanation of browser support and fallbacks.
139-
- [Instructions](//github.com/hakimel/reveal.js#instructions) How to use reveal.js.
140-
- [MIT License](//github.com/hakimel/reveal.js/blob/master/LICENSE)
136+
- [Changelog](https://github.com/hakimel/reveal.js/releases): Up-to-date version history.
137+
- [Examples](https://github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own!
138+
- [Browser Support](https://github.com/hakimel/reveal.js/wiki/Browser-Support): Explanation of browser support and fallbacks.
139+
- [Instructions](https://github.com/hakimel/reveal.js#instructions) How to use reveal.js.
140+
- [MIT License](https://github.com/hakimel/reveal.js/blob/master/LICENSE)
141141

142-
## [Jekyll](http://jekyllrb.com/)
142+
# [Jekyll](https://jekyllrb.com/)
143143

144-
[Jekyll](//github.com/jekyll/jekyll) is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories.
144+
[Jekyll](https://github.com/jekyll/jekyll) is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](https://pages.github.com), which you can use to host sites right from your GitHub repositories.
145145

146-
### Links for Jekyll:
146+
## Links for Jekyll:
147147

148-
- [Getting Started](//github.com/jekyll/jekyll#getting-started) If you don't know Jekyll yet.
149-
- [Runtime Dependencies](//github.com/jekyll/jekyll#runtime-dependencies)
150-
- [MIT License](//github.com/jekyll/jekyll/blob/master/LICENSE)
151-
- [Contributors](//github.com/jekyll/jekyll/graphs/contributors)
148+
- [Getting Started](https://github.com/jekyll/jekyll#getting-started) If you don't know Jekyll yet.
149+
- [Runtime Dependencies](https://github.com/jekyll/jekyll#runtime-dependencies)
150+
- [MIT License](https://github.com/jekyll/jekyll/blob/master/LICENSE)
151+
- [Contributors](https://github.com/jekyll/jekyll/graphs/contributors)
152152

153-
## Differences and Limitations
153+
# Differences and Limitations
154154

155-
### Slide attributes
155+
## Slide Attributes
156156

157-
Attributes to the slide `<section>` elements are written in the [Front-matter](http://jekyllrb.com/docs/frontmatter/):
157+
Attributes to the slide `<section>` elements are written in the [Front-matter](https://jekyllrb.com/docs/frontmatter/):
158158

159159
```markdown
160160
---
@@ -167,13 +167,13 @@ data:
167167
---
168168
```
169169

170-
### Fragments
170+
## Fragments
171171

172172
Markdown fragments must be covered in a HTML block element using the attribute `markdown="1"`:
173173

174174
```html
175175
<div markdown="1" class="fragment">
176-
## Markdown Heading
176+
# Markdown Heading
177177
178178
Fragment 1 text
179179
</div>
@@ -184,7 +184,7 @@ Fragment 2 text
184184

185185
Fragments can be nested.
186186

187-
### Vertical slides
187+
## Vertical Slides
188188

189189
For vertical scrolling you need to leave the `title:` blank. All content on vertical slides must be wrapped in HTML `<section>` blocks:
190190

@@ -195,24 +195,24 @@ title:
195195
---
196196
197197
<section markdown="1">
198-
## Top Slide
198+
# Top Slide
199199
</section>
200200
<section markdown="1">
201-
## Bottom Slide
201+
# Bottom Slide
202202
</section>
203203
```
204204

205-
### Configuration
205+
## Configuration
206206

207207
All options for the reveal.js presentation are available in the `_config.yml` as sub keys of `reveal:`.
208208

209209
The configuration will be built in the `<script />` block at the bottom of the `index.html` presentation file.
210210

211-
### Code syntax highlighting
211+
## Code Syntax Highlighting
212212

213-
reveal-jekyll uses [kramdown](//github.com/gettalong/kramdown) for Markdown rendering and [rouge](//github.com/jneen/rouge) for syntax highlighting. Below is an example with CoffeeScript code that will be syntax highlighted:
213+
reveal-jekyll uses [Kramdown](https://github.com/gettalong/kramdown) for Markdown rendering and [Rouge]([//github.com/jneen/rouge](https://github.com/rouge-ruby/rouge)) for syntax highlighting. To insert a highlighted code block surround the code with the [Liquid](https://shopify.github.io/liquid/) tag `highlight`:
214214

215-
```coffee
215+
```liquid
216216
{% highlight coffee %}
217217
# Objects:
218218
math =
@@ -222,7 +222,19 @@ math =
222222
{% endhighlight %}
223223
```
224224

225-
### Slide numbers
225+
To use the [Reveal.js's preferred method](https://revealjs.com/code/) via [highlight.js](https://highlightjs.org/) it is possible to surround the code with HTML nodes `pre` and `code` using the class `language-*` adding optional `data` tags:
226+
227+
```html
228+
<pre><code class="language-coffee" data-trim data-noescape data-line-numbers="1|3-5">
229+
# Objects:
230+
math =
231+
root: Math.sqrt
232+
square: square
233+
cube: (x) -> x * square x
234+
</code></pre>
235+
```
236+
237+
## Slide Numbers
226238

227239
You can show slide numbers by selecting a format in the `_config.yml` file:
228240

@@ -237,7 +249,7 @@ slideNumber:
237249
format: "c/t"
238250
```
239251

240-
### Speaker notes
252+
## Speaker Notes
241253

242254
reveal.js comes with a speaker notes plug-in which can be used to present per-slide notes in a separate browser window. The notes window also gives you a preview of the next upcoming slide so it may be helpful even if you haven't written any notes. Press the 's' key on your keyboard to open the notes window.
243255

@@ -255,13 +267,13 @@ Oh hey, these are some notes. They'll be hidden in your presentation, but you ca
255267
</aside>
256268
```
257269

258-
When used locally, this feature requires that reveal.js [runs from a local web server](//github.com/hakimel/reveal.js#full-setup).
270+
When used locally, this feature requires that reveal.js [runs from a local web server](https://github.com/hakimel/reveal.js#full-setup).
259271

260272
---
261273

262-
## Runtime dependencies for development
274+
# Runtime Dependencies for Development
263275

264-
### Running Jekyll on your server:
276+
## Running Jekyll on Your Server:
265277

266278
- Commander: Command-line interface constructor (Ruby)
267279
- Colorator: Colorizes command line output (Ruby)
@@ -274,7 +286,7 @@ When used locally, this feature requires that reveal.js [runs from a local web s
274286
- Sass: CSS extension language (Ruby)
275287
- CoffeeScript: compiling to JavaScript (Ruby)
276288

277-
### Running reveal.js:
289+
## Running reveal.js:
278290

279291
Reveal.js doesn't _rely_ on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example:
280292

@@ -305,18 +317,20 @@ You can add your own extensions using the same syntax. The following properties
305317
- **callback**: [optional] Function to execute when the script has loaded
306318
- **condition**: [optional] Function which must return true for the script to be loaded
307319

308-
## Licenses
320+
---
321+
322+
# Licenses
309323

310-
[Jekyll](//github.com/jekyll/jekyll): [MIT licensed](//github.com/jekyll/jekyll/blob/master/LICENSE)
324+
[Jekyll](https://github.com/jekyll/jekyll): [MIT licensed](https://github.com/jekyll/jekyll/blob/master/LICENSE)
311325

312-
[reveal.js](//github.com/hakimel/reveal.js): [MIT licensed](//github.com/hakimel/reveal.js/blob/master/LICENSE)
313-
Copyright (C) 2016 Hakim El Hattab, http://hakim.se
326+
[reveal.js](https://github.com/hakimel/reveal.js): [MIT licensed](https://github.com/hakimel/reveal.js/blob/master/LICENSE)
327+
Copyright (C) 2020 Hakim El Hattab, https://hakim.se
314328

315-
[reveal-jekyll](//github.com/tasmo/reveal-jekyll) contains the third party fonts
316-
- [Open Sans](https://www.google.com/fonts/specimen/Open+Sans) ([Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)),
317-
- [Droid Serif](https://www.google.com/fonts/specimen/Droid+Serif) ([Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)),
318-
- [Font Awesome](//github.com/FortAwesome/Font-Awesome) ([License: SIL OFL 1.1](http://fontawesome.io/license/))
319-
and the color scheme [Solarized Colors](//github.com/altercation/solarized) ([MIT License](//github.com/altercation/solarized/blob/master/LICENSE)).
329+
[reveal-jekyll](https://github.com/tasmo/reveal-jekyll) contains the third party fonts
330+
- [Open Sans](https://www.google.com/fonts/specimen/Open+Sans) ([Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)),
331+
- [Droid Serif](https://www.google.com/fonts/specimen/Droid+Serif) ([Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)),
332+
- [Font Awesome](https://github.com/FortAwesome/Font-Awesome) ([License: SIL OFL 1.1](https://fontawesome.io/license/))
333+
and the color scheme [Solarized Colors](https://github.com/altercation/solarized) ([MIT License](https://github.com/altercation/solarized/blob/master/LICENSE)).
320334

321-
[reveal-jekyll](//github.com/tasmo/reveal-jekyll): [MIT licensed](//github.com/tasmo/reveal-jekyll/blob/master/LICENSE)
322-
Copyright (C) 2016 Thomas Friese, http://tasmo.rocks
335+
[reveal-jekyll](https://github.com/tasmo/reveal-jekyll): [MIT licensed](https://github.com/tasmo/reveal-jekyll/blob/master/LICENSE)
336+
Copyright (C) 2021 Thomas Friese, https://tasmo.rocks

0 commit comments

Comments
 (0)