We just want to create a free minimal optimized SEO friendly blog with the help of Firebase
and Vercel
.
We want very minimal set of pages as follows:
- Home page /
- Login page /login
- Logout page /logout
- Create page /create
- Edit page /edit/{slug}
- Article page /{slug}
- Create a Firebase project
- Create a Firestore database and set this rule to protect unauthorized publishing of articles:
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read: if true; allow write: if request.auth != null; } } }
- Create a Firestore storage to store images
- Enable email authentication
- Add a user with email and password so that no one else can write article but you
- Create a web app
- Fork this project
- Host it on Vercel
- Copy Firebase creds of created web app and add them to environment variables on Vercel like below:
PUBLIC_apiKey= PUBLIC_authDomain= PUBLIC_projectId= PUBLIC_storageBucket= PUBLIC_messagingSenderId= PUBLIC_appId= PUBLIC_measurementId=
- Redeploy the project again
Click on pencil icon in header after log in from /login
- After login, click "Create an article" on home page to go to
/create
Save
article. After saving it will redirect to/edit/{new-slug}
- Log in. Visit an article. Click
Edit
orDelete
- Create articles with title
Privacy
,Terms
,About
andAuthor
. Links will also be shown in Footer. - About page's content's first four lines will be shown on Home page at top. Clicking on it will redirect to About page.
- About page's first image will be shown next to header title.
- Author description will be show on right hand side on home page with first image
- Favicon is not available
- No draft stage
- Not using Caching
- Some design issues
- No confirmation for saving/updating an article and no loading state
- 404 page doesn't exist