Automatically Create New Pages in Firebase Hosting on user events(JAVASCRIPT)

后端 未结 1 775
轻奢々
轻奢々 2020-12-12 06:32

I\'m creating a blog Website project using Firebase.

What I want is - Create an entirely new Page for the Blog Posts once a USER creates it.

FOR EXAMPLE -

1条回答
  •  执念已碎
    2020-12-12 07:21

    The following HTML page shows how you can query the Firestore database when the HTML page is opened, based on a value passed as a query string parameter.

    So, you should do as follows:

    • Create a collection named blogPosts in your Firestore database
    • Add a document with, for example, the id best-watches-in-2019 and a field named field1 where you enter any string value
    • Copy the HTML code below and create an HTML page that you save on your computer.
    • Open the page in your brower and add best-watches-in-2019 as query string parameter as folllows: http://yourdirectory/yourpagename.html?contentId=best-watches-in-2019.

    
      
        
        
        
      
    
      
        
    
        
      
    
    

    0 讨论(0)
提交回复
热议问题