Skip to content

Commit

Permalink
fix routing
Browse files Browse the repository at this point in the history
  • Loading branch information
spartacus04 committed Mar 26, 2024
1 parent cd8eef6 commit 3a55ffd
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 28 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [published]

concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
name: stabledocs
path: build/dokka/html/

build-docs-latest:
build-docs-latest:
runs-on: ubuntu-latest
steps:
- name: Get latest commit hash
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
path: build/dokka/html/

build-publish:
permissions:
permissions:
pages: write
id-token: write

Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
name: |
stabledocs
devdocs
- name: Fix permissions
run: |
chmod -c -R +rX "build/" | while read line; do
Expand All @@ -152,7 +152,6 @@ jobs:
with:
path: build/


- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 5 additions & 3 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
import { onMount } from 'svelte';
import { UserAttentionType, appWindow } from '@tauri-apps/api/window';
import { base } from '$app/paths';
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
hljs.registerLanguage('json', json);
hljs.registerLanguage('plaintext', plaintext);
Expand Down Expand Up @@ -61,7 +63,7 @@
<AppShell>
<svelte:fragment slot="sidebarLeft">
<AppRail hover="bg-tertiary-hover-token">
<AppRailAnchor href="/">
<AppRailAnchor href="{base}/">
<div
class="flex"
use:popup={{
Expand All @@ -77,7 +79,7 @@
/>
</div>
</AppRailAnchor>
<AppRailAnchor href="/config">
<AppRailAnchor href="{base}/config">
<div
class="flex"
use:popup={{
Expand All @@ -89,7 +91,7 @@
<img src={cog} alt="Plugin configurator" class="h-full w-full p-2 pointer-events-none" />
</div>
</AppRailAnchor>
<AppRailAnchor href="/documentation">
<AppRailAnchor href="{base}/documentation">
<div
class="flex"
use:popup={{
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { invoke } from '@tauri-apps/api/tauri';

export const ssr = false;
export const prerender = true;
export const trailingSlash = "always";
export const trailingSlash = 'always';

export const load: LayoutLoad = async ({ url }) => {
if (window.__TAURI__) {
Expand Down
25 changes: 15 additions & 10 deletions src/routes/documentation/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { slide } from 'svelte/transition';
import { onMount } from 'svelte';
import { afterNavigate } from '$app/navigation';
import { base } from '$app/paths';
let indexOpen = false;
let marginToggled = false;
Expand Down Expand Up @@ -47,7 +48,7 @@
<h1 class="h2">Documentation</h1>
<hr class="border-b border-white w-full m-2" />
<Accordion>
<a href="/documentation" class="[&>*]:pointer-events-none">
<a href="{base}/documentation" class="[&>*]:pointer-events-none">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Readme</p>
</div>
Expand All @@ -59,28 +60,28 @@
<svelte:fragment slot="summary">For server owners</svelte:fragment>
<svelte:fragment slot="content">
<Accordion>
<a href="/documentation/quickstart" class="[&>*]:pointer-events-none">
<a href="{base}/documentation/quickstart" class="[&>*]:pointer-events-none">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Quickstart</p>
</div>
</a>
</Accordion>
<Accordion>
<a href="/documentation/config" class="[&>*]:pointer-events-none">
<a href="{base}/documentation/config" class="[&>*]:pointer-events-none">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Config documentation</p>
</div>
</a>
</Accordion>
<Accordion>
<a href="/documentation/commands" class="[&>*]:pointer-events-none">
<a href="{base}/documentation/commands" class="[&>*]:pointer-events-none">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Commands & Permissions</p>
</div>
</a>
</Accordion>
<Accordion>
<a href="/documentation/resourcepack" class="[&>*]:pointer-events-none">
<a href="{base}/documentation/resourcepack" class="[&>*]:pointer-events-none">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Manual resourcepack config</p>
</div>
Expand All @@ -95,21 +96,21 @@
<svelte:fragment slot="summary">For developers</svelte:fragment>
<svelte:fragment slot="content">
<Accordion>
<a href="/documentation/integrations" class="[&>*]:pointer-events-none">
<a href="{base}/documentation/integrations" class="[&>*]:pointer-events-none">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Permission integrations</p>
</div>
</a>
</Accordion>
<Accordion>
<a href="/documentation/discsources" class="[&>*]:pointer-events-none">
<a href="{base}/documentation/discsources" class="[&>*]:pointer-events-none">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Discs sources</p>
</div>
</a>
</Accordion>
<Accordion>
<a href="/documentation/api" class="[&>*]:pointer-events-none">
<a href="{base}/documentation/api" class="[&>*]:pointer-events-none">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">REST Api</p>
</div>
Expand All @@ -121,12 +122,16 @@
<svelte:fragment slot="summary">Javadocs</svelte:fragment>
<svelte:fragment slot="content">
<Accordion>
<a href="/javadocs/stable" class="[&>*]:pointer-events-none" target="_blank">
<a
href="{base}/javadocs/stable"
class="[&>*]:pointer-events-none"
target="_blank"
>
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Stable</p>
</div>
</a>
<a href="/javadocs/dev" class="[&>*]:pointer-events-none" target="_blank">
<a href="{base}/javadocs/dev" class="[&>*]:pointer-events-none" target="_blank">
<div id="AccordionAnchor" class="px-4 py-2">
<p class="ml-10 color text-white">Development</p>
</div>
Expand Down
9 changes: 6 additions & 3 deletions src/routes/documentation/discsources/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { base } from '$app/paths';
import { CodeBlock, Tab, TabGroup } from '@skeletonlabs/skeleton';
let buildSystem = 0;
Expand Down Expand Up @@ -88,7 +89,7 @@ dependencies {

<p>
You can now create a class that implements the <a
href="../-j-e-x-t--reborn/me.spartacus04.jext.discs.sources/-disc-source/index.html"
href="{base}/javadocs/stable/-j-e-x-t--reborn/me.spartacus04.jext.discs.sources/-disc-source/index.html"
>DiscSource</a
> interface:
</p>
Expand Down Expand Up @@ -146,7 +147,8 @@ class MyDiscSource : DiscSource {
<br />
<p>
Finally, you can register the disc source by using the <a
href="../-j-e-x-t--reborn/me.spartacus04.jext.discs/-disc-manager/index.html">DiscManager</a
href="{base}/javadocs/stable/-j-e-x-t--reborn/me.spartacus04.jext.discs/-disc-manager/index.html"
>DiscManager</a
>:
</p>

Expand Down Expand Up @@ -191,7 +193,8 @@ class MyPlugin : JavaPlugin() {

<p>
If you want to play the disc with a custom method, you can create a class that implements use the <a
href="../-j-e-x-t--reborn/me.spartacus04.jext.discs/-disc/index.html">Disc</a
href="{base}/javadocs/stable/-j-e-x-t--reborn/me.spartacus04.jext.discs/-disc/index.html"
>Disc</a
> object:
</p>

Expand Down
5 changes: 3 additions & 2 deletions src/routes/documentation/integrations/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { base } from '$app/paths';
import { CodeBlock, Tab, TabGroup } from '@skeletonlabs/skeleton';
let buildSystem = 0;
Expand Down Expand Up @@ -95,7 +96,7 @@ dependencies {

<p>
You can now create a class that implements the <a
href="../-j-e-x-t--reborn/me.spartacus04.jext.integrations/-integration/index.html"
href="{base}/javadocs/stable/-j-e-x-t--reborn/me.spartacus04.jext.integrations/-integration/index.html"
>Integration</a
> interface:
</p>
Expand Down Expand Up @@ -163,7 +164,7 @@ class MyIntegration : Integration {

<p>
Finally, you can register your integration by using the <a
href="../-j-e-x-t--reborn/me.spartacus04.jext.integrations/-integrations-manager/index.html"
href="{base}/javadocs/stable/-j-e-x-t--reborn/me.spartacus04.jext.integrations/-integrations-manager/index.html"
>IntegrationManager</a
> :
</p>
Expand Down
9 changes: 5 additions & 4 deletions src/routes/documentation/quickstart/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import workflow from '$lib/assets/workflow.svg';
import wrench from '$lib/assets/wrench.svg';
import hand_helping from '$lib/assets/hand_helping.svg';
import { base } from '$app/paths';
</script>

<div class="mb-10" />
Expand Down Expand Up @@ -192,8 +193,8 @@
The plugin comes with a default configuration file that you can use as a base, you can
find it in the <code>plugins/JukeboxExtendedReborn</code> folder. You can edit it with any
text editor, and you can check out the
<a href="/documentation/config">config documentation</a> for more information on how to configure
the plugin.
<a href="{base}/documentation/config">config documentation</a> for more information on how
to configure the plugin.
</svelte:fragment>
</AccordionItem>
</Accordion>
Expand Down Expand Up @@ -244,8 +245,8 @@
<svelte:fragment slot="summary">Configuring manually</svelte:fragment>
<svelte:fragment slot="content">
Altought it's not recommended you can also add custom discs manually by using a jext.json
file inside a resource pack, you can check out the <a href="/documentation/resourcepack"
>resourcepack documentation</a
file inside a resource pack, you can check out the <a
href="{base}/documentation/resourcepack">resourcepack documentation</a
> for more information on how to manage discs.
</svelte:fragment>
</AccordionItem>
Expand Down

0 comments on commit 3a55ffd

Please sign in to comment.