Skip to content

Commit

Permalink
add better youtube and twitch support
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanLyon committed Jan 1, 2024
1 parent e3c23c0 commit 2849482
Show file tree
Hide file tree
Showing 19 changed files with 553 additions and 205 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"vfile"
]
}
Binary file added docs/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion docs/guides/100/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"label": "100%",
"position": 5
"position": 3,
"link": {
"type": "generated-index",
"title": "100% Guides"
}
}
6 changes: 5 additions & 1 deletion docs/guides/any/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"label": "Any%",
"position": 4
"position": 2,
"link": {
"type": "generated-index",
"title": "Any% Guides"
}
}
6 changes: 6 additions & 0 deletions docs/guides/any/level-1.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
sidebar_position: 1
sidebar_custom_props:
category_image: /speedrun-docs/img/run-man.svg # This is in dev while I wait for Docusaurus 3.1.0 to come out
---

# Level 1

:::note Example File
Expand Down
15 changes: 8 additions & 7 deletions docs/guides/deploying.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ You should remove this page when making your docs.
1. Set your GitHub username as an environment variable:

<Tabs>
<TabItem value="cmd" label="CMD/Windows Terminal">

```cmd
set GIT_USER=<GitHub-Username>
```

</TabItem>

<TabItem value="ps" label="Powershell">

```powershell
Expand All @@ -25,13 +33,6 @@ $env:GIT_USER="<GitHub-Username>"
GIT_USER=<GitHub-Username> npm run deploy
```

</TabItem>
<TabItem value="cmd" label="CMD/Windows Terminal">

```cmd
set GIT_USER=<GitHub-Username>
```

</TabItem>
</Tabs>

Expand Down
56 changes: 56 additions & 0 deletions docs/guides/embedding-content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
sidebar_position: 5
---

# Embedding Content

:::note Speedrun Docs Guide

You should remove this page when making your docs.

:::

## Images and Local Videos

1. Add the image to the `static` folder at the root directory.
2. Add `![Title of image](<path to file>)`.

Example:

`![Speedrun Docs Logo](/img/run-man.svg)`
![Speedrun Docs Logo](/img/run-man.svg)

:::tip Speedrun Docs Logo

Feel free to modify and customise the logo to your desired game! An example can be seen in the [Heavenly Bodies Docs](https://ewanlyon.github.io/HeavenlyBodies-SpeedrunDocs/).

:::

## Online Videos

Currently Speedrun-docs supports:

- YouTube Videos
- Twitch Clips
- Twitch VODs
- Twitch Channels

### YouTube

`![ASM2023 AFL Evolution Pop-off](https://www.youtube.com/watch?v=DI8vHDrvJGc&t=943s)`

![ASM2023 AFL Evolution Pop-off](https://www.youtube.com/watch?v=DI8vHDrvJGc&t=943s)

### Twitch

`![AusSpeedruns Channel](https://www.twitch.tv/ausspeedruns)`

`![Little Intermission Goofing Clip](https://www.twitch.tv/ausspeedruns/clip/LuckyDirtyPheasantWOOP-KmnZnto7H0NjjaQM)`

`![ASM2023 AFL Evolution VOD](https://www.twitch.tv/videos/1872434389?collection=_twiuAyjchdwJQ&t=00h15m42s)`

![AusSpeedruns Channel](https://www.twitch.tv/ausspeedruns)

![Little Intermission Goofing Clip](https://www.twitch.tv/ausspeedruns/clip/LuckyDirtyPheasantWOOP-KmnZnto7H0NjjaQM)

![ASM2023 AFL Evolution VOD](https://www.twitch.tv/videos/1872434389?collection=_twiuAyjchdwJQ&t=00h15m42s)
64 changes: 0 additions & 64 deletions docs/guides/embedding-content.mdx

This file was deleted.

27 changes: 27 additions & 0 deletions docs/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,33 @@ To create pages make a new text file with the file extension `.md` in the `docs/

To create nested pages create a folder and add the file there.

### Front matter

Docusaurus has support for more information at the top of a markdown file called "front matter".

```yaml
---
sidebar_position: 1
description: This is a handmade description for a page
sidebar_custom_props:
image: <url>
---
```

#### Speedrun-Docs Custom Props

Speedrun Docs will have support for more built in theming.

| Property | Type |
|-----------------|--------|
| [image](#image) | String |

##### image

Adding a `sidebar_custom_props` to the front matter and then adding an `image` property under that (like in the example above), will add an image to the generated sidebar document view.

An example of this can be seen in the [Any% generated page](category/any) and in the front matter for [Level 1](any/level-1.md).

## Adding new tabs

Adding a new tab at the top such as the "Tutorial" and "Resources" tab.
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/markdown-guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 4
---

# Markdown
Expand Down
Loading

0 comments on commit 2849482

Please sign in to comment.