-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Keep in mind this is still in development, and design might feel a bit clunky. This plugin for now only contains three blocks: blog-list - which lists blog articles article - which displays the article based on its id admin - which allows you to write new articles
Google sign in must be enabled on Firebase since that is the only available login currently. To successfully write an article to Firebase you would need to set access rights on the console. Please read the notes at the bottom of this page for explanation how can this be done if you have no experience with Firebase.
Hopefully you already have Mobirise installed. To add firebase-block plugin to your mobirise, download the plugin here first: firebase-blocks.mbrext
After that open Themes and extensions and import the downloaded file. Firebase Block plugin should now appear in the list:
Then first you have to add a Firebase snippet to your project. After creating your Firebase project you will need to get the snippet by simply clicking on web icon.
Paste the snippet under Firebase snippet block that appears when you turn it on under Site settings
Now when editing the site you can add new Firebase blocks. You can find them under Ariticle category, or under Extension. First one is admin, second one is article and the last one is blog list.
When adding blog list block, you must define a page where article itself can be read by clicking on Read more button
To successfully write an article to Firebase you must set read privileges. Since anyone who has google account can login to your page, you must somehow restrict access. 1. First you must enable google login under **Authentication **-> Sign in Method in Firebase console 2. Login into your published site Admin (this will create a user in your console) 3. After you login in Firebase console **Authentication **-> **Users **you user will appear here Copy User **UID **- you will need it shortly 4. Go to **Database **-> Rules Create the following rule (where UID is the user id you pasted earlier):
{
"rules": {
".read": true,
".write": false,
"posts": {
".write": "auth.uid === 'UID'",
".indexOn": ["order"]
}
}
}
This also ads an index to order. This allows for indexing the database because posts are listed backwards on this field
If you would like to help in developing some more blocks like this (I would really appreciate some help regarding the design), please contact me.