In one of the recent projects there was this requirement to create a FAQ page for a small application. The change was not planned and came up during the final stages of the project.
I took it in the same spirit as what I do for a home page. I did not plan to use SSR or a static-site generator, but rather leaned back on the excellent ‘prerender-spa-plugin’.
prerender-spa-plugin will take care of pre-rendering the content, and I don’t need to worry on the performance or the SEO side of things.
(PS: I have not used Nuxt in my real-world project yet. Though I sometimes wonder why. This would have been far simpler.)
The next problem was to create FAQs in a page.
The ideal solution was to have FAQs sitting as static content (e.g. a CSV file) processed during render (or, during generation of the static page). Or, FAQs coming in from a database table that can be changed by an admin using the ‘admin’ application.
With the given time constraint and considering the fact that FAQ will not change for months at end, I decided on a far simpler but not-quite-scalable approach - included the static FAQs within a component and threw in custom CSS to format the FAQs.
Does the solution work? Yes.
Was the client happy? Yes.
Am I proud of what I did? Not quite.