Skip to content

Commit bb5b249

Browse files
feildmasterclaude
andcommitted
fix(docs): keep the base path on internal links
{% link %} returns a path without the project base, so the header API link and every in-page link went to feildmaster.github.io/api/... instead of /UnderScript/api/.... Prefix them with site.baseurl like the API layout already does, and do the same for the index screenshot. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent e3d6aac commit bb5b249

28 files changed

Lines changed: 40 additions & 40 deletions

‎docs/_api/eventemitter.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: EventEmitter
33
---
4-
Events are how UnderScript tells your code that something happened, such as a page finishing loading or a chat message arriving. Plugins get one through [`plugin.events`]({% link _api/plugin/events.md %}), and `underscript.utils.eventEmitter()` creates a new one for your own use.
4+
Events are how UnderScript tells your code that something happened, such as a page finishing loading or a chat message arriving. Plugins get one through [`plugin.events`]({{ site.baseurl }}{% link _api/plugin/events.md %}), and `underscript.utils.eventEmitter()` creates a new one for your own use.
55

66
## Methods
77
on(*event*, *listener*)
@@ -69,4 +69,4 @@ events.on('hello', function listener(name) {
6969
events.emit('hello', 'world');
7070
{% endhighlight %}
7171

72-
Read the list of [events UnderScript emits]({% link _api/events.md %}).
72+
Read the list of [events UnderScript emits]({{ site.baseurl }}{% link _api/events.md %}).

‎docs/_api/events.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Events
33
---
4-
Events UnderScript emits. Listen to them with [`plugin.events`]({% link _api/plugin/events.md %}). Data shown as `unknown` is game data that UnderScript passes along as it received it.
4+
Events UnderScript emits. Listen to them with [`plugin.events`]({{ site.baseurl }}{% link _api/plugin/events.md %}). Data shown as `unknown` is game data that UnderScript passes along as it received it.
55

66
## Page lifecycle
77
`:preload`
@@ -122,7 +122,7 @@ Events UnderScript emits. Listen to them with [`plugin.events`]({% link _api/plu
122122
: Packs were opened
123123

124124
`questProgress`(*updated*, *previous*)
125-
: Quest progress changed. Both are lists of [quests]({% link _api/plugin/quests.md %}).
125+
: Quest progress changed. Both are lists of [quests]({{ site.baseurl }}{% link _api/plugin/quests.md %}).
126126

127127
`Home:Refresh`
128128
: The home page refreshed its game list
@@ -155,4 +155,4 @@ Events UnderScript emits. Listen to them with [`plugin.events`]({% link _api/plu
155155
: The settings window opened. `body` is a jQuery object.
156156

157157
`setting:change`(*key*, *value*, *previous*), `open`, `close`
158-
: Events on [`plugin.settings().on()`]({% link _api/plugin/settings.md %})
158+
: Events on [`plugin.settings().on()`]({{ site.baseurl }}{% link _api/plugin/settings.md %})

‎docs/_api/index.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const plugin = underscript.plugin('My great plugin', '1.0.0');
88
plugin.logger.info('Hello from', plugin.name);
99
{% endhighlight %}
1010

11-
The [Plugin Object]({% link _api/plugin/index.md %}) is where most of the API lives. The [UnderScript Object]({% link _api/underscript/index.md %}) has a few extra helpers.
11+
The [Plugin Object]({{ site.baseurl }}{% link _api/plugin/index.md %}) is where most of the API lives. The [UnderScript Object]({{ site.baseurl }}{% link _api/underscript/index.md %}) has a few extra helpers.
1212

1313
## Checking the version
1414
Features are added over time. To only use a feature when it exists, check the version first:
@@ -19,7 +19,7 @@ if (underscript.semver.isOlder('0.64.0')) {
1919
}
2020
{% endhighlight %}
2121

22-
See [underscript.semver]({% link _api/underscript/semver.md %}).
22+
See [underscript.semver]({{ site.baseurl }}{% link _api/underscript/semver.md %}).
2323

2424
## Editor support
2525
Starting with 0.65.0, every release has a file called `underscript.d.ts`. It is optional, and plugins work the same without it, but editors like VS Code use it to suggest and check your code. Download it from the [latest release](https://github.com/UCProjects/UnderScript/releases/latest) and put it next to your plugin's script.

‎docs/_api/plugin/addFilter.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ filter
1818
Return `true` to hide the card, `false` to show it, or nothing to leave it alone.
1919

2020
priority
21-
: When to run, compared to other filters: [`underscript.priority.HIGH`]({% link _api/underscript/priority.md %}), or the name as text, `'high'`. (default: normal)
21+
: When to run, compared to other filters: [`underscript.priority.HIGH`]({{ site.baseurl }}{% link _api/underscript/priority.md %}), or the name as text, `'high'`. (default: normal)
2222

2323
## Examples
2424
{% highlight javascript %}

‎docs/_api/plugin/events.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ categories: plugin
44
plugin: true
55
property: true
66
---
7-
Listen to and emit events. `plugin.events` is UnderScript's [EventEmitter]({% link _api/eventemitter.md %}), so events you emit can be heard by other plugins. Errors thrown by your listeners are caught and written to your plugin's [logger]({% link _api/plugin/logger.md %}) instead of breaking other listeners.
7+
Listen to and emit events. `plugin.events` is UnderScript's [EventEmitter]({{ site.baseurl }}{% link _api/eventemitter.md %}), so events you emit can be heard by other plugins. Errors thrown by your listeners are caught and written to your plugin's [logger]({{ site.baseurl }}{% link _api/plugin/logger.md %}) instead of breaking other listeners.
88

99
## Syntax
1010
> plugin.events;
@@ -28,7 +28,7 @@ compound(...*events*, *listener*)
2828
emit(*event*, ...*data*)
2929
: Emit an event. Chain `.cancelable`, `.canceled`, `.singleton` or `.async` before it to change how it behaves.
3030

31-
Read more: [EventEmitter]({% link _api/eventemitter.md %}). See the [list of events]({% link _api/events.md %}).
31+
Read more: [EventEmitter]({{ site.baseurl }}{% link _api/eventemitter.md %}). See the [list of events]({{ site.baseurl }}{% link _api/events.md %}).
3232

3333
## Examples
3434
{% highlight javascript %}

‎docs/_api/underscript/constants.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: underscript.constants
33
categories: underscript
44
property: true
55
---
6-
Helpers for working with [items]({% link _api/underscript/item.md %}), [priorities]({% link _api/underscript/priority.md %}) and [rarities]({% link _api/underscript/rarity.md %}) when you are not sure what you were given. They accept an item, priority or rarity, or the text for one, like `'gold'`, `'high'` or `'DT'`.
6+
Helpers for working with [items]({{ site.baseurl }}{% link _api/underscript/item.md %}), [priorities]({{ site.baseurl }}{% link _api/underscript/priority.md %}) and [rarities]({{ site.baseurl }}{% link _api/underscript/rarity.md %}) when you are not sure what you were given. They accept an item, priority or rarity, or the text for one, like `'gold'`, `'high'` or `'DT'`.
77

88
## Syntax
99
> underscript.constants.getItem(*value*);<br>
@@ -20,13 +20,13 @@ isItem
2020
: `true` if the value is an item, or the text for one.
2121

2222
getPriority
23-
: Returns the matching [`underscript.priority`]({% link _api/underscript/priority.md %}), or `undefined` if there isn't one.
23+
: Returns the matching [`underscript.priority`]({{ site.baseurl }}{% link _api/underscript/priority.md %}), or `undefined` if there isn't one.
2424

2525
isPriority
2626
: `true` if the value is a priority, or the text for one.
2727

2828
getRarity
29-
: Returns the matching [`underscript.rarity`]({% link _api/underscript/rarity.md %}), or `undefined` if there isn't one.
29+
: Returns the matching [`underscript.rarity`]({{ site.baseurl }}{% link _api/underscript/rarity.md %}), or `undefined` if there isn't one.
3030

3131
isRarity
3232
: `true` if the value is a rarity, or the text for one.

‎docs/_api/underscript/packs.open.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ count
1313
: Number of packs to open
1414

1515
type
16-
: Type of pack to open ('', 'DR', 'UTY', 'Shiny', 'Super', 'Final') or its [item]({% link _api/underscript/item.md %}), like `underscript.item.DR_PACK` (default: '')
16+
: Type of pack to open ('', 'DR', 'UTY', 'Shiny', 'Super', 'Final') or its [item]({{ site.baseurl }}{% link _api/underscript/item.md %}), like `underscript.item.DR_PACK` (default: '')
1717

1818
## Checking if packs are opening
1919
> underscript.openingPacks();

‎docs/_api/underscript/plugin.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ name
1212
: Name of plugin (See [name restrictions](#restrictions))
1313

1414
version
15-
: Version of your plugin, optional. A plugin with a version can use [`plugin.updater()`]({% link _api/plugin/updater.md %}).
15+
: Version of your plugin, optional. A plugin with a version can use [`plugin.updater()`]({{ site.baseurl }}{% link _api/plugin/updater.md %}).
1616

1717
Return Value
1818
: Returns `Plugin` object

‎docs/_api/underscript/priority.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Names for deciding what goes first, used when a filter or similar has to be put
1111
FIRST, HIGHEST, HIGH, NORMAL, LOW, LOWEST, LAST
1212
: From going first to going last. `FIRST` is also known as `'top'` and `LAST` as `'bottom'`.
1313

14-
Every priority has `equals(other)`. To turn text into a priority, or check if something is one, use [underscript.constants]({% link _api/underscript/constants.md %}).
14+
Every priority has `equals(other)`. To turn text into a priority, or check if something is one, use [underscript.constants]({{ site.baseurl }}{% link _api/underscript/constants.md %}).
1515

1616
## Examples
1717
{% highlight javascript %}

‎docs/_api/underscript/rarity.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DETERMINATION
1717
TOKEN
1818
: Cards that can't be crafted. Also known as `'GENERATED'`.
1919

20-
Every rarity has `equals(other)`, and turns into the game's text for that rarity when used as text. To turn text into a rarity, or check if something is one, use [underscript.constants]({% link _api/underscript/constants.md %}).
20+
Every rarity has `equals(other)`, and turns into the game's text for that rarity when used as text. To turn text into a rarity, or check if something is one, use [underscript.constants]({{ site.baseurl }}{% link _api/underscript/constants.md %}).
2121

2222
## Examples
2323
{% highlight javascript %}

0 commit comments

Comments
 (0)