Skip to content

VladimirAlexiev/highlight-to-reveal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

sparql & turtle highlight.js in reveal.js

Intro

This project adds highlighters for the semantic languages Turtle and SPARQL to highlight.js, and then reveal.js. It assumes the three projects are cloned next to each other.

Links

Steps to Build

  1. git clone https://github.com/ellismarkf/highlight.js/
  2. switch highlight.js to branch feature/language-sparql-ttl
  3. git clone https://github.com/hakimel/reveal.js
  4. read https://github.com/isagalaev/highlight.js/blob/master/docs/building-testing.rst
  5. install node.js from https://nodejs.org/en/download/
  6. install prerequisites
    cd highlight.js 
    npm install
        
  7. OPT: see options of the build tool
    node tools/build.js --help
        
  8. OPT: build semantic languages (2) without compression, so they can be debugged
    node tools/build.js -n sparql ttl pie
        
  9. OPT: check highlighting: open tools/developer.html and try these files:
    • test/detect/sparql/default.txt
    • test/detect/ttl/default.txt
    • test/detect/pie/default.txt
  10. build all required languages (23 core + 2 semantic) with compression
    node tools/build.js :common sparql ttl pie
        
  11. copy highlight.js/build/highlight.pack.js into reveal.js/plugin/highlight/highlight.js using the script ./highlight-to-reveal.sh

How to Use in Your Project

Add sub-modules to your project (.gitmodules)

[submodule "scripts/highlight.js"]
	path = scripts/highlight.js
	url = https://github.com/VladimirAlexiev/highlight.js
	branch = feature/language-sparql-ttl
[submodule "scripts/highlight-to-reveal"]
	path = scripts/highlight-to-reveal
	url = https://github.com/VladimirAlexiev/highlight-to-reveal

If you don’t need to modify reveal, also use it as a sub-module. The version below patches plugin/highlight/highlight.js to add sparql and turtle:

[submodule "scripts/reveal.js"]
	path = scripts/highlight.js
	url = https://github.com/VladimirAlexiev/reveal.js

If you need to modify reveal (eg to add an Ontotext theme), clone this repo and modify it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages