ベースパスの取り扱いを変更
This commit is contained in:
parent
91e1ce82d6
commit
9d89d02e4c
7 changed files with 9 additions and 15 deletions
|
@ -1,8 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { base } from '$app/paths'
|
|
||||||
const { data } = $props();
|
const { data } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#each data.posts as post}
|
{#each data.posts as post}
|
||||||
<div><a href="{base}/post/{post}">{post}</a></div>
|
<div><a href="../../post/{post}">{post}</a></div>
|
||||||
{/each}
|
{/each}
|
|
@ -3,10 +3,9 @@
|
||||||
|
|
||||||
import { goto } from "$app/navigation";
|
import { goto } from "$app/navigation";
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { base } from '$app/paths'
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
goto(`${base}/post/${data.id}`)
|
goto(data.id)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<span class="txt">Category:</span>
|
<span class="txt">Category:</span>
|
||||||
<a class="tag" href='/blog/category/{data.metadata.category}'>{data.metadata.category}</a>
|
<a class="tag" href='../../category/{data.metadata.category}'>{data.metadata.category}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if data.metadata.tags.length}
|
{#if data.metadata.tags.length}
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<span class="txt">Tag:</span>
|
<span class="txt">Tag:</span>
|
||||||
{#each data.metadata.tags as tag}
|
{#each data.metadata.tags as tag}
|
||||||
<a class='tag' href='/blog/tag/{tag}'>{tag}</a>
|
<a class='tag' href='../../tag/{tag}'>{tag}</a>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
|
|
||||||
export let share: shareobj;
|
export let share: shareobj;
|
||||||
|
|
||||||
import { base } from '$app/paths'
|
|
||||||
|
|
||||||
let copyed = false;
|
let copyed = false;
|
||||||
|
|
||||||
function copylink() {
|
function copylink() {
|
||||||
|
@ -42,7 +40,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="rss">
|
<div class="rss">
|
||||||
<a href="{base}/feed.rss" target="_blank" aria-label="rss配信">
|
<a href="../../feed.rss" target="_blank" aria-label="rss配信">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M200-120q-33 0-56.5-23.5T120-200q0-33 23.5-56.5T200-280q33 0 56.5 23.5T280-200q0 33-23.5 56.5T200-120Zm480 0q0-117-44-218.5T516-516q-76-76-177.5-120T120-680v-120q142 0 265 53t216 146q93 93 146 216t53 265H680Zm-240 0q0-67-25-124.5T346-346q-44-44-101.5-69T120-440v-120q92 0 171.5 34.5T431-431q60 60 94.5 139.5T560-120H440Z"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M200-120q-33 0-56.5-23.5T120-200q0-33 23.5-56.5T200-280q33 0 56.5 23.5T280-200q0 33-23.5 56.5T200-120Zm480 0q0-117-44-218.5T516-516q-76-76-177.5-120T120-680v-120q142 0 265 53t216 146q93 93 146 216t53 265H680Zm-240 0q0-67-25-124.5T346-346q-44-44-101.5-69T120-440v-120q92 0 171.5 34.5T431-431q60 60 94.5 139.5T560-120H440Z"/></svg>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { base } from '$app/paths'
|
|
||||||
const { data } = $props();
|
const { data } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#each data.posts as post}
|
{#each data.posts as post}
|
||||||
<div><a href="{base}/post/{post}">{post}</a></div>
|
<div><a href="../../post/{post}">{post}</a></div>
|
||||||
{/each}
|
{/each}
|
|
@ -1,10 +1,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
const { data } = $props();
|
const { data } = $props();
|
||||||
import { base } from '$app/paths';
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{#each data.codes as code}
|
{#each data.codes as code}
|
||||||
<li><a href="{base}/code/{code}">{code}</a></li>
|
<li><a href="{code}">{code}</a></li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
|
@ -1,6 +1,6 @@
|
||||||
export const prerender = true
|
export const prerender = true
|
||||||
|
|
||||||
import path from 'node:path';
|
import { base } from '$app/paths';
|
||||||
|
|
||||||
import Metadatas from '$lib/server/Metadatas';
|
import Metadatas from '$lib/server/Metadatas';
|
||||||
import { PUBLIC_HOSTNAME } from '$env/static/public';
|
import { PUBLIC_HOSTNAME } from '$env/static/public';
|
||||||
|
@ -16,7 +16,7 @@ export async function GET() {
|
||||||
for (let post of metalist){
|
for (let post of metalist){
|
||||||
|
|
||||||
let meta = post.metadata
|
let meta = post.metadata
|
||||||
let link = `https://${PUBLIC_HOSTNAME}/blog/post/${path.basename(post.postId, '.md')}`
|
let link = `https://${PUBLIC_HOSTNAME}${base}/post/${post.postId}.md`
|
||||||
|
|
||||||
i++
|
i++
|
||||||
items += `
|
items += `
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue