TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Is there a way to generate static sites with content from DB?

1 pointsby kannangceabout 3 years ago
For one of my use case, we have to render pages generated from almost a static data available in DB.<p>I&#x27;m wondering if we can have hugo(&#x2F;any static site) to use DB as a datasource to get the data from DB for site generation. Do we have a plugin that could support that?

2 comments

jerfabout 3 years ago
Hugo is cool and all, but in the end it isn&#x27;t that hard nowadays to bash together libraries to get whatever you want do, in whatever language you like, with whatever logic you like.<p>If you have an existing Hugo install, the easiest thing to do is write code to output your DB into static files, then run the Hugo process. A batch file or shell script can easily be used to automate the publication process. Trying to hack Hugo to directly use the DB is not worth it.
WalterGRabout 3 years ago
What does Hugo use as its data source by default?<p>(You should put &quot;Ask HN: &quot; at the beginning of your submission&#x27;s title.)