Skip to content

Stater template for Manim Slides presentations and GitHub Pages deployment

License

Notifications You must be signed in to change notification settings

jeertmans/manim-slides-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manim Slides Starter

Deploy static content to Pages

Stater template for Manim Slides presentations and GitHub Pages deployment!

Who is this template for?

This template is for people that would like to share their Manim Slides presentation with others, anywhere on the internet.

How to use this template?

This template contains two important files:

The former contains the logic to animate your slides, while the second defines a number of steps to render your slides into a portable presentation format, and publish it on the internet. It uses GitHub actions and GitHub pages which are free for public repositories.

Creating a new repository

First, you need to create a new repository by clicking on the Use this template button.

Creating a new repository from this template

NOTE: if you want to have a private repository, you will probably need a GitHub Pro account.

Customizing your presentation

By default, the generated presentation is obtained from the slides.py file, uses Manim Community Edition, and renders the following scenes: Introduction, WithTeX, ans Outro.

Of course, you can update or create Python files to generate your animations. If you require a specific version of manim-slides, manim or manimlib, please edit requirements.txt.

Additionally, you can edit the following environ variables to reflect your changes:

env:
FILE: 'slides.py' # Source file where scenes are defined
MANIM: 'manim' # manim or manimgl - which Manim renderer to use
SCENES: 'Introduction WithTeX Outro' # Space-separated list of scenes to render
USES_TEX: true # true or false - disabling this will make the action run faster

WARNING: manimgl is currently not supported, as rendering animations inside GitHub workflows seems complex...

Last, if you want to change the scenes rendering and the HTML conversion, feel free to edit the last two lines:

- name: Build HTML
run: |
${{ env.MANIM }} ${{ env.FILE }} ${{ env.SCENES }}
manim-slides convert ${{ env.SCENES }} _site/index.html

Where is the output?

On every commit to the main branch, a new deployment action should be triggered. If that is not the case, inspect the actions tab for any error message. You can also manually trigger a deployment by clicking on the Run workflow button.

If everything goes well, the deploying site should be on your personal GitHub pages site: https://<username>.github.io/<repository_name>.

For example, this starter's website is: https://jeertmans.github.io/manim-slides-starter.

NOTE: the first time the deployment action is used, the gh-pages branch is created. You might need to go to Settings -> Pages and make sure that the Source is Deploy from a branch, and branch is gh-pages.