Skip to content

Commit

Permalink
debug compare
Browse files Browse the repository at this point in the history
  • Loading branch information
wassfila committed Jun 15, 2024
1 parent 2038ac1 commit dd67202
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/assets/[...path].js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export async function GET({params,props}){
if(config.copy_assets){
return new Response('Not supported and not needed with copy_assets = true', { status: 404 });
}
console.log(`assets> params.path '${params.path}'`)
console.log(`\nassets> params.path '${params.path}'`)
console.log(`assets> props.asset.path '${props.asset.path}'`)
let imagePath = resolve(join(config.content_path,params.path));
imagePath = remove_base(imagePath)
if(params.path.startsWith("/")){
Expand Down Expand Up @@ -37,12 +38,12 @@ export async function getStaticPaths(){
}

const asset_list = await load_json_abs(join(config.collect_content.outdir,'asset_list.json'))
console.log(asset_list.map(entry=>entry.path))
const assets = asset_list.filter((asset)=>(
((asset.type != "link") && (Object.hasOwn(asset,"path"))) ||
((asset.type == "link") && (!asset.external) && asset.filter_ext))
).map((entry)=>(entry))
console.log(`serving API endpoit ${assets.length} assets`)
console.log(assets.map(entry=>entry.path))
return assets.map((asset)=>({
params:{path:asset.path},
props:{asset}
Expand Down

0 comments on commit dd67202

Please sign in to comment.