Skip to content

Commit d535881

Browse files
Apply just-the-docs theme for docs-site
1 parent 6ecd840 commit d535881

File tree

8 files changed

+243
-61
lines changed

8 files changed

+243
-61
lines changed

.github/workflows/docs-site.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy docs site
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
paths:
8+
- "docs/**"
9+
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: true
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
working-directory: docs
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
- name: Setup Ruby
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: '3.3' # Not needed with a .ruby-version file
36+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37+
cache-version: 0 # Increment this number if you need to re-download cached gems
38+
working-directory: '${{ github.workspace }}/docs'
39+
- name: Setup Pages
40+
id: pages
41+
uses: actions/configure-pages@v5
42+
- name: Build with Jekyll
43+
# Outputs to the './_site' directory by default
44+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
45+
env:
46+
JEKYLL_ENV: production
47+
- name: Upload artifact
48+
# Automatically uploads an artifact from the './_site' directory by default
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: docs/_site/
52+
53+
# Deployment job
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

docs/Gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source 'https://rubygems.org'
2+
3+
gem "jekyll", "~> 4.4.1" # installed by `gem jekyll`
4+
# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2
5+
6+
gem "just-the-docs", "0.10.1" # pinned to the current release
7+
# gem "just-the-docs" # always download the latest release

docs/_config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
title: Godot Firebase Android
2+
description: Documentation for the GodotFirebaseAndroid plugin
3+
theme: just-the-docs
4+
color_scheme: dark
5+
6+
url: https://syntaxerror247.github.io
7+
8+
aux_links:
9+
Plugin Repository: https://github.com/syntaxerror247/GodotFirebaseAndroid
10+
11+
callouts_level: quiet # or loud
12+
callouts:
13+
highlight:
14+
color: yellow
15+
important:
16+
title: Important
17+
color: blue
18+
new:
19+
title: New
20+
color: green
21+
note:
22+
title: Note
23+
color: purple
24+
warning:
25+
title: Warning
26+
color: red
27+
28+
# Footer content
29+
back_to_top: true
30+
back_to_top_text: "Back to top"
31+
32+
footer_content: 'Copyright &copy; 2025 Anish Mishra. Distributed by an <a href="https://github.com/syntaxerror247/GodotFirebaseAndroid/blob/main/LICENSE">MIT license.</a>'

docs/authentication.md

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: default
3+
title: Authentication
4+
nav_order: 2
5+
---
6+
17
# Authentication
28

39
The Firebase Authentication module in **GodotFirebaseAndroid** supports anonymous login, email/password login, Google login, and account management. Each method emits signals to indicate success or failure.
@@ -7,7 +13,7 @@ The Firebase Authentication module in **GodotFirebaseAndroid** supports anonymou
713
- `auth_success(current_user_data: Dictionary)`
814
Emitted when a user successfully signs in. The dictionary contains user information such as UID, email, etc.
915

10-
- `auth_failure(error_mplugin.emitGodotSignal("realtime_db_value_changed", path, data)essage: String)`
16+
- `auth_failure(error_message: String)`
1117
Emitted when an authentication operation fails.
1218

1319
- `sign_out_success(success: bool)`
@@ -24,8 +30,11 @@ The Firebase Authentication module in **GodotFirebaseAndroid** supports anonymou
2430

2531
## Methods
2632

27-
### `sign_in_anonymously()`
33+
{: .text-green-100 }
34+
### sign_in_anonymously()
35+
2836
Signs in the user anonymously.
37+
2938
**Emits:** `auth_success` or `auth_failure`.
3039

3140
```gdscript
@@ -34,8 +43,11 @@ Firebase.auth.sign_in_anonymously()
3443

3544
---
3645

37-
### `create_user_with_email_password(email: String, password: String)`
46+
{: .text-green-100 }
47+
### create_user_with_email_password(email: String, password: String)
48+
3849
Creates a new user with the given email and password.
50+
3951
**Emits:** `auth_success` or `auth_failure`.
4052

4153
```gdscript
@@ -44,73 +56,95 @@ Firebase.auth.create_user_with_email_password("testuser@email.com", "password123
4456

4557
---
4658

47-
### `sign_in_with_email_password(email: String, password: String)`
59+
{: .text-green-100 }
60+
### sign_in_with_email_password(email: String, password: String)
61+
4862
Signs in a user using email and password credentials.
63+
4964
**Emits:** `auth_success` or `auth_failure`.
5065

5166
```gdscript
5267
Firebase.auth.sign_in_with_email_password("testuser@email.com", "password123")
5368
```
5469
---
5570

56-
### `send_password_reset_email(email: String)`
71+
{: .text-green-100 }
72+
### send_password_reset_email(email: String)
73+
5774
Sends a password reset email to the specified address.
75+
5876
**Emits:** `password_reset_sent`. It also emits `auth_failure` on failure.
5977

6078
```gdscript
6179
Firebase.auth.send_password_reset_email("testuser@email.com")
6280
```
6381
---
6482

65-
### `send_email_verification()`
83+
{: .text-green-100 }
84+
### send_email_verification()
85+
6686
Sends an email verification to the currently signed-in user.
87+
6788
**Emits:** `email_verification_sent`. It also emits `auth_failure` on failure.
6889

6990
```gdscript
7091
Firebase.auth.send_email_verification()
7192
```
7293
---
7394

74-
### `sign_in_with_google()`
95+
{: .text-green-100 }
96+
### sign_in_with_google()
97+
7598
Signs in the user using Google. Ensure Google Sign-In is properly configured in the Firebase console.
99+
76100
**Emits:** `auth_success` or `auth_failure`.
77101

78102
```gdscript
79103
Firebase.auth.sign_in_with_google()
80104
```
81105
---
82106

83-
### `get_current_user_data() -> Dictionary`
107+
{: .text-green-100 }
108+
### get_current_user_data() -> Dictionary
109+
84110
If no user is signed in, returns an dictionary with error.
111+
85112
**Returns** a dictionary containing the currently signed-in user's data.
86113

87114
```gdscript
88115
Firebase.auth.get_current_user_data()
89116
```
90117
---
91118

92-
### `delete_current_user()`
119+
{: .text-green-100 }
120+
### delete_current_user()
121+
93122
Deletes the currently signed-in user.
123+
94124
**Emits:** `user_deleted`. It also emits `auth_failure` on failure.
95125

96126
```gdscript
97127
Firebase.auth.delete_current_user()
98128
```
99129
---
100130

101-
### `is_signed_in() -> bool`
131+
{: .text-green-100 }
132+
### is_signed_in() -> bool
133+
102134
**Returns** `true` if a user is currently signed in, otherwise `false`.
103135

104136
```gdscript
105137
Firebase.auth.is_signed_in()
106138
```
107139
---
108140

109-
### `sign_out()`
110-
Signs out the current user.
141+
{: .text-green-100 }
142+
### sign_out()
143+
144+
Signs out the current user.
145+
111146
**Emits:** `sign_out_success`. It also emits `auth_failure` on failure.
112147

113148
```gdscript
114149
Firebase.auth.sign_out()
115150
```
116-
---

docs/firestore.md

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
1+
---
2+
layout: default
3+
title: Cloud Firestore
4+
nav_order: 3
5+
---
6+
17
# Cloud Firestore
28

39
The Cloud Firestore module in **GodotFirebaseAndroid** supports adding, retrieving, updating, and deleting documents, as well as listening for document changes.
410

511
## Signals
612

7-
-`write_task_completed(result: Dictionary)`
13+
- `write_task_completed(result: Dictionary)`
814
Emitted after adding or setting a document.
915

10-
-`get_task_completed(result: Dictionary)`
16+
- `get_task_completed(result: Dictionary)`
1117
Emitted after retrieving a document or a list of documents.
1218

13-
-`update_task_completed(result: Dictionary)`
19+
- `update_task_completed(result: Dictionary)`
1420
Emitted after updating a document.
1521

16-
-`delete_task_completed(result: Dictionary)`
22+
- `delete_task_completed(result: Dictionary)`
1723
Emitted after deleting a document.
1824

19-
-`document_changed(document_path: String, data: Dictionary)`
25+
- `document_changed(document_path: String, data: Dictionary)`
2026
Emitted when a listened document is changed.
2127

2228
**Note**: All signal result dictionaries contain the following keys:
@@ -31,9 +37,11 @@ The Cloud Firestore module in **GodotFirebaseAndroid** supports adding, retrievi
3137

3238
## Methods
3339

34-
### `add_document(collection: String, data: Dictionary)`
40+
{: .text-green-100 }
41+
### add_document(collection: String, data: Dictionary)
3542

3643
Adds a new document to the specified collection with an auto-generated ID.
44+
3745
**Emits:** `write_task_completed`
3846

3947
```gdscript
@@ -42,9 +50,11 @@ Firebase.firestore.add_document("players", {"name": "Alice", "score": 100})
4250

4351
---
4452

45-
### `set_document(collection: String, documentId: String, data: Dictionary, merge: bool = false)`
53+
{: .text-green-100 }
54+
### set_document(collection: String, documentId: String, data: Dictionary, merge: bool = false)
4655

4756
Sets data for a document. If the document exists, it will be overwritten unless `merge` is `true`.
57+
4858
**Emits:** `write_task_completed`
4959

5060
```gdscript
@@ -53,9 +63,11 @@ Firebase.firestore.set_document("players", "user_123", {"score": 150}, true)
5363

5464
---
5565

56-
### `get_document(collection: String, documentId: String)`
66+
{: .text-green-100 }
67+
### get_document(collection: String, documentId: String)
5768

5869
Retrieves a single document from the specified collection.
70+
5971
**Emits:** `get_task_completed`
6072

6173
```gdscript
@@ -64,9 +76,11 @@ Firebase.firestore.get_document("players", "user_123")
6476

6577
---
6678

67-
### `get_documents_in_collection(collection: String)`
79+
{: .text-green-100 }
80+
### get_documents_in_collection(collection: String)
6881

6982
Retrieves all documents in a given collection.
83+
7084
**Emits:** `get_task_completed`
7185

7286
```gdscript
@@ -75,9 +89,11 @@ Firebase.firestore.get_documents_in_collection("players")
7589

7690
---
7791

78-
### `update_document(collection: String, documentId: String, data: Dictionary)`
92+
{: .text-green-100 }
93+
### update_document(collection: String, documentId: String, data: Dictionary)
7994

8095
Updates fields in a document without overwriting the entire document.
96+
8197
**Emits:** `update_task_completed`
8298

8399
```gdscript
@@ -86,9 +102,11 @@ Firebase.firestore.update_document("players", "user_123", {"score": 200})
86102

87103
---
88104

89-
### `delete_document(collection: String, documentId: String)`
105+
{: .text-green-100 }
106+
### `delete_document(collection: String, documentId: String)
90107

91108
Deletes a document from the specified collection.
109+
92110
**Emits:** `delete_task_completed`
93111

94112
```gdscript
@@ -97,9 +115,11 @@ Firebase.firestore.delete_document("players", "user_123")
97115

98116
---
99117

100-
### `listen_to_document(documentPath: String)`
118+
{: .text-green-100 }
119+
### listen_to_document(documentPath: String)
101120

102121
Starts listening to changes on a specific document path.
122+
103123
**Emits:** `document_changed`
104124

105125
```gdscript
@@ -108,12 +128,11 @@ Firebase.firestore.listen_to_document("players/user_123")
108128

109129
---
110130

111-
### `stop_listening_to_document(documentPath: String)`
131+
{: .text-green-100 }
132+
### stop_listening_to_document(documentPath: String)
112133

113134
Stops listening to changes for a document path.
114135

115136
```gdscript
116137
Firebase.firestore.stop_listening_to_document("players/user_123")
117138
```
118-
119-
---

0 commit comments

Comments
 (0)