This project is a formation deployment system that uses GitHub Actions and GitLab CI to automatically deploy markdown-based slides to GitHub Pages and GitLab Pages respectively. The slides are generated from markdown files using remark.js.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have the following installed on your system:
- Node.js
- Yarn or npm
Clone the repository:
git clone https://github.com/Boris-Bodin/formation-template.git
Navigate into the project directory:
cd formation-template
Install the dependencies:
yarn install
# or
npm install
This project uses markdown files to generate slides for presentations. Each markdown file represents a session. The markdown files use a specific syntax to define the layout and content of the slides.
The project uses markdown files located in the public/slides
directory to generate the slides. Each markdown file represents a session.
To add a new session:
-
Create a new markdown file in the
public/slides
directory. The name of the file should correspond to the session number (e.g.,session-03.md
for the third session). -
In the
views/index.ejs
file, add a new button that links to the new session. The button should be added in the following format:
<a class="btn btn-outline-primary" href="slides/session-03">Session 03</a>
The slides are generated using remark.js, a flexible, browser-based markdown presentation tool.
The name of a slide should be the snake_case version of the section title. For example, if the section title is ### My Section
, the slide name should be name: my-section
. Special characters in the section title should be replaced with a '-'. This naming convention ensures that the sections title are displayed correctly in the presentation.
To test the slides locally, run the following command:
yarn start
# or
npm start
This will start a local server. Open your browser and navigate to http://localhost:3000
to view the slides.
The project uses a GitHub Actions workflow defined in .github/workflows/page.yml
and a GitLab CI configuration defined in .gitlab-ci.yml
to automatically deploy the slides to GitHub Pages and GitLab Pages whenever changes are pushed to the main
branch or when the workflow is manually triggered from the Actions tab or the CI/CD pipelines page.
Please read CONTRIBUTING.md
for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE.md
file for details.