Questions tagged [static-site-generation]

Static Site Generators (SSG) are frameworks that build websites from static content. For example, one can build an online blog from a list of text files.

178 questions
0
votes
2 answers

how can i convert a ssg page into ssr in NextJs

I am trying to deploy a NextJs app on vercal in which Home Page or Index Page is building statically(SSG) but I want it as Server Side Render(SSR) because it has a Feed Component(CSR) Which fetches data from database at each request and display it…
0
votes
0 answers

Vue 3 SSG with client-side rendering

A simple question. Is this possible with Vue 3 (and Vite preferably)? Suppose we have 4 pages: Home (/) About (/about) Pricing (/pricing) Contact (/contact) Is it possible, to prerender each one of these pages so if any one of them is accessed by…
hexrw
  • 39
  • 5
0
votes
1 answer

pass parameter inside generateStaticParams function for SSG NextJS

for my SSG page I need to pass a parameter which is language to my api call function which is inside generateStaticParams function, I have stored language inside cookies and I can not access that, is there a way I can pass params to my…
EshgheCode
  • 288
  • 4
  • 19
0
votes
0 answers

npm run build generates a static html with lots of error

So first things first im using the latest next js as of the moment and also the only package im using is headless ui, i also have one component file in components folder. Now i tried making "tabs" using headless ui , now i tried to export it…
0
votes
0 answers

Vite not bundling properly JInja2 project

I'm building a static-generated (SSG) landing page with Vite + Jinja2. I've made a plugin to parse the .html files written in Jinja2 and that works fine during development. However during build, the javascript files included in base.html are totally…
Pithikos
  • 18,827
  • 15
  • 113
  • 136
0
votes
0 answers

Best way to achieve SSG/SSR from a React based page builder

I have a react app which works as a template/site builder(like beaver builder) which can generate react based pages for end users. The generated pages are outputted according to client side rendering. What we want is, the page should be SSG or SSR…
0
votes
1 answer

Is there a way to extract data from prefetch in order to pass as a parameter to another prefetch in React-query

The title says it all, basically. I fetch some data and then I want some additional data, but I need an ID value which I can only get from the first fetch's data. The whole page is SSG and I was wondering if there is a way to implement this logic…
PCPbiscuit
  • 417
  • 5
  • 16
0
votes
0 answers

next 13 ssg with the fetch api

i am trying to do a ssg for one of my pages with the fetch api that my api call async function test() { const res = await fetch("https://som-url.com/myFunc", { cache: "force-cache" }); const json = await res.json(); return json; } now I am…
0
votes
2 answers

Vite run custom script when file changed

I'm trying to use an external script to create static-generated content (SSG) but can't figure out how to plug it into Vite. I've looked into plugins like vite-plugin-run but that dosn't seem to be able and get the file that changed to pass into the…
Pithikos
  • 18,827
  • 15
  • 113
  • 136
0
votes
0 answers

3 different links in a markdown note are generated as 1 href link

When the file index.md is generated to be the file index.html, 3 different links to 3 different files are generated as 1 same href link. Here are the original links: [[./ Tài nguyên/ Giới thiệu về Obsidian/index| Giới thiệu về Obsidian]] [[./⚔️ Lớp…
Ooker
  • 1,969
  • 4
  • 28
  • 58
0
votes
1 answer

How to embed OpenLayers 7.3.0 on a Jekyll layout?

I would like to use OpenLayers to embed a map in a Jekyll layout. (The whole site is hosted on GitLab pages and built with a GitLab CI workflow.) To this end, I created a file in _includes with a div to hold the map, and an inline script that…
user149408
  • 5,385
  • 4
  • 33
  • 69
0
votes
0 answers

Next Js dynamic routing for url, based on hypens ex. /slug-page1 and /slug-page2

Hi I am new to Next Js also first time posting a question on stackoverflow so please ignore the mistakes. Not much idea of Next JS works. I have a requirement where I need to use dynamic routing but the route is based on slug content. For example i…
0
votes
0 answers

SSG from YAML with SvelteKit using Vite, warning in fs

I am doing SSG with SvelteKit, I am using CoffeeScript, and Pug. For a MWE, I have the following content.yaml - title: Home link: / - title: Services link: /services - title: Contact link: /contact I have a utils.coffee file to read that file…
Trylks
  • 1,458
  • 2
  • 18
  • 31
0
votes
1 answer

How can I add pages containing the ``publish`` variable in zola?

I would like to be able to add to the list of published articles only documents that contain the variable publish = true in the file header. I have added to each article the following lines in the header: foo.md: +++ title = "Foo" date =…
luarpy
  • 3
  • 3
0
votes
0 answers

Is it possible to use the Google maps api to load maps with Static Site Generation in Next?

I have a page that is using a component that uses the google maps api to load a map, I want to know if I can use Next's SSG to make fewer requests, in order to save money This is the GoogleMaps component: import { useMemo, useEffect, useRef,…