Advanced Slides
repository·main·Indexed 20 days ago
https://github.com/mszturc/obsidian-advanced-slidesAn Obsidian plugin for creating, previewing, and exporting professional slide presentations using Markdown. Built on reveal.js, it integrates with the Obsidian ecosystem and supports various reveal.js plugins including Chalkboard for drawing, custom controls, menu systems, and Chart.js integration for data visualization.
What's inside obsidian-advanced-slides
- reveal.js is a framework for creating HTML-based presentations. It supports features such as nested slides, Markdown content, PDF export, speaker notes, and a comprehensive JavaScript API. For users preferring a graphical interface, presentations can also be managed via the slides.com online editor.
Overview of Advanced Slides for Obsidian
mainAdvanced Slides is an Obsidian extension designed to transform your Markdown notes into professional slide decks. It leverages
reveal.jsto provide a presentation experience directly within Obsidian.Key Capabilities:
- Markdown Integration: Full support for Obsidian's Markdown syntax, allowing you to embed your existing notes into slides.
- Live Preview: View changes to your slides in real-time while editing the Markdown source.
- Customization: Use themes to modify the visual appearance and annotations to adjust styles.
- Export Options: Export your presentations as PDF documents or standalone HTML presentations.
Create reveal.js presentations in Obsidian
mainAdvanced Slides is an Obsidian plugin that enables you to create beautiful presentations using reveal.js directly within Obsidian. It follows aconvention over configurationphilosophy, allowing you to create slides simply by writing standard Obsidian Markdown syntax.Structure of a reveal.js theme SCSS file
mainA theme file must follow a specific four-step sequence to ensure variables and mixins are correctly applied. The order of operations is:
- Include mixins: Import
/css/theme/template/mixins.scssfor shared utility functions. - Include settings: Import
/css/theme/template/settings.scss. This declares the custom variables required by the template. You can override these variables in the next step. - Override: Define your custom styles. This includes overriding variables from
settings.scssor adding custom CSS selectors and styles. - Include template: Import
/css/theme/template/theme.scss. This template file generates the final CSS output based on the variables and styles defined in the previous steps.
- Include mixins: Import
Format content and define slide delimiters in revealjs
mainWhen using therevealjsshortcode, you can define new slides within the enclosed Markdown using specific delimiters. Based on the documentation, standard horizontal rules (like___or---) are used to separate slides.Use the `<split>` tag to create layouts
mainThe<split>tag allows you to divide slide content into rows and columns. You can control how elements are distributed using various attributes likeeven,gap,left/rightproportions, andwrapbehavior.Define slide titles for the menu
mainThe menu generates titles for slides using the following priority:
data-menu-titleattribute: Use<section data-menu-title="My Title">..menu-titleclass: Use an element with the classmenu-titleinside the section.titleSelector: The plugin selects the first element matching thetitleSelectoroption (default: headings).- Fallback: If no title is found, it uses the slide number (e.g., 'Slide 12'), unless
hideMissingTitles: trueis set.
Configure the Slide Compiler via frontmatter
mainYou can pass specific options to the Slide Compiler by defining them in the YAML frontmatter of your Markdown note.How slide templates work in Advanced Slides
mainSlide templates allow you to define unique layouts and structures that can be reused across a presentation, reducing boilerplate code.
Core Concepts:
- Template Files: Templates are regular
.mdnotes stored anywhere in your Obsidian vault. - Variables: Templates use
<% variable_name %>syntax to define placeholders. - Content Variable: Every template must contain a
<% content %>variable, even if it is not explicitly used, to receive the main slide content. - Data Injection: You populate template variables from your slide note using block comments (e.g.,
::: variable_name ... :::). - Optional Variables: By default, if a variable is defined in a template but not provided in the slide, dummy text is displayed. To make a variable truly optional (where the markup is hidden unless the variable is provided), append a
?to the variable name in the template (e.g.,<%? footer %>).
- Template Files: Templates are regular
Define slides using horizontal and vertical delimiters
mainTo create a slideshow within a single Markdown file, use specific delimiters to separate slides. This project supports both horizontal and vertical slide navigation:
- Horizontal Slides: Use three dashes (
---) to denote the start of a new horizontal slide. - Vertical Slides: Use three underscores (
___) to denote the start of a vertical slide (typically used to present sub-information below a top-level horizontal slide).
By combining these, you can create complex navigation structures.
- Horizontal Slides: Use three dashes (
Use the Grid component for slide layouts
mainThe
<grid>tag allows you to layout slide content in specific parts using a drag-and-drop mental model. You define the size of a content block withdragand its position withdrop.Basic Syntax:
<grid drag="width height" drop="x y">- drag: Defines the width and height of the area. If omitted, it defaults to
50 100. - drop: Defines the position. Values are percentages by default; append
pxfor pixel sizes.
Coordinate System for
drop:- Positive x: Relative to the left edge.
- Negative x: Relative to the right edge.
- Positive y: Relative to the top edge.
- Negative y: Relative to the bottom edge.
<grid drag="60 55" drop="5 10" bg="red"> 60 x 55 </grid>- drag: Defines the width and height of the area. If omitted, it defaults to
How Multiplex works for synchronized presentations
mainThe Multiplex plugin allows a 'Master' presentation to control multiple 'Client' presentations in real time. As the presenter navigates slides on the Master, all connected Clients update automatically. This requires three components:
- Master presentation: The controller, ideally served from a local machine to ensure stability if internet fails.
- Client presentations: The audience view, served from a publicly accessible static file server (e.g., GitHub Pages, S3).
- Socket.io server: A central hub that receives
slideChangedevents from the Master and broadcasts them to the Clients.
You must generate a unique
secretandidpair from your Socket.io server's token endpoint (e.g.,http://your-server.com/token) to link the presentations.