Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

Complete Marp installation + command + examples guide

Marp is a Markdown presentation ecosystem. Marp CLI converts Marp/Marpit Markdown files into static HTML/CSS, PDF, PowerPoint/PPTX, and images. The official CLI docs also say Node.js v18+ is required for the Node-based CLI, and PDF/PPTX/image conversion requires a browser such as Chrome, Edge, or Firefox. (GitHub)


1. What Marp is best for

Marp is best when you want:

Markdown โ†’ HTML
Markdown โ†’ PDF
Markdown โ†’ PPTX
Markdown โ†’ PNG/JPEG images

For you, Marp is excellent for:

quick training decks
client PPTX/PDF
simple course slides
fast Markdown-based slide generation
Git-based slide maintenance

But remember:

Marp HTML is Marp HTML, not reveal.js HTML.
For reveal.js, use Quarto.
For quick PPTX/PDF, Marp is very strong.
Code language: PHP (php)

2. Your current file

You already have this file:

cd ~/slides
ls
Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md
Introduction_to_Red_Hat_OpenShift_DevOpsSchool.qmd
Code language: CSS (css)

For Marp, we will use:

Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md
Code language: CSS (css)

3. Install Marp on macOS

Option A: Use Homebrew

This is the cleanest option on macOS:

brew install marp-cli

Check:

marp --version
which marp

The official Marp CLI README lists Homebrew as a macOS/Linux package-manager install option, though it notes package manifests are community-maintained. (GitHub)


Option B: Use Node.js and npm

Install Node.js:

brew install node

Check:

node --version
npm --version

Install Marp CLI globally:

npm install -g @marp-team/marp-cli
Code language: CSS (css)

Check:

marp --version

If marp command does not work, use:

npx @marp-team/marp-cli --version
Code language: CSS (css)

The official docs list both local installation using npm install --save-dev @marp-team/marp-cli and global installation using npm install -g @marp-team/marp-cli. (GitHub)


Option C: Use npx without global install

This is the easiest when PATH is causing issues:

npx @marp-team/marp-cli@latest --version
Code language: CSS (css)

Convert HTML:

npx @marp-team/marp-cli@latest slide-deck.md
Code language: CSS (css)

Convert PDF:

npx @marp-team/marp-cli@latest slide-deck.md --pdf
Code language: CSS (css)

Convert PPTX:

npx @marp-team/marp-cli@latest slide-deck.md --pptx
Code language: CSS (css)

The official docs call npx a good way to run latest Marp CLI for one-shot conversion without installing the command globally. (GitHub)


4. Install Marp on Windows

Option A: Node.js + npm

Install Node.js LTS from the official Node.js site.

Then open PowerShell:

node --version
npm --version
npm install -g @marp-team/marp-cli
marp --version
Code language: CSS (css)

If command is not found:

npx @marp-team/marp-cli --version
Code language: CSS (css)

Option B: Scoop

The official Marp CLI README lists Scoop as the Windows package-manager install option:

scoop install marp

Then:

marp --version

(GitHub)


Option C: VS Code extension

Install Marp for VS Code.

In VS Code:

Extensions โ†’ Search โ€œMarp for VS Codeโ€ โ†’ Install

The VS Code extension integrates Marp CLI export and supports exporting active Markdown to HTML, PDF, PPTX, PNG, JPEG, and TXT notes. It also requires a browser for PDF/PPTX/image export. (Visual Studio Marketplace)


5. Install Marp on Linux

Option A: Node.js + npm

node --version
npm --version
npm install -g @marp-team/marp-cli
marp --version
Code language: CSS (css)

If Node.js is old, install Node.js v18+ first.


Option B: Homebrew on Linux

brew install marp-cli
marp --version

Option C: Docker

Marp provides an official container image. The official README lists Docker images from Docker Hub and GitHub Container Registry. (GitHub)

Pull:

docker pull marpteam/marp-cli

or:

docker pull ghcr.io/marp-team/marp-cli

Example usage:

docker run --rm -v "$PWD:/home/marp/app" marpteam/marp-cli slide-deck.md
Code language: JavaScript (javascript)

PDF:

docker run --rm -v "$PWD:/home/marp/app" marpteam/marp-cli slide-deck.md --pdf
Code language: JavaScript (javascript)

PPTX:

docker run --rm -v "$PWD:/home/marp/app" marpteam/marp-cli slide-deck.md --pptx
Code language: JavaScript (javascript)

Note: --preview is not available through the official Docker image. (GitHub)


6. Verify Marp installation

Run:

marp --version

Expected style:

@marp-team/marp-cli v4.x.x (w/ @marp-team/marp-core v4.x.x)
Code language: CSS (css)

The official CLI docs show marp --version as the way to confirm the CLI and engine version. (GitHub)

If that fails:

npx @marp-team/marp-cli --version
Code language: CSS (css)

7. Fix: zsh: command not found: marp

You saw this issue earlier:

marp --version
zsh: command not found: marp

But this worked:

npx @marp-team/marp-cli --version
Code language: CSS (css)

That means Marp is installed, but the global npm binary path is not in your PATH.

Step 1: Check npm global prefix

npm config get prefix
Code language: JavaScript (javascript)

Example:

/opt/homebrew/Cellar/node/26.3.1

Step 2: Check Marp binary

ls -l "$(npm config get prefix)/bin/marp"
Code language: JavaScript (javascript)

Step 3: Add npm global bin path to zsh

echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
rehash
marp --version
Code language: PHP (php)

Step 4: If still not working, add exact path

Based on your earlier output:

echo 'export PATH="/opt/homebrew/Cellar/node/26.3.1/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
rehash
marp --version
Code language: PHP (php)

Step 5: Stronger symlink fix

ln -sf /opt/homebrew/Cellar/node/26.3.1/bin/marp /opt/homebrew/bin/marp
rehash
which marp
marp --version

For daily work, this is always safe:

npx @marp-team/marp-cli --version
Code language: CSS (css)

8. Create your first Marp slide deck

Create folder:

mkdir -p ~/slides/marp-test/images
cd ~/slides/marp-test
Code language: JavaScript (javascript)

Create file:

cat > openshift-intro.marp.md <<'EOF'
---
marp: true
theme: default
paginate: true
footer: "DevOpsSchool"
---

# Introduction to Red Hat OpenShift

## DevOpsSchool Training

---

# What is OpenShift?

Red Hat OpenShift is an enterprise Kubernetes platform.

It helps teams build, deploy, run, and manage containerized applications.

---

# Why OpenShift?

- Enterprise Kubernetes
- Built-in security
- Developer experience
- Integrated CI/CD
- Operators
- Monitoring

---

# Example Commands

```bash
oc login
oc get projects
oc get pods -A
oc get routes -A
Code language: PHP (php)

Summary

  • OpenShift is built on Kubernetes
  • It adds enterprise features
  • It improves developer and operations workflow
    EOF

Preview:

```bash
npx @marp-team/marp-cli --preview openshift-intro.marp.md
Code language: JavaScript (javascript)

Generate HTML:

npx @marp-team/marp-cli openshift-intro.marp.md -o openshift-intro.html
Code language: CSS (css)

Generate PDF:

npx @marp-team/marp-cli openshift-intro.marp.md --pdf
Code language: CSS (css)

Generate PPTX:

npx @marp-team/marp-cli openshift-intro.marp.md --pptx
Code language: CSS (css)

Marpit splits slide pages using a horizontal ruler like ---, and Marpit Markdown supports directives, image syntax, and fragmented lists. (GitHub)


9. Marp file anatomy

A typical Marp file has:

front matter
slides separated by ---
Markdown content
directives
images
code blocks
notes

Example:

---
marp: true
theme: default
paginate: true
header: "OpenShift Training"
footer: "DevOpsSchool"
---

# Slide 1

Content

---

# Slide 2

Content
Code language: PHP (php)

10. Required front matter

Minimum:

---
marp: true
---

# My Slide
Code language: PHP (php)

Better educator/trainer setup:

---
marp: true
theme: default
paginate: true
header: "Red Hat OpenShift"
footer: "DevOpsSchool"
---

# Introduction to Red Hat OpenShift
Code language: PHP (php)

Marpit directives can control theme, page numbers, header, footer, style, and other slide-deck behavior. (marpit.marp.app)


11. Built-in themes

Common built-in themes:

default
gaia
uncover
Code language: JavaScript (javascript)

Use in front matter:

---
marp: true
theme: gaia
paginate: true
---
Code language: JavaScript (javascript)

Override theme from CLI:

marp slide-deck.md --theme gaia
Code language: CSS (css)

Marp CLI supports overriding the theme by CLI option and using custom CSS themes. (GitHub)


12. Convert to HTML

Default Marp output is HTML:

marp slide-deck.md
Code language: CSS (css)

Specific output file:

marp slide-deck.md -o output.html
Code language: CSS (css)

Using npx:

npx @marp-team/marp-cli slide-deck.md -o output.html
Code language: CSS (css)

Marp CLI converts a passed Markdown file to HTML by default, and --output / -o changes the output path. (GitHub)


13. Convert to PDF

marp slide-deck.md --pdf
Code language: CSS (css)

or:

marp slide-deck.md -o output.pdf
Code language: CSS (css)

With local images:

marp slide-deck.md --pdf --allow-local-files
Code language: CSS (css)

With PDF notes:

marp slide-deck.md --pdf --pdf-notes
Code language: CSS (css)

With PDF outlines/bookmarks:

marp slide-deck.md --pdf --pdf-outlines
Code language: CSS (css)

PDF conversion is triggered by --pdf or an output filename ending in .pdf; Marp CLI also supports --pdf-notes and --pdf-outlines. (GitHub)


14. Convert to PowerPoint PPTX

marp slide-deck.md --pptx
Code language: CSS (css)

or:

marp slide-deck.md -o output.pptx
Code language: CSS (css)

With local images:

marp slide-deck.md --pptx --allow-local-files
Code language: CSS (css)

Marp CLI supports PPTX conversion by --pptx or output path ending in .pptx; the created PPTX includes rendered Marp slide pages and supports presenter notes. (GitHub)


15. Editable PPTX option

Regular Marp PPTX is usually rendered as slide pages, so it may not be easily editable like native PowerPoint text boxes.

Experimental editable PPTX:

marp slide-deck.md --pptx --pptx-editable
Code language: CSS (css)

With output name:

marp slide-deck.md --pptx --pptx-editable -o editable-output.pptx
Code language: CSS (css)

Important: the official docs mark --pptx-editable as experimental, require both a browser and LibreOffice Impress, warn that complex styles may break, and say reproducibility is lower than regular PPTX. (GitHub)

Install LibreOffice on macOS:

brew install --cask libreoffice

Then:

marp slide-deck.md --pptx --pptx-editable
Code language: CSS (css)

My advice:

Use normal --pptx for best visual accuracy.
Use --pptx-editable only when client must edit text/shapes.
Code language: PHP (php)

16. Convert to images

Convert all slides to PNG

marp slide-deck.md --images png
Code language: CSS (css)

Convert all slides to JPEG

marp slide-deck.md --images jpeg
Code language: CSS (css)

Convert only title slide to PNG

marp slide-deck.md --image png
Code language: CSS (css)

or:

marp slide-deck.md -o title-slide.png
Code language: CSS (css)

High-resolution image

marp slide-deck.md -o title-slide@2x.png --image-scale 2
Code language: CSS (css)

Marp CLI supports --images png|jpeg for multiple images, --image png|jpeg for only the first slide, and --image-scale for higher-resolution output. (GitHub)


17. Export presenter notes

marp slide-deck.md --notes
Code language: CSS (css)

or:

marp slide-deck.md -o notes.txt
Code language: CSS (css)

Marp CLI can export presenter notes to a text file using --notes or by specifying a .txt output. (GitHub)


18. Local images and --allow-local-files

When your slides reference local files like:

![](images/openshift-architecture.png)

browser-based conversion may block local access unless you pass:

--allow-local-files

Examples:

marp slide-deck.md --pdf --allow-local-files
marp slide-deck.md --pptx --allow-local-files
marp slide-deck.md --images png --allow-local-files
Code language: CSS (css)

The official CLI docs say browser-based conversion cannot use local files by default for security reasons, and --allow-local-files should only be used with trusted Markdown. (GitHub)

For your course files, use:

npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md --pptx --allow-local-files
Code language: CSS (css)

19. Preview mode

Preview in a separate window:

marp --preview slide-deck.md
Code language: CSS (css)

Short form:

marp -p slide-deck.md
Code language: CSS (css)

With npx:

npx @marp-team/marp-cli --preview slide-deck.md
Code language: CSS (css)

Preview mode automatically enables watch mode while the preview window is open. (GitHub)

For your current file:

cd ~/slides
npx @marp-team/marp-cli --preview Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md

20. Watch mode

Watch Markdown and theme changes:

marp --watch slide-deck.md
Code language: CSS (css)

Short form:

marp -w slide-deck.md
Code language: CSS (css)

Watch and output HTML:

marp -w slide-deck.md -o output.html
Code language: CSS (css)

Marp CLI watch mode observes Markdown and theme CSS changes and triggers conversion whenever files are updated. (GitHub)


21. Server mode

Serve a directory:

marp --server ./slides

Short form:

marp -s ./slides

Use custom port:

PORT=5000 marp -s ./slides

Then open:

http://localhost:5000/
Code language: JavaScript (javascript)

Server mode performs on-demand conversion by HTTP request; the official docs also note query strings such as ?pdf can return converted outputs from the server. (GitHub)

Examples:

http://localhost:8080/deck.md
http://localhost:8080/deck.md?pdf
http://localhost:8080/deck.md?pptx
http://localhost:8080/deck.md?png
http://localhost:8080/deck.md?jpeg
http://localhost:8080/deck.md?txt
Code language: JavaScript (javascript)

22. Choose browser for conversion

Default is auto, but you can force:

marp --browser chrome slide-deck.md --pdf
marp --browser edge slide-deck.md --pdf
marp --browser firefox slide-deck.md --pdf
Code language: CSS (css)

Prefer Firefox then Chrome:

marp --browser firefox,chrome slide-deck.md -o output.png
Code language: CSS (css)

Marp CLI supports --browser with chrome, edge, and firefox; the docs note Firefox support is still early-stage and may render PDFs differently than Chrome. (GitHub)


23. Multiple file conversion

Convert multiple files:

marp deck-a.md deck-b.md deck-c.md
Code language: CSS (css)

Convert all Markdown files:

marp *.md
Code language: CSS (css)

Convert files in directory:

marp ./slides

Convert with glob:

marp "slides/**/*.md"
Code language: CSS (css)

Disable parallel processing:

marp "slides/**/*.md" --no-parallel
Code language: CSS (css)

Set parallel count:

marp "slides/**/*.md" --parallel 2
Code language: CSS (css)

Marp CLI supports multiple paths, directories, and glob patterns; when converting multiple files, it processes them in parallel with default concurrency of 5 and supports --parallel / --no-parallel. (GitHub)


24. Input directory and output directory

Use --input-dir / -I to preserve directory structure:

marp --input-dir slides --output output

Short form:

marp -I slides -o output

Example:

marp -I src -o dist

The CLI docs say --input-dir is used when you want converted output in another directory while keeping the origin directory structure. (GitHub)


25. Metadata options

In Markdown front matter:

---
marp: true
title: "Introduction to Red Hat OpenShift"
description: "OpenShift training slides by DevOpsSchool"
author: "Rajesh Kumar"
keywords: "openshift,kubernetes,devops,devopsschool"
url: "https://www.devopsschool.com"
image: "images/og-image.png"
---
Code language: JavaScript (javascript)

Override from CLI:

marp slide-deck.md \
  --title "OpenShift Training" \
  --description "DevOpsSchool OpenShift Slides" \
  --author "Rajesh Kumar" \
  --keywords "openshift,kubernetes,devops"
Code language: JavaScript (javascript)

Marp CLI supports metadata via global directives and CLI options such as --title, --description, --author, --keywords, --url, and --og-image. (GitHub)


26. Enable HTML in Markdown

Marp normally treats HTML carefully. To enable HTML:

marp slide-deck.md --html
Code language: CSS (css)

Example Markdown:

<div style="text-align:center; font-size:48px;">
  Important Concept
</div>
Code language: HTML, XML (xml)

Render:

marp slide-deck.md --html
Code language: CSS (css)

Use HTML only for trusted content.


27. Basic Markdown syntax in Marp

# Heading 1

## Heading 2

Normal paragraph.

- Bullet one
- Bullet two

1. Number one
2. Number two

**Bold text**

*Italic text*

`inline code`

```bash
kubectl get pods
Code language: PHP (php)
ToolPurpose
MarpMarkdown slides
QuartoPublishing system

---

# 28. Slide separator

Marp slides are separated by:

```markdown
---
Code language: PHP (php)

Example:

# Slide 1

Content

---

# Slide 2

Content
Code language: PHP (php)

Marpit docs say slide pages are split by horizontal rulers such as ---. (GitHub)


29. Images in Marp

Normal image

![OpenShift Architecture](images/openshift-architecture.png)

Set width

![width:900px](images/openshift-architecture.png)

Set height

![height:500px](images/openshift-architecture.png)

Width and height

![width:800px height:400px](images/openshift-architecture.png)

Percentage width

![width:80%](images/openshift-architecture.png)

Marpit extends normal Markdown image syntax to help create slide layouts. (GitHub)


30. Background images in Marp

Full background

![bg](images/background.png)

# OpenShift Training
Code language: PHP (php)

Right-side background

![bg right](images/openshift-logo.png)

# OpenShift

Enterprise Kubernetes platform.
Code language: PHP (php)

Left-side background

![bg left](images/architecture.png)

# Architecture

Control plane and worker nodes.
Code language: PHP (php)

Right-side with width

![bg right:40%](images/openshift-logo.png)

# OpenShift CLI

```bash
oc get projects
Code language: PHP (php)

Marpit image syntax supports split backgrounds with `bg left` or `bg right`, shrinking the slide content area to the other side. :contentReference[oaicite:28]{index=28}

---

# 31. Multiple background images

```markdown
![bg](images/bg1.png)
![bg opacity:.4](images/bg2.png)

# Multi-layer Background
Code language: PHP (php)

Use carefully; simple layouts work better for PPTX/PDF.


32. Fragmented lists

Normal bullet list shows all items:

- First
- Second
- Third

Fragmented list reveals one by one:

* First
* Second
* Third

Marpit parses lists with specific markers as fragmented lists for appearing content one by one. (GitHub)


33. Presenter notes

Add notes as HTML comments:

# What is OpenShift?

OpenShift is Red Hat's enterprise Kubernetes platform.

<!--
Presenter notes:
Explain that OpenShift is Kubernetes plus enterprise capabilities:
security, operators, registry, routes, monitoring, and developer tools.
-->
Code language: HTML, XML (xml)

Export notes:

marp slide-deck.md --notes
Code language: CSS (css)

or:

marp slide-deck.md -o notes.txt
Code language: CSS (css)

34. Header and footer

Global header/footer:

---
marp: true
header: "OpenShift Training"
footer: "DevOpsSchool"
paginate: true
---
Code language: JavaScript (javascript)

Slide-specific header/footer:

<!-- _header: "Architecture" -->
<!-- _footer: "DevOpsSchool | OpenShift" -->

# OpenShift Architecture
Code language: HTML, XML (xml)

Underscore directives like _header apply to the current slide only.


35. Disable pagination on title slide

<!-- _paginate: false -->

# Introduction to Red Hat OpenShift

## DevOpsSchool Training

---

<!-- paginate: true -->

# Agenda

- What is OpenShift?
- Why OpenShift?
- Architecture
Code language: HTML, XML (xml)

36. Slide-specific class

<!-- _class: lead -->

# Red Hat OpenShift
Code language: HTML, XML (xml)

Use with theme CSS.


37. Change background/color on one slide

<!--
_backgroundColor: #111827
_color: white
-->

# Important Concept

This slide uses dark background.
Code language: HTML, XML (xml)

38. Use custom CSS theme

Create folder:

mkdir -p themes

Create theme file:

cat > themes/devopsschool.css <<'EOF'
/* @theme devopsschool */

@import 'default';

section {
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #111827;
}

h1 {
  color: #1f2937;
  font-weight: 800;
}

h2 {
  color: #374151;
}

footer {
  color: #6b7280;
  font-size: 20px;
}

section::after {
  color: #6b7280;
  font-size: 18px;
}
EOF
Code language: PHP (php)

Use in deck:

---
marp: true
theme: devopsschool
paginate: true
footer: "DevOpsSchool"
---
Code language: JavaScript (javascript)

Render with theme set:

marp slide-deck.md --theme-set themes/devopsschool.css
Code language: JavaScript (javascript)

or:

marp slide-deck.md --theme-set ./themes
Code language: JavaScript (javascript)

Marp CLI supports custom themes through --theme and multiple theme files/directories through --theme-set. (GitHub)


39. Use custom theme directly

marp slide-deck.md --theme themes/devopsschool.css

This overrides the theme at CLI level.


40. Marp config file

For repeated commands, create marp.config.js:

cat > marp.config.js <<'EOF'
module.exports = {
  themeSet: ['./themes/devopsschool.css'],
  html: true,
  allowLocalFiles: true,
}
EOF
Code language: JavaScript (javascript)

Then:

marp slide-deck.md
Code language: CSS (css)

For modern config:

/** @type {import('@marp-team/marp-cli').Config} */
const config = {
  themeSet: ['./themes/devopsschool.css'],
  html: true,
  allowLocalFiles: true,
}

module.exports = config
Code language: PHP (php)

Marp CLI supports configuration files for options that cannot or should not be repeated every time; its docs also show typed configuration patterns. (GitHub)


41. Local project installation

For stable course projects, local install is better than global install.

mkdir openshift-marp-course
cd openshift-marp-course

npm init -y
npm install --save-dev @marp-team/marp-cli
Code language: CSS (css)

Create folder structure:

mkdir -p slides images themes output/html output/pdf output/pptx output/images

Create package.json scripts:

npm pkg set scripts.preview="marp --preview slides/01-introduction.marp.md"
npm pkg set scripts.html="marp slides/*.marp.md -o output/html"
npm pkg set scripts.pdf="marp slides/*.marp.md --pdf --allow-local-files -o output/pdf"
npm pkg set scripts.pptx="marp slides/*.marp.md --pptx --allow-local-files -o output/pptx"
npm pkg set scripts.images="marp slides/*.marp.md --images png --allow-local-files -o output/images"
Code language: JavaScript (javascript)

Run:

npm run preview
npm run html
npm run pdf
npm run pptx
npm run images

The official docs recommend local project installation when you want exact control of CLI version and engine version. (GitHub)


42. Recommended folder structure

openshift-marp-course/
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ marp.config.js
โ”œโ”€โ”€ slides/
โ”‚   โ”œโ”€โ”€ 01-introduction.marp.md
โ”‚   โ”œโ”€โ”€ 02-architecture.marp.md
โ”‚   โ””โ”€โ”€ 03-hands-on.marp.md
โ”œโ”€โ”€ images/
โ”‚   โ”œโ”€โ”€ devopsschool-logo.png
โ”‚   โ”œโ”€โ”€ openshift-architecture.png
โ”‚   โ””โ”€โ”€ lifecycle.png
โ”œโ”€โ”€ themes/
โ”‚   โ””โ”€โ”€ devopsschool.css
โ”œโ”€โ”€ output/
โ”‚   โ”œโ”€โ”€ html/
โ”‚   โ”œโ”€โ”€ pdf/
โ”‚   โ”œโ”€โ”€ pptx/
โ”‚   โ””โ”€โ”€ images/
โ””โ”€โ”€ build.sh

43. Complete sample Marp deck for educators

Create:

mkdir -p ~/slides/marp-course/images
cd ~/slides/marp-course
Code language: JavaScript (javascript)

Create deck:

cat > openshift-complete.marp.md <<'EOF'
---
marp: true
theme: default
paginate: true
title: "Introduction to Red Hat OpenShift"
description: "OpenShift course slides by DevOpsSchool"
author: "Rajesh Kumar"
footer: "DevOpsSchool"
---

<!-- _paginate: false -->
<!-- _class: lead -->

# Introduction to Red Hat OpenShift

## DevOpsSchool Training

Rajesh Kumar

---

# Learning Objectives

By the end of this module, you will understand:

* What OpenShift is
* Why OpenShift is used
* How OpenShift extends Kubernetes
* Common OpenShift commands
* Basic troubleshooting flow

---

# What is OpenShift?

Red Hat OpenShift is an enterprise Kubernetes platform.

It provides:

- Kubernetes orchestration
- Developer experience
- Security defaults
- CI/CD integration
- Operators
- Monitoring

---

# Why OpenShift?

:::: columns

OpenShift helps teams:

- Deploy applications faster
- Standardize Kubernetes usage
- Improve platform security
- Reduce operational complexity

::::

---

# Kubernetes vs OpenShift

| Area | Kubernetes | OpenShift |
|---|---|---|
| Type | Orchestration | Enterprise platform |
| Security | Configurable | Strong defaults |
| Registry | External | Integrated |
| Routes | Not native | Built-in |
| Developer tools | External | Built-in |

---

![bg right:42%](images/openshift-logo.png)

# OpenShift CLI

```bash
oc login
oc get projects
oc new-project demo
oc get pods -A
oc get routes -A
Code language: PHP (php)

Common Troubleshooting

IssueCheck
Pod not runningoc describe pod
Route not workingoc get route
Image pull errorSecret/registry access
App not reachableService selector/route

Summary

  • OpenShift is enterprise Kubernetes
  • It improves developer and operator workflows
  • It adds security, routes, registry, operators, and monitoring
  • oc is the OpenShift CLI

EOF


Preview:

```bash
npx @marp-team/marp-cli --preview openshift-complete.marp.md
Code language: JavaScript (javascript)

Generate:

npx @marp-team/marp-cli openshift-complete.marp.md --html --allow-local-files -o openshift-complete.html
npx @marp-team/marp-cli openshift-complete.marp.md --pdf --allow-local-files -o openshift-complete.pdf
npx @marp-team/marp-cli openshift-complete.marp.md --pptx --allow-local-files -o openshift-complete.pptx
npx @marp-team/marp-cli openshift-complete.marp.md --images png --allow-local-files
npx @marp-team/marp-cli openshift-complete.marp.md --notes -o openshift-notes.txt
Code language: CSS (css)

44. Build script for your current file

In your current ~/slides folder:

cd ~/slides

cat > build-marp.sh <<'EOF'
#!/usr/bin/env bash
set -euo pipefail

MARP="Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md"

mkdir -p output/marp/html output/marp/pdf output/marp/pptx output/marp/images output/marp/notes

echo "Marp version:"
npx @marp-team/marp-cli --version

echo "Building HTML..."
npx @marp-team/marp-cli "$MARP" --html --allow-local-files \
  -o output/marp/html/openshift-marp.html

echo "Building PDF..."
npx @marp-team/marp-cli "$MARP" --pdf --allow-local-files \
  -o output/marp/pdf/openshift-marp.pdf

echo "Building PPTX..."
npx @marp-team/marp-cli "$MARP" --pptx --allow-local-files \
  -o output/marp/pptx/openshift-marp.pptx

echo "Building PNG images..."
npx @marp-team/marp-cli "$MARP" --images png --allow-local-files \
  -o output/marp/images

echo "Exporting notes..."
npx @marp-team/marp-cli "$MARP" --notes \
  -o output/marp/notes/openshift-notes.txt || true

echo "Generated files:"
find output/marp -type f -print
EOF

chmod +x build-marp.sh
./build-marp.sh
Code language: PHP (php)

45. Build all Marp decks

cat > build-all-marp.sh <<'EOF'
#!/usr/bin/env bash
set -euo pipefail

mkdir -p output/html output/pdf output/pptx output/images output/notes

for FILE in *.marp.md; do
  BASENAME="$(basename "$FILE" .marp.md)"

  echo "Building $FILE"

  npx @marp-team/marp-cli "$FILE" --html --allow-local-files \
    -o "output/html/${BASENAME}.html"

  npx @marp-team/marp-cli "$FILE" --pdf --allow-local-files \
    -o "output/pdf/${BASENAME}.pdf"

  npx @marp-team/marp-cli "$FILE" --pptx --allow-local-files \
    -o "output/pptx/${BASENAME}.pptx"

  npx @marp-team/marp-cli "$FILE" --images png --allow-local-files \
    -o "output/images/${BASENAME}"

  npx @marp-team/marp-cli "$FILE" --notes \
    -o "output/notes/${BASENAME}.txt" || true
done

find output -type f -print
EOF

chmod +x build-all-marp.sh
./build-all-marp.sh
Code language: PHP (php)

46. GitHub Actions automation

name: Build Marp Slides

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 22

      - name: Install Marp CLI
        run: npm install -g @marp-team/marp-cli

      - name: Install Chrome
        uses: browser-actions/setup-chrome@v1

      - name: Build Marp slides
        run: |
          mkdir -p output/html output/pdf output/pptx
          for FILE in *.marp.md; do
            BASENAME="$(basename "$FILE" .marp.md)"
            marp "$FILE" --html --allow-local-files -o "output/html/${BASENAME}.html"
            marp "$FILE" --pdf --allow-local-files -o "output/pdf/${BASENAME}.pdf"
            marp "$FILE" --pptx --allow-local-files -o "output/pptx/${BASENAME}.pptx"
          done

      - name: Upload output
        uses: actions/upload-artifact@v4
        with:
          name: marp-slides
          path: output/
Code language: PHP (php)

47. VS Code workflow

Install extension:

code --install-extension marp-team.marp-vscode
Code language: CSS (css)

Open folder:

cd ~/slides
code .

Open .marp.md file.

Use:

Command Palette โ†’ Marp: Export slide deck

or click the Marp icon in VS Code.

Supported VS Code exports include HTML, PDF, PPTX, PNG, JPEG, and TXT notes. (Visual Studio Marketplace)


48. VS Code custom theme settings

Create:

mkdir -p .vscode themes
Code language: CSS (css)

Create .vscode/settings.json:

{
  "markdown.marp.enableHtml": true,
  "markdown.marp.themes": [
    "./themes/devopsschool.css"
  ],
  "markdown.marp.exportType": "pptx"
}
Code language: JSON / JSON with Comments (json)

The VS Code extension supports custom theme CSS through markdown.marp.themes, including relative paths to local files. (Visual Studio Marketplace)


49. Best commands for your exact file

Run these now:

cd ~/slides

# Verify Marp
npx @marp-team/marp-cli --version

# Preview
npx @marp-team/marp-cli --preview Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md

# HTML
npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md \
  --html --allow-local-files \
  -o Introduction_to_Red_Hat_OpenShift_DevOpsSchool.html

# PDF
npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md \
  --pdf --allow-local-files \
  -o Introduction_to_Red_Hat_OpenShift_DevOpsSchool.pdf

# PPTX
npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md \
  --pptx --allow-local-files \
  -o Introduction_to_Red_Hat_OpenShift_DevOpsSchool.pptx

# PNG images for all slides
npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md \
  --images png --allow-local-files

# Presenter notes
npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md \
  --notes \
  -o Introduction_to_Red_Hat_OpenShift_DevOpsSchool.notes.txt

# Check generated files
ls -lh
Code language: PHP (php)

50. Browser dependency troubleshooting

PDF/PPTX/images need Chrome, Edge, or Firefox. Marpโ€™s official docs state that one of these browsers is required for PDF, PPTX, and image conversion. (GitHub)

On macOS:

brew install --cask google-chrome

or:

brew install --cask microsoft-edge

Then:

npx @marp-team/marp-cli deck.marp.md --pdf
Code language: CSS (css)

Use browser option:

npx @marp-team/marp-cli deck.marp.md --pdf --browser chrome
Code language: CSS (css)

51. Troubleshooting guide

Problem: marp: command not found

Use:

npx @marp-team/marp-cli --version
Code language: CSS (css)

or fix PATH:

npm config get prefix
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
rehash
Code language: JavaScript (javascript)

Problem: PDF/PPTX export fails

Install Chrome:

brew install --cask google-chrome

Then:

npx @marp-team/marp-cli deck.marp.md --pdf --browser chrome
npx @marp-team/marp-cli deck.marp.md --pptx --browser chrome
Code language: CSS (css)

Problem: Local images missing

Use:

--allow-local-files

Example:

npx @marp-team/marp-cli deck.marp.md --pdf --allow-local-files
Code language: CSS (css)

Problem: Image path wrong

Check:

pwd
ls -lh images/

Use:

![](images/my-image.png)

Avoid:

![](/Users/rajesh/Desktop/my-image.png)
Code language: JavaScript (javascript)

Problem: YAML/front matter error

Bad:

---
marp true
theme default
---
Code language: JavaScript (javascript)

Good:

---
marp: true
theme: default
---
Code language: JavaScript (javascript)

Problem: slide separator not working

Use empty lines around:

# Slide 1

Content

---

# Slide 2

Content
Code language: PHP (php)

Problem: PPTX is not editable

Normal Marp PPTX is optimized for visual fidelity, not native PowerPoint editing.

Try experimental:

marp deck.marp.md --pptx --pptx-editable
Code language: CSS (css)

But expect lower fidelity and possible errors with complex themes. (GitHub)


Problem: Custom theme not loading

Use:

marp deck.marp.md --theme-set themes/devopsschool.css
Code language: JavaScript (javascript)

Check CSS has theme metadata:

/* @theme devopsschool */
Code language: PHP (php)

Then deck:

---
marp: true
theme: devopsschool
---
Code language: JavaScript (javascript)

Problem: HTML tags not rendering

Use:

marp deck.marp.md --html
Code language: CSS (css)

Problem: Preview not available in Docker

Correct. Official docs say --preview cannot be used with the official Docker image. (GitHub)

Use local Marp or server mode instead.


52. Command cheat sheet

# Version
marp --version
npx @marp-team/marp-cli --version

# Preview
marp --preview deck.md
marp -p deck.md
npx @marp-team/marp-cli --preview deck.md

# HTML
marp deck.md
marp deck.md -o output.html
marp deck.md --html -o output.html

# PDF
marp deck.md --pdf
marp deck.md -o output.pdf
marp deck.md --pdf --allow-local-files
marp deck.md --pdf --pdf-notes
marp deck.md --pdf --pdf-outlines

# PPTX
marp deck.md --pptx
marp deck.md -o output.pptx
marp deck.md --pptx --allow-local-files
marp deck.md --pptx --pptx-editable

# Images
marp deck.md --image png
marp deck.md --images png
marp deck.md --images jpeg
marp deck.md -o title-slide.png
marp deck.md -o title-slide@2x.png --image-scale 2

# Notes
marp deck.md --notes
marp deck.md -o notes.txt

# Watch / server
marp --watch deck.md
marp -w deck.md
marp --server ./slides
marp -s ./slides
PORT=5000 marp -s ./slides

# Browser
marp deck.md --pdf --browser chrome
marp deck.md --pdf --browser edge
marp deck.md --pdf --browser firefox
marp deck.md -o slide.png --browser firefox,chrome

# Multiple files
marp deck-a.md deck-b.md
marp *.md
marp "slides/**/*.md"
marp "slides/**/*.md" --parallel 2
marp "slides/**/*.md" --no-parallel

# Input/output directory
marp -I slides -o output

# Themes
marp deck.md --theme gaia
marp deck.md --theme custom-theme.css
marp deck.md --theme-set ./themes
marp --theme-set theme-a.css theme-b.css -- deck-a.md deck-b.md

# Metadata
marp deck.md --title "OpenShift Training"
marp deck.md --description "DevOpsSchool Slides"
marp deck.md --author "Rajesh Kumar"
marp deck.md --keywords "openshift,kubernetes,devops"

# Local files
marp deck.md --pdf --allow-local-files
marp deck.md --pptx --allow-local-files
marp deck.md --images png --allow-local-files
Code language: PHP (php)

53. Best daily workflow for you

For current testing:

cd ~/slides

npx @marp-team/marp-cli --preview Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md

Once it looks good:

./build-marp.sh

For long-term course production:

Write .marp.md
Keep images in images/
Keep theme in themes/
Preview with Marp
Export HTML/PDF/PPTX/images
Commit to Git
Automate with CI/CD
Code language: JavaScript (javascript)

54. Final recommendation

Use Marp like this:

Marp = quick and clean Markdown-to-PPTX/PDF slide generator

For your educator workflow:

Use Quarto as main long-term course publishing system.
Use Marp for quick PPTX/PDF decks and lightweight slide automation.
Use PowerPoint only for final manual polish when needed.
Code language: JavaScript (javascript)

Your immediate next command should be:

cd ~/slides
npx @marp-team/marp-cli --preview Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md

Then generate the files:

npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md --html --allow-local-files
npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md --pdf --allow-local-files
npx @marp-team/marp-cli Introduction_to_Red_Hat_OpenShift_DevOpsSchool.marp.md --pptx --allow-local-files
Code language: CSS (css)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
Iโ€™m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Complete practical Quarto installation + command guide

Quarto is an open-source technical publishing system built on Pandoc. It can create documents, websites, blogs, books, and slides, and supports authoring in Markdown-like .qmd files. It…

Read More

The Best Way to Create Slides for Educators: A High-Level Guide to Automated Course Slide Generation

Meta Description A complete high-level guide for educators, trainers, and course creators on how to automate slide creation using Markdown, templates, images, reusable content, and multi-format exports…

Read More

Quarto vs Marp: The Complete Educatorโ€™s Guide to Automated Slide Creation Using Markdown

Meta Description A complete tutorial comparing Quarto and Marp for educators, trainers, DevOps instructors, and course creators. Learn which tool to use for automated slides, PPTX, PDF,…

Read More

Strategic Reliability: Mastering Service Level Objectives in Modern DevOps

Introduction In the early days of IT operations, reliability was often reduced to a binary metric: was the system up or down? This rigid pursuit of “five-nines”…

Read More

DevOps KPIs: A Guide to Engineering Growth

Introduction Engineering teams often prioritize speed, yet without clear, measurable indicators, growth frequently stalls amidst technical debt and reactive firefighting. To move from intuition to data-driven excellence,…

Read More

Openshift Labs & Assignment

Openshift: Lab 1 โ€“ Use the terminal window within the Red Hat OpenShift web console Openshift: Lab 2 โ€“ Install an application from source code in a…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x