Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
srosset81 committed Jan 22, 2025
1 parent d1675eb commit 6e20001
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
9 changes: 9 additions & 0 deletions public/shapes/shex/Event.shex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX as: <https://www.w3.org/ns/activitystreams#>
PREFIX apshex: <https://activitypods.org/shapes/shex/>

apshex:Event {
a [ as:Event ] ;
as:name xsd:string
}
File renamed without changes.
7 changes: 6 additions & 1 deletion src/pages/shapes/shex/[filename].ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ export const prerender = false;

export const GET: APIRoute = async ({ params }) => {
const turtleData = await fs.readFile(
path.resolve(import.meta.dirname, `../../../content/shape/${params.filename}.shex`),
path.resolve(
import.meta.dirname,
import.meta.env.DEV
? `../../../../public/shapes/shex/${params.filename}.shex`
: `../../../../client/shapes/shex/${params.filename}.shex`
),
{
encoding: 'utf-8'
}
Expand Down
7 changes: 6 additions & 1 deletion src/pages/shapes/trees/[filename].ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export const prerender = false;

export const GET: APIRoute = async ({ request, params }) => {
const turtleData = await fs.readFile(
path.resolve(import.meta.dirname, `../../../content/shapetree/${params.filename}.ttl`),
path.resolve(
import.meta.dirname,
import.meta.env.DEV
? `../../../../public/shapes/trees/${params.filename}.ttl`
: `../../../../client/shapes/trees/${params.filename}.ttl`
),
{
encoding: 'utf-8'
}
Expand Down

0 comments on commit 6e20001

Please sign in to comment.