You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a blog software completely written in C# / Blazor. The aim is to have it configurable as possible.
6
+
This is a blog software completely written in C# / Blazor. The aim is to have it configurable as possible.
6
7
7
8
## How does it work
8
-
The basic idea is that the content creator writes his posts in markdown language (like this readme file).
9
+
10
+
The basic idea is that the content creator writes his posts in markdown language (like this readme file).
9
11
The markdown will then be translated into HTML and displayed to the client. This gives an easy entry to writing posts with all the flexibility markdown has.
10
12
This also includes source code snippets. Highlighting is done via [highlight.js](https://highlightjs.org/) with the GitHub theme.
@@ -97,44 +109,53 @@ The appsettings.json file has a lot of options to customize the content of the b
97
109
| PatreonName | string | Enables the "Become a patreon" button that redirects to patreon.com. Only pass the user name (public profile) as user name. |
98
110
99
111
## Storage Provider
112
+
100
113
Currently, there are 5 Storage-Provider:
101
-
* InMemory - Basically a list holding your data (per request). If the User hits a hard reload, the data is gone.
102
-
* RavenDb - As the name suggests for RavenDb. RavenDb automatically creates all the documents, if a database name is provided.
103
-
* Sqlite - Based on EF Core, it can be easily adapted for other Sql Dialects. The tables are automatically created.
104
-
* SqlServer - Based on EF Core, it can be easily adapted for other Sql Dialects. The tables are automatically created.
105
-
* MySql - Based on EF Core - also supports MariaDB.
114
+
115
+
- InMemory - Basically a list holding your data (per request). If the User hits a hard reload, the data is gone.
116
+
- RavenDb - As the name suggests for RavenDb. RavenDb automatically creates all the documents, if a database name is provided.
117
+
- Sqlite - Based on EF Core, it can be easily adapted for other Sql Dialects. The tables are automatically created.
118
+
- SqlServer - Based on EF Core, it can be easily adapted for other Sql Dialects. The tables are automatically created.
119
+
- MySql - Based on EF Core - also supports MariaDB.
106
120
107
121
The default (when you clone the repository) is the `InMemory` option. That means every time you restart the service, all posts and related objects are gone.
108
122
109
123
## Comment Section
110
-
For comments, the blog is using [giscus](https://giscus.app/) or [disqus](https://disqus.com/).
124
+
125
+
For comments, the blog is using [giscus](https://giscus.app/) or [disqus](https://disqus.com/).
111
126
112
127
**Note**: Please only register one service or provide the configuration for one of the nodes. The given configuration shows both only for demonstrational purposes.
113
128
If multiple comment plugins are configured at the same time a warning will be displayed under the blog post itself.
114
129
115
130
### Giscus
131
+
116
132
To provide the necessary values head over to https://giscus.app/ and go to the configuration section.
117
133
There you can enter all the information. You will find a detailed guide on the site.
118
134
119
135
In short:
120
-
* You need a public repository where the comments are hosted. Recommendation: Create a new repository just for the comments
121
-
* You have to link the [giscus app](https://github.com/apps/giscus) to at least the repository where the comments are hosted
122
-
* 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)
123
-
)
124
-
125
-
After you configured everything on the site, you get the `<script>` tag which you could embed. The blog needs the following information.
126
-
127
-
Here you can find an example. This is how the script tag looks on giscus.
128
-
```javascript
129
-
<script src="https://giscus.app/client.js"
130
-
data-repo="your_username/reponame"
131
-
data-repo-id="M9/ab=="
132
-
data-category="General"
133
-
data-category-id="AbC==/8_D"
134
-
async>
135
-
</script>
136
+
137
+
- You need a public repository where the comments are hosted. Recommendation: Create a new repository just for the comments
138
+
- You have to link the [giscus app](https://github.com/apps/giscus) to at least the repository where the comments are hosted
139
+
- 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)
140
+
)
141
+
142
+
After you configured everything on the site, you get the `<script>` tag which you could embed. The blog needs the following information.
143
+
144
+
Here you can find an example. This is how the script tag looks on giscus.
145
+
146
+
```javascript
147
+
<script
148
+
src="https://giscus.app/client.js"
149
+
data-repo="your_username/reponame"
150
+
data-repo-id="M9/ab=="
151
+
data-category="General"
152
+
data-category-id="AbC==/8_D"
153
+
async
154
+
></script>
136
155
```
156
+
137
157
Now you can copy/paste that information into the appsettings.json. With the given information above your appsettings.json looks like this:
158
+
138
159
```json
139
160
"Giscus": {
140
161
"Repository": "your_username/reponame",
@@ -145,32 +166,40 @@ Now you can copy/paste that information into the appsettings.json. With the give
145
166
```
146
167
147
168
### Disqus
169
+
148
170
For disqus you only need the short name (site-name) which you can find for example under your [home-tab](https://disqus.com/home/).
149
171
150
172
## Authorization
173
+
151
174
There is only one real mechanism enabled via Auth0. For more information go to: https://auth0.com/docs/applications
152
175
153
176
The main advantage of Auth0 is the easily configurable dashboard on their website.
154
177
For testing purposes, you can use `services.UseDummyAuthentication();`. This allows every user, who presses Login, to be logged in.
155
178
156
179
## Donations
180
+
157
181
The blog software allows you to integrate via different micro-transaction services. The following chapter will show you how to set up donations.
158
182
159
183
### Ko-fi
184
+
160
185
You can use [Ko-fi](https://Ko-fi.com/) as a payment service to receive donations. To acquire the `KofiToken` as seen in the config above, head to [widgets page](https://Ko-fi.com/manage/widgets), click on "Ko-fi Button".
161
186
Now choose "Image" as the type. In the field below under `Copy & Paste Code` you see an `<a href='https://ko-fi.com/XYZ'` tag. Just take the `XYZ` part and put it into `KofiToken`.
162
187
163
188
### GitHub Sponsor
189
+
164
190
Enables the usage of [GitHub Sponsors](https://github.com/sponsors) as a payment service to receive donations. Only pass in your username. The button will use the following url: `https://github.com/sponsors/{your-user-name}`.
165
191
166
192
## Search Engine Optimization (SEO)
193
+
167
194
The blog includes some of the most important tags to get indexed by a crawler. Furthermore, some aspects of the Open Graph specification are implemented.
168
195
169
196
### Robots.txt
197
+
170
198
In the wwwroot/ you can find a default robots.txt. It allows the site gets completely indexed. If you want to tweak that behavior - feel free.
171
-
Also, you can provide a sitemap.xml to get a better ranking. The blog can create a sitemap.xml on its own. For that log in and click on the `Admin` button in the navigation bar and afterward on `Sitemap`. There you can let the blog create a new one for you. This is especially helpful after you created a new blog post to make it easier for indexers like Google.
199
+
Also, you can provide a sitemap.xml to get a better ranking. The blog can create a sitemap.xml on its own. For that log in and click on the `Admin` button in the navigation bar and afterward on `Sitemap`. There you can let the blog create a new one for you. This is especially helpful after you created a new blog post to make it easier for indexers like Google.
172
200
173
201
### Open Graph Tags
202
+
174
203
To get better results when for example shared via LinkedIn some of the `<meta property="og:tag">` tags are implemented.
175
204
176
205
The following tags are set depending on the page:
@@ -191,13 +220,15 @@ Furthermore, the following tags are set:
191
220
|<meta name="keyword" content="" />| not set | Tags defined in the Blog Post |
192
221
193
222
## RSS Feed
223
+
194
224
This blog also offers an RSS feed ([RSS 2.0 specification](https://validator.w3.org/feed/docs/rss2.html)), which can be consumed by your users or programs like Feedly. Just append `feed.rss` to your URL or click on the RSS feed icon in the navigation bar to get the feed. The RSS feed does not expose the whole content of a given blog post but its title and short description including some other tags like preview image, publishing date and so on.
195
225
196
226
## Host Web in Docker containers
197
227
198
228
### Server configuration
199
229
200
230
To deploy with docker, you need to modify the variables in the docker-compose.yml file.
Auth0 is a prominent provider of OpenID Connect (OIDC) services, which is an authentication protocol built on top of OAuth 2.0. OpenID Connect is specifically designed for identity layer applications and provides a standardized way for users to authenticate and authorize themselves on websites or applications while allowing third-party applications to access limited user information in a secure manner.
4
+
5
+
For more information go to: https://auth0.com/docs/applications
6
+
7
+
### Configuration
8
+
9
+
In `appsettings.json` change the `AuthProvider` to `Auth0`
When it comes to authentication and authorization, we employ [OpenID Connect](https://openid.net/developers/how-connect-works/) as our preferred method. The primary benefit of utilizing an OpenID Connect-based provider is the conveniently customizable dashboard accessible through their website. For the sake of testing, you have the option to employ the UseDummyAuthentication(); service. This grants every user who clicks "Login" immediate access, effectively logging them in. Here are the platforms we support:
0 commit comments