-
When running the application, we have a search page that shows posts. We return the first 3 pages of post in the getStaticPaths so that we essentially build the first 30 posts during build time and utilize SSG Fallback=true to dynamically build the other ones upon SWR pagination. The interesting piece is the pages built during build time, even with revalidate on, build as an HTML file when viewing source with json config references to an index.json (initiator of other). So the meta-tags are viewable in the view source of the page. For pages built dynamically with SSG Fallback=true, two json configs are returned, one is the index.json (initiator of main-XXXX.json) and one is the .json (initiator of .json). The meta-tag fields aren't viewable in the view source because they appear to be one of the json configs. So the concern is that some of our indexing hardward may not be able to index this meta-data since it is not viewable in the source. Is there something we need to change to expose these meta tags into the HTML for a page even if it is built dynamically? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to solve this. We were using the fallback=true, and interestingly enough when pages that were not built were retrieved via SWR and then clicked on, the pages were completely rendered HTML in the view source. But if you hit the pages directly for the first time, they were initial statically generated pages to fulfill the fallback=true. And those these pages rendered and were parsed correctly in the Elements/Inspector view, the view source had none of our head meta-tags and they were all referenced in next.js files. Once I switched to fallback=unstable_blocking, then the pages were built complete the first time we access the page directly. |
Beta Was this translation helpful? Give feedback.
I was able to solve this.
We were using the fallback=true, and interestingly enough when pages that were not built were retrieved via SWR and then clicked on, the pages were completely rendered HTML in the view source. But if you hit the pages directly for the first time, they were initial statically generated pages to fulfill the fallback=true. And those these pages rendered and were parsed correctly in the Elements/Inspector view, the view source had none of our head meta-tags and they were all referenced in next.js files. Once I switched to fallback=unstable_blocking, then the pages were built complete the first time we access the page directly.