0

I am working on a project/idea, my use case is for my significant other's blog/craft/recipe website. I want to create a personalized service that uses Firebase to host, and I want people (like my significant other) who have no coding/html/firebase experience to be able to upload new pages when they please (this will be done on the backend with firebase's hosting API, and on the front end with a customized UI and form).

I have most of this worked out, but I have a remaining question that I have been unable to find a direct answer on:

What is the best way to create a new html file, based on a template, just with new information gathered from the above mentioned form?

  • For instance: Given a recipe website, where each recipe has its own page and route. The form above would, theoretically gather all information needed to name this page, and gather all information needed to add to this page to make it complete.
  • I would imagine that I would need to have a template html page and copy then add information to it, upload and serve via Firebase API, etc.

Is there a specific templating engine that assists with this already? I am having a hard time trying to extend the existing templating engines that I know about into this use case.

TL;DR - I know this is a long-winded question, but in the end, I am looking for the best, most efficient way to programmatically create a new HTML file that will be based off of a given template, add custom information, and upload/serve via the firebase API - using Node/Google Cloud Functions, of course.

I do NOT need any code written for me, just looking to be pointed in the right direction, as I have been researching this for about a month prior to asking here, and this has been my last resort - I am just frustrated because I know there is a way to do this, but have been unable to find what I need.

E_C
  • 300
  • 2
  • 10
  • Doubt you need a new file but rather need to use url params to determine what data to retrieve to populate a single template. For example a single user profile template used for every user – charlietfl Apr 04 '19 at 21:42
  • So I could use a document storage database, like firestore, to grab and maintain all information for each "recipe", and then program whatever templating engine I use to grab from specific firestore documents, depending on what url was entered/accessed? – E_C Apr 04 '19 at 21:46
  • Yes absolutely.... – charlietfl Apr 04 '19 at 21:48
  • any specific templating engines in mind here? I was only under the impression I needed a new file for each page, because it appears (to me) that is how firebase creates new url's, with a new file in place (inside the public folder) – E_C Apr 04 '19 at 21:53
  • Might want to look at creating a single page app using a front end framework like react, Angular or Vue. or use a back end template system in Node of which there are numerous ones. – charlietfl Apr 04 '19 at 22:11

0 Answers0