Skip to content

Commit 02173a5

Browse files
committed
Updated Readme about giscus
1 parent 1695119 commit 02173a5

File tree

1 file changed

+37
-8
lines changed

1 file changed

+37
-8
lines changed

Readme.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ The appsettings.json file has a lot of options to customize the content of the b
4343
"Name": "Steven Giesel",
4444
"Heading": "Software Engineer",
4545
"ProfilePictureUrl": "assets/profile-picture.webp"
46+
},
47+
"Giscus": {
48+
"Repository": "github/repo",
49+
"RepositoryId": "id",
50+
"Category": "general",
51+
"CategoryId": "id"
4652
}
4753
}
4854

@@ -69,8 +75,7 @@ The appsettings.json file has a lot of options to customize the content of the b
6975
| Name | string | Name, which is displayed on top of the profile card |
7076
| Heading | string | Displayed under the name. For example job title |
7177
| ProfilePictureUrl | string | Displayed profile picture |
72-
73-
The usage might shift directly into the extension methods, where they are used.
78+
| Giscus | node | Enables the comment section. If left empty the comment secion will not be shown. For more information checkout the section about comments down below |
7479

7580
## Storage Provider
7681
Currently there are 4 Storage-Provider:
@@ -79,13 +84,37 @@ Currently there are 4 Storage-Provider:
7984
* Sqlite - Based on EF Core, so it can be easily adapted for other Sql Dialects
8085
* SqlServer - Based on EF Core, so it can be easily adapted for other Sql Dialects
8186

82-
### Using
83-
To use one of those just use the extension method in the Startup.cs in `ConfigureServices`:
84-
```csharp
85-
services.UseSqlAsStorageProvider();
87+
## Comment Section
88+
For comments the blog is using [giscus](https://giscus.app/). To provide the necessary values head over to https://giscus.app/ and go to the configuration section.
89+
There you can enter all the information. You will find a detailed guide on the site.
90+
91+
In short:
92+
* You need a public repository where the comments are hosted. Recommendation: Create a new repository just for the comments
93+
* You have to link the [giscuss app](https://github.com/apps/giscus) to at least the repository where the comments are hosted
94+
* You have to enable the discussion feature in the repository (see (here)[https://docs.github.com/en/github/administering-a-repository/managing-repository-settings/enabling-or-disabling-github-discussions-for-a-repository]
95+
)
96+
97+
After you configured everything on the site, you get the `<script>` tag which you could embed. The blog needs the following information.
98+
99+
Here you can find an example. This is how the script tag looks on giscus.
100+
```javascript
101+
<script src="https://giscus.app/client.js"
102+
data-repo="your_username/reponame"
103+
data-repo-id="M9/ab=="
104+
data-category="General"
105+
data-category-id="AbC==/8_D"
106+
async>
107+
</script>
108+
```
109+
Now you can copy/paste those information into the appsettings.json. With the given information abobe your appsettings.json looks like this:
110+
```json
111+
"Giscus": {
112+
"Repository": "your_username/reponame",
113+
"RepositoryId": "M9/ab==",
114+
"Category": "General",
115+
"CategoryId": "AbC==/8_D"
116+
}
86117
```
87-
88-
It is only one storage provider at a time allowed. Registering multiple will result in an exception.
89118

90119
## Authorization
91120
There is only one real mechanism enabled via Auth0. For more information go to: https://auth0.com/docs/applications

0 commit comments

Comments
 (0)