Skip to content

Commit ce8892c

Browse files
chore: added a deploy to github pages workflow
This workflow builds the documentation using `mkdocs` and then publishes it onto the github pages site.
1 parent a080aa7 commit ce8892c

File tree

9 files changed

+112
-27
lines changed

9 files changed

+112
-27
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy to GitHub Pages
2+
# Updates the GitHub pages website with the changes made in the last push.
3+
# Takes in all markdown files and images of the repository and turns that
4+
# into HTML to present on the GitHub pages website. Used for documentation.
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches: [main, master, release, development]
10+
paths: [".github/workflows/push--deploy-github-pages.yaml", "mkdocs.yml", "docs/**"]
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: github-pages
19+
cancel-in-progress: false
20+
21+
jobs:
22+
23+
build:
24+
name: Build site
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/[email protected]
29+
- name: Setup Pages
30+
uses: actions/[email protected]
31+
- name: Set up Python
32+
uses: actions/setup-python@v4
33+
with: { python-version: '3.x' }
34+
- name: Install pip
35+
run: python -m pip install --upgrade pip
36+
- name: Install MkDocs and dependencies
37+
run: pip install mkdocs mkdocs-shadcn mkdocstrings-python pymdown-extensions
38+
- name: Build site with MkDocs
39+
run: mkdocs --verbose --color build --site-dir ./_site
40+
- name: Upload artifact
41+
uses: actions/[email protected]
42+
with: { path: ./_site }
43+
44+
deploy:
45+
name: Deploy site
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/[email protected]

docs/basics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
to get started make a file called `slyde.xml`, and put in the following text:
44

5-
```XML
5+
```xml
66
<presentation title="My First Slyde Presentation">
77
</presentation>
88
```
@@ -11,7 +11,7 @@ Slyde is made out of XML blocks denoted like this `<tag>...</tag>`. They are an
1111

1212
Now in the presentation block you can add slides as you please. Add one and optionally give it a title:
1313

14-
```XML
14+
```xml
1515
<presentation title="My First Slyde Presentation">
1616
<slide title="Why you should use Slyde">
1717
</slide>
@@ -20,7 +20,7 @@ Now in the presentation block you can add slides as you please. Add one and opti
2020

2121
Slide blocks should always be at the 2nd level. To add text to a slide add 3rd level blocks like `<text>...</text>`, `<point>....</point>`, or `<image/>`:
2222

23-
```XML
23+
```xml
2424
<presentation title="My First Slyde Presentation">
2525
<slide title="Why you should use Slyde">
2626
<point>It is super fast and easy to make slides</point>
@@ -32,7 +32,7 @@ Slide blocks should always be at the 2nd level. To add text to a slide add 3rd l
3232

3333
To style text add [markup](./markup.md). For more information about how markup works in Slyde see [the page on markup](./markup.md)
3434

35-
```XML
35+
```xml
3636
<presentation title="My First Slyde Presentation" by="Tygo van den Hurk">
3737
<slide title="Why you should use Slyde">
3838
<point>It is super **fast and easy** to make slides</point>
@@ -48,7 +48,7 @@ This would output the following fully animated presentation:
4848

4949
You can optionally add presentor notes using XML comments `<!-- ... -->`:
5050

51-
```XML
51+
```xml
5252
<presentation title="My First Slyde Presentation" by="Tygo van den Hurk">
5353
<slide title="Why you should use Slyde">
5454
<!-- These are my slide notes in case I forget what to say -->

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
Slyde is a program to create professional beautifully animated presentations from XML. It is fast and easy, even for non-technical people. [See the basics](./basics.md) to get started.
1414

15-
```XML
15+
```xml
1616
<presentation title="My First Slyde Presentation" by="Tygo van den Hurk">
1717
<slide title="Why you should use Slyde">
1818
<!-- These are my slide notes in case I forget what to say -->

docs/markup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ This markup is rendered automatically in the text of all components. The markup
7272

7373
You might not want the markup to be processed at all. In that case you have 3 options. You could switch the markup renderer to the `plain` named renderer. This one just returns the input without processing:
7474

75-
```XML
75+
```xml
7676
<text markup="plain">
7777
**This text will NOT be bold**
7878
</text>
7979
```
8080

8181
or use a [processing instruction](./processing-instructions.md):
8282

83-
```XML
83+
```xml
8484
<?slyde markup="plain"?>
8585
<text>
8686
**This text will NOT be bold**
@@ -92,7 +92,7 @@ or use a [processing instruction](./processing-instructions.md):
9292

9393
Or you can use an XML CDATA tag:
9494

95-
```XML
95+
```xml
9696
<text><CDATA[[
9797
**This text will NOT be bold**
9898
]]></text>

docs/plugins/component.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
To add your own component simply follow this template:
44

5-
```JavaScript
5+
```javascript
66
// Now available as: my-component, MyComponent, ...
77
export default ({ Component }) => Component.register(
88

@@ -24,7 +24,7 @@ There are a couple of requirements for any instance of `Component`. The function
2424

2525
Now that you've added your own `Component` plugin you can simply use it using its's ID as the element name. Like so:
2626

27-
```XML
27+
```xml
2828
<presentation>
2929
<slide>
3030
<my-component />

docs/plugins/markup-renderer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
To add your own markup renderer simply follow this template:
44

5-
```JavaScript
5+
```javascript
66
// Now available as: my-language, MyLanguage, ...
77
export default ({ MarkupRenderer }) => MarkupRenderer.register(
88

@@ -23,7 +23,7 @@ There are a couple of requirements for any instance of `MarkupRenderer`. The fun
2323

2424
Now that you've added your own `MarkupRenderer` plugin you can simply render by using it's ID as the value. [See the markup documentation on how to set a renderer](../markup.md).
2525

26-
```XML
26+
```xml
2727
<text markup="my-language">
2828
this is rendered using your new MyLanguage renderer
2929
</text>

docs/processing-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Processing instructions are a special way to tell the compiler things. They do n
66

77
An example is the processing instructions to change the [markup renderer](markup.md) to something else from here on out for all next elements and their descendants.
88

9-
```XML
9+
```xml
1010
<text>
1111
**This text will be bold**
1212
</text>
@@ -26,6 +26,6 @@ Here follows a list off all possible instructions:
2626

2727
You can change the markup render to `XYZ` using:
2828

29-
```XML
29+
```xml
3030
<?slyde markup="XYZ"?>
3131
```

mkdocs.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
site_name: Slyde
2+
site_author: Tygo van den Hurk
3+
site_url: https://tygo-van-den-hurk.github.io/Slyde/
4+
site_description: Make beautifully animated Slydes and presentations from XML with ease!
5+
6+
repo_url: https://github.com/Tygo-van-den-Hurk/Slyde
7+
8+
theme:
9+
name: shadcn
10+
show_title: true
11+
show_stargazers: false
12+
pygments_style:
13+
light: github-light
14+
dark: github-dark
15+
icon: assets/logo-standalone.svg
16+
favicon: assets/logo-standalone.svg
17+
show_datetime: true
18+
highlightjs: true
19+
color_mode: auto
20+
21+
plugins:
22+
- search
23+
- mkdocstrings
24+
25+
markdown_extensions:
26+
admonition:
27+
codehilite:
28+
fenced_code:
29+
footnotes:
30+
extra:
31+
pymdownx.blocks.details:
32+
pymdownx.tabbed:
33+
pymdownx.blocks.tab:
34+
combine_header_slug: true
35+
separator: ___
36+
pymdownx.progressbar:
37+
pymdownx.snippets:
38+
pymdownx.arithmatex:
39+
generic: true
40+
shadcn.extensions.echarts.alpha:
41+
shadcn.extensions.codexec:
42+
shadcn.extensions.iconify:
43+
pymdownx.blocks.caption:

typedoc.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)