SSG behavior #1687
Unanswered
railty
asked this question in
Help & Questions
SSG behavior
#1687
Replies: 2 comments 2 replies
-
Anyone? Let me clarify my question.
Thanks |
Beta Was this translation helpful? Give feedback.
1 reply
-
I agree, it seems I did something wrong, can amyone give a tutoral on setting up SSG? I basicly did
` I don't think "dist/client/about/index.pageContext.json" should be there, it should all in "dist/client/about/index.html" What I missed? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried SSG on a brand new scaffold vike app, the generated files are index.html and index.pageContext.json.
Is this by design? how is this affect SEO
I expect a html with the content embeded, not dynamic loaded.
Steps:
`
export { onBeforePrerenderStart }
function minimize(movies) {
return movies.map((movie) => {
const { title, release_date, id } = movie
return { title, release_date, id }
})
}
async function onBeforePrerenderStart() {
const response = await fetch('https://brillout.github.io/star-wars/api/films.json')
const moviesData = await response.json()
const movies = minimize(moviesData)
//console.log(movies);
const moviePageURLs = movies.map(movie => '/star-wars/' + movie.id)
console.log(moviePageURLs);
return moviePageURLs
}
`
and I got `
ls dist\client\star-wars\1
Mode LastWriteTime Length Name
-a---- 6/10/2024 11:20 PM 2169 index.html
-a---- 6/10/2024 11:20 PM 410 index.pageContext.json
`
Beta Was this translation helpful? Give feedback.
All reactions