How to Install Reveal.js on Ubuntu 20.04

Reveal.js is a free and open source HTML framework that allows users to create free, full-featured and engaging presentations using a web browser. Users can use web technologies in their presentations using the Reveal.js framework. This tool helps to add many CSS styles, add external websites, including and custom user behavior using various JavaScript APIs.

In this article, Quantrimang.com and readers review how to install the Reveal.js HTML framework on Ubuntu 20.04 LTS systems.

Prerequisites

To install required packages or dependencies, use sudo access or login as root user on Ubuntu system.

Steps to Install Reveal.js on Ubuntu 20.04

By following the steps below, the Reveal.js framework can be easily installed on Ubuntu 20.04 LTS system.

Step 1: Install required dependencies

Some packages are required to be installed on the Ubuntu system, before starting to install Reveal.js. The node.js package is a prerequisite for installing Reveal.js. The node.js package is not included in the Ubuntu 20.04 default repositories. Therefore, you need to include the updated node.js repository in your Ubuntu system. So launch a command line window by pressing the shortcut key combination Ctrl + Alt +. Now, by executing the below command, install the required packages:

$ sudo apt install curl gnupg2 unzip git
Install required packages
Install required packages

Next, include the Node.js repository in the Ubuntu 20.04 system by typing the following command:

$ curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
Include Node.js repository in Ubuntu 20.04 system
Include Node.js repository in Ubuntu 20.04 system

Once the node.js repository is included, enter the following command to install node.js on an Ubuntu 20.04 system:

$ sudo apt install nodejs
Install node.js on Ubuntu 20.04 system
Install node.js on Ubuntu 20.04 system

After installing the node.js package, check the installed node.js version by executing the following command:

$ node -v

Step 2: Download and Install Reveal.js on Ubuntu 20.04

Download Reveal.js from the Github repository. Clone the Reveal.js repository with git.

$ git clone https://github.com/hakimel/reveal.js.git
Clone Reveal.js repository with git
Clone Reveal.js repository with git

Navigate to the Reveal.js folder created during cloning and now install the necessary packages.

$ cd reveal.js
$ sudo npm install

After installing all the dependencies for Reveal.js, start the application by running the command mentioned below:

$ npm start

After running the above command, the following output will be displayed in the Terminal window:

See more:  How to change hostname in Linux
Results displayed on the Terminal window
Results displayed on the Terminal window

The above output shows that service reveal is running at the default port 8000. This port number can change during application startup.

$ npm start -- --port=8002

Now, create a service systemd unit to manage service reveal. So, create and open the file with any of the available text editors like this:

$ sudo nano /lib/systemd/system/reveal.service

Paste the following lines into this file:

[Service]
Type=simple
User=root
Restart=on-failure
WorkingDirectory=/home/khuzdar/reveal.js
ExecStart=npm start

Change the working directory path based on your system requirements. Here, the path of the given directory is WrokingDirectory=/home/kbuzdar/reveal.js. Close the file above after saving the changes.

Now, run the command mentioned below to reload, start and activate the service reveal:

$ sudo systemctl daemon-reload
$ sudo systemctl start reveal
$ sudo systemctl enable reveal

Type the following command to see the current running status of service reveal:

$ sudo systemctl status reveal
The current running state of the service reveal
The current running state of the service reveal

Step 3: Access the web interface of Reveal.js

Service Reveal.js is running on this system. Now, launch the web interface of frameworkwrok Reveal.js. Open the Mozilla Firefox web browser or any other browser on the system. Enter the URL given below along with the server IP address in the address bar:

http://your-server-ip-address:8000

The following default Reveal.js web interface displays in the browser indicating that the Reveal.js installation is now complete.

Access Reveal.js . web interface
Access Reveal.js . web interface

Source link: How to Install Reveal.js on Ubuntu 20.04
– https://techtipsnreview.com/

, ,

Leave a Reply

Your email address will not be published. Required fields are marked *