Skip to content

Commit f5cf43a

Browse files
manishtiwari25linkdotnet
authored andcommitted
Added setup
1 parent fbc6c94 commit f5cf43a

File tree

4 files changed

+135
-127
lines changed

4 files changed

+135
-127
lines changed

Readme.md

Lines changed: 1 addition & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -23,90 +23,7 @@ This also includes source code snippets. Highlighting is done via [highlight.js]
2323
- [Search Engine Optimization (SEO)](./docs/SEO/Readme.md)
2424
- [Setup](./docs/Setup/Readme.md)
2525

26-
## Setup
27-
28-
Just clone this repository and you are good to go. There are some settings you can tweak. The following chapter will guide you
29-
through the possibilities.
30-
31-
### appsettings.json
32-
33-
The appsettings.json file has a lot of options to customize the content of the blog. The following table shows which values are used when.
34-
35-
```json
36-
{
37-
"BlogName": "linkdotnet",
38-
"BlogBrandUrl": "http//some.url/image.png",
39-
"GithubAccountUrl": "",
40-
"Social": {
41-
"GithubAccountUrl": "",
42-
"LinkedInAccountUrl": "",
43-
"TwitterAccountUrl": ""
44-
},
45-
"Introduction": {
46-
"Description": "Some nice text about yourself. Markup can be used [Github](https://github.com/someuser/somerepo)",
47-
"BackgroundUrl": "assets/profile-background.webp",
48-
"ProfilePictureUrl": "assets/profile-picture.webp"
49-
},
50-
"PersistenceProvider": "InMemory",
51-
"ConnectionString": "",
52-
"DatabaseName": "",
53-
"Auth0": {
54-
"Domain": "",
55-
"ClientId": "",
56-
"ClientSecret": ""
57-
},
58-
"BlogPostsPerPage": 10,
59-
"AboutMeProfileInformation": {
60-
"Name": "Steven Giesel",
61-
"Heading": "Software Engineer",
62-
"ProfilePictureUrl": "assets/profile-picture.webp"
63-
},
64-
"Giscus": {
65-
"Repository": "github/repo",
66-
"RepositoryId": "id",
67-
"Category": "general",
68-
"CategoryId": "id"
69-
},
70-
"Disqus": {
71-
"Shortname": "blog"
72-
},
73-
"KofiToken": "ABC123",
74-
"GithubSponsorName": "your-tag-here",
75-
"ShowReadingIndicator": true,
76-
"PatreonName": "your-tag-here"
77-
}
78-
```
79-
80-
| Property | Type | Description |
81-
| ------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
82-
| BlogName | string | Name of your blog. Is used in the navbar and is used as the title of the page. Will not be shown when `BlogBrandUrl` is set |
83-
| BlogBrandUrl | string | The url to an image which is used as a brand image in the navigation bar. If not set or `null` the `BlogName` will be shown |
84-
| Social | node | Represents all possible linked social accounts |
85-
| GithubAccountUrl | string | Url to your github account. If not set it is not shown in the introduction card |
86-
| LinkedInAccountUrl | string | Url to your LinkedIn account. If not set it is not shown in the introduction card |
87-
| TwitterAccountUrl | string | Url to your Twitter account. If not set it is not shown in the introduction card |
88-
| Introduction | | Is used for the introduction part of the blog |
89-
| Description | MarkdownString | Small introduction text for yourself. This is also used for `<meta name="description">` tag. For this the markup will be converted to plain text |
90-
| BackgroundUrl | string | Url or path to the background image. (Optional) |
91-
| ProfilePictureUrl | string | Url or path to your profile picture |
92-
| PersistenceProvider | string | Declares the type of the storage provider (one of the following: `SqlServer`, `Sqlite`, `RavenDb`, `InMemory`, `MySql`). More in-depth explanation down below |
93-
| ConnectionString | string | Is used for connection to a database. Not used when `InMemoryStorageProvider` is used |
94-
| DatabaseName | string | Name of the database. Only used with `RavenDbStorageProvider` |
95-
| Auth0 | | Configuration for setting up Auth0 |
96-
| Domain | string | See more details here: https://manage.auth0.com/dashboard/ |
97-
| ClientId | string | See more details here: https://manage.auth0.com/dashboard/ |
98-
| ClientSecret | string | See more details here: https://manage.auth0.com/dashboard/ |
99-
| BlogPostsPerPage | int | Gives the amount of blog posts loaded and display per page. For more the user has to use the navigation |
100-
| AboutMeProfileInformation | node | Sets information for the About Me Page. If omitted the page is disabled completely |
101-
| Name | string | Name, which is displayed on top of the profile card |
102-
| Heading | string | Displayed under the name. For example job title |
103-
| ProfilePictureUrl | string | Displayed profile picture |
104-
| Giscus | node | Enables the comment section via giscus. If left empty the comment secion will not be shown. For more information checkout the section about comments down below |
105-
| Disqus | node | Enables the comment section via disqus. If left empty the comment secion will not be shown. For more information checkout the section about comments down below |
106-
| KofiToken | string | Enables the "Buy me a Coffee" button of Kofi. To aquire the token head down to the "Kofi" section |
107-
| GithubSponsorName | string | Enables the "Github Sponsor" button which redirects to GitHub. Only pass in the user name instead of the url. |
108-
| ShowReadingIndicator | boolean | If set to `true` (default) a circle indicates the progress when a user reads a blog post (without comments). |
109-
| PatreonName | string | Enables the "Become a patreon" button that redirects to patreon.com. Only pass the user name (public profile) as user name. |
26+
|
11027

11128
## Storage Provider
11229

@@ -167,49 +84,6 @@ Furthermore, the following tags are set:
16784

16885
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.
16986

170-
## Host Web in Docker containers
171-
172-
### Server configuration
173-
174-
To deploy with docker, you need to modify the variables in the docker-compose.yml file.
175-
176-
```yml
177-
volumes:
178-
- /root/.aspnet/DataProtection-Keys:/root/.aspnet/DataProtection-Keys
179-
- ./Blog.db:/app/Blog.db # Sqlite datebase consistent with appsettings.json
180-
- /root/aspnetapp.pfx:/app/aspnetapp.pfx # ssl certificate
181-
environment:
182-
- ASPNETCORE_URLS=http://+:80;https://+:443
183-
- ASPNETCORE_HTTPS_PORT=80
184-
- ASPNETCORE_Kestrel__Certificates__Default__Password= # Your certificate password
185-
- ASPNETCORE_Kestrel__Certificates__Default__Path=/app/aspnetapp.pfx
186-
- ASPNETCORE_ENVIRONMENT=Production
187-
```
188-
189-
After modifying the settings, you can use the docker command `docker compose up -d`
190-
Deploy the web.
191-
If you don't use HTTPS, you can remove the related options.
192-
SQL Server
193-
194-
If you use SQL Server, you can add an instance in `docker-compose.yml`.
195-
196-
```yml
197-
sql:
198-
image: mcr.microsoft.com/mssql/server:2022-latest
199-
container_name: sql
200-
expose:
201-
- 1433
202-
volumes:
203-
- sqlvolume:/var/opt/mssql
204-
environment:
205-
- ACCEPT_EULA=Y
206-
- MSSQL_SA_PASSWORD= # Your sql password
207-
networks:
208-
- web_net
209-
volumes: # creates a shared data volume named sqlvolume if you use sqlserver
210-
sqlvolume:
211-
```
212-
21387
Note the ConnectionString format of SQL Server needs to be consistent:
21488

21589
```

docs/Setup/Configuration.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
### Configurations
2+
3+
### appsettings.json
4+
5+
The appsettings.json file has a lot of options to customize the content of the blog. The following table shows which values are used when.
6+
7+
```json
8+
{
9+
"BlogName": "linkdotnet",
10+
"BlogBrandUrl": "http//some.url/image.png",
11+
"GithubAccountUrl": "",
12+
"Social": {
13+
"GithubAccountUrl": "",
14+
"LinkedInAccountUrl": "",
15+
"TwitterAccountUrl": ""
16+
},
17+
"Introduction": {
18+
"Description": "Some nice text about yourself. Markup can be used [Github](https://github.com/someuser/somerepo)",
19+
"BackgroundUrl": "assets/profile-background.webp",
20+
"ProfilePictureUrl": "assets/profile-picture.webp"
21+
},
22+
"PersistenceProvider": "InMemory",
23+
"ConnectionString": "",
24+
"DatabaseName": "",
25+
"AuthProvider": "PROVIDER_NAME",
26+
"PROVIDER_NAME": {
27+
"Domain": "",
28+
"ClientId": "",
29+
"ClientSecret": "",
30+
"LogoutUri": ""
31+
},
32+
"BlogPostsPerPage": 10,
33+
"AboutMeProfileInformation": {
34+
"Name": "Steven Giesel",
35+
"Heading": "Software Engineer",
36+
"ProfilePictureUrl": "assets/profile-picture.webp"
37+
},
38+
"Giscus": {
39+
"Repository": "github/repo",
40+
"RepositoryId": "id",
41+
"Category": "general",
42+
"CategoryId": "id"
43+
},
44+
"Disqus": {
45+
"Shortname": "blog"
46+
},
47+
"KofiToken": "ABC123",
48+
"GithubSponsorName": "your-tag-here",
49+
"ShowReadingIndicator": true,
50+
"PatreonName": "your-tag-here"
51+
}
52+
```
53+
54+
| Property | Type | Description |
55+
| --------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
56+
| BlogName | string | Name of your blog. Is used in the navbar and is used as the title of the page. Will not be shown when `BlogBrandUrl` is set |
57+
| BlogBrandUrl | string | The url to an image which is used as a brand image in the navigation bar. If not set or `null` the `BlogName` will be shown |
58+
| Social | node | Represents all possible linked social accounts |
59+
| GithubAccountUrl | string | Url to your github account. If not set it is not shown in the introduction card |
60+
| LinkedInAccountUrl | string | Url to your LinkedIn account. If not set it is not shown in the introduction card |
61+
| TwitterAccountUrl | string | Url to your Twitter account. If not set it is not shown in the introduction card |
62+
| Introduction | | Is used for the introduction part of the blog |
63+
| Description | MarkdownString | Small introduction text for yourself. This is also used for `<meta name="description">` tag. For this the markup will be converted to plain text |
64+
| BackgroundUrl | string | Url or path to the background image. (Optional) |
65+
| ProfilePictureUrl | string | Url or path to your profile picture |
66+
| PersistenceProvider | string | Declares the type of the storage provider (one of the following: `SqlServer`, `Sqlite`, `RavenDb`, `InMemory`, `MySql`). More in-depth explanation down below |
67+
| ConnectionString | string | Is used for connection to a database. Not used when `InMemoryStorageProvider` is used |
68+
| DatabaseName | string | Name of the database. Only used with `RavenDbStorageProvider` |
69+
| [AuthProvider](./../Authorization/Readme.md) | string | |
70+
| [PROVIDER_NAME](./../Authorization/Readme.md) | string | |
71+
| Domain | string | |
72+
| ClientId | string | |
73+
| ClientSecret | string | |
74+
| LogoutUri | string | |
75+
| BlogPostsPerPage | int | Gives the amount of blog posts loaded and display per page. For more the user has to use the navigation |
76+
| AboutMeProfileInformation | node | Sets information for the About Me Page. If omitted the page is disabled completely |
77+
| Name | string | Name, which is displayed on top of the profile card |
78+
| Heading | string | Displayed under the name. For example job title |
79+
| ProfilePictureUrl | string | Displayed profile picture |
80+
| [Giscus](./../Comments/Giscus.md) | node | Enables the comment section via giscus. If left empty the comment secion will not be shown. |
81+
| [Disqus](./../Comments/Disqus.md) | node | Enables the comment section via disqus. If left empty the comment secion will not be shown. |
82+
| KofiToken | string | Enables the "Buy me a Coffee" button of Kofi. To aquire the token head down to the "Kofi" section |
83+
| GithubSponsorName | string | Enables the "Github Sponsor" button which redirects to GitHub. Only pass in the user name instead of the url. |
84+
| ShowReadingIndicator | boolean | If set to `true` (default) a circle indicates the progress when a user reads a blog post (without comments). |
85+
| PatreonName | string | Enables the "Become a patreon" button that redirects to patreon.com. Only pass the user name (public profile) as user name. |

docs/Setup/Docker.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## Host Web in Docker containers
2+
3+
### Server configuration
4+
5+
To deploy with docker, you need to modify the variables in the docker-compose.yml file.
6+
7+
```yml
8+
volumes:
9+
- /root/.aspnet/DataProtection-Keys:/root/.aspnet/DataProtection-Keys
10+
- ./Blog.db:/app/Blog.db # Sqlite datebase consistent with appsettings.json
11+
- /root/aspnetapp.pfx:/app/aspnetapp.pfx # ssl certificate
12+
environment:
13+
- ASPNETCORE_URLS=http://+:80;https://+:443
14+
- ASPNETCORE_HTTPS_PORT=80
15+
- ASPNETCORE_Kestrel__Certificates__Default__Password= # Your certificate password
16+
- ASPNETCORE_Kestrel__Certificates__Default__Path=/app/aspnetapp.pfx
17+
- ASPNETCORE_ENVIRONMENT=Production
18+
```
19+
20+
After modifying the settings, you can use the docker command `docker compose up -d`
21+
Deploy the web.
22+
If you don't use HTTPS, you can remove the related options.
23+
SQL Server
24+
25+
If you use SQL Server, you can add an instance in `docker-compose.yml`.
26+
27+
```yml
28+
sql:
29+
image: mcr.microsoft.com/mssql/server:2022-latest
30+
container_name: sql
31+
expose:
32+
- 1433
33+
volumes:
34+
- sqlvolume:/var/opt/mssql
35+
environment:
36+
- ACCEPT_EULA=Y
37+
- MSSQL_SA_PASSWORD= # Your sql password
38+
networks:
39+
- web_net
40+
volumes: # creates a shared data volume named sqlvolume if you use sqlserver
41+
sqlvolume:
42+
```

docs/Setup/Readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Setup
2+
3+
Just clone this repository and you are good to go. There are some settings you can tweak. The following chapter will guide you
4+
through the possibilities.
5+
6+
- [Configurations](Configuration.md)
7+
- [Docker](Docker.md)

0 commit comments

Comments
 (0)