-
-
Notifications
You must be signed in to change notification settings - Fork 189
6. DasBlog architecture
One of the primary goals of this project is to preserve the essence of the original DasBlog Blogging Engine while taking advantage of the modern cross platform goodness of ASP.NET Core.
DasBlog Core currently targets .NET 10 and the folder structure of the site remains consistent with DasBlog classic consisting of Content, Config and Themes folders.
The solution is organized into layered projects:
| Project | Role |
|---|---|
| DasBlog.Web | ASP.NET Core web application, entry point (Program.cs), controllers, tag helpers, views |
| DasBlog.Services | Core services: configuration, scheduling (Coravel), RSS/Atom, site management, ActivityPub |
| DasBlog.Managers | Business logic: BlogManager, CommentManager, ThemeManager, CategoryManager, SearchManager, etc. |
| DasBlog.Core | Shared types, extensions, security models, configuration enums |
| newtelligence.DasBlog.Runtime | Legacy data access layer: IBlogDataService, Entry/Comment models, XML serialization |
Dependency flow: DasBlog.Web → DasBlog.Services / DasBlog.Managers → newtelligence.DasBlog.Runtime
The Content folder contains all the files necessary for your blog posts. Blog data is stored as XML files via IBlogDataService, with the file name format 2019-08-15.dayentry.xml. Each file contains serialized Entry objects including post content, metadata, and associated comments. Images uploaded during post creation and editing are stored in a binary sub folder.
Activity logs are written to a separate Logs folder via ILoggingDataService.
The Content folder structure is compatible with the original dasBlog Engine and any files can be directly copied in place.
The original dasBlog Engine had three configuration files and we have emulated the essence, however, they may not be fully compatible.
- site.{Environment}.config
- meta.{Environment}.config
- siteSecurity.{Environment}.config
For convenience during deployment files are named based on the environment, for example, for a "Production" environment dasBlog core looks for "site.Production.config".
We have also added a configuration file designed to redirect from old dasblog URLs (.aspx), so if you are coming from old dasBlog URLs you automatically get redirected (HTTP 301) to the new URL format.
- IISUrlRewrite.{Environment}.config
Configuration sources are loaded in the following order (later sources override earlier ones):
-
Config/site.config(required) thenConfig/site.{Environment}.config(optional) -
Config/meta.config(required) thenConfig/meta.{Environment}.config(optional) -
appsettings.json(required) thenappsettings.{Environment}.json(optional) -
Config/oembed-providers.json(optional) - Environment variables
Sub folders in the Themes folder each represents the name and the content of a theme. The default distribution of dasBlog core comes with built-in themes (darkly, dasblog, flamingo, kindofblue, median) but you can always add more. To switch themes navigate to /admin/themes and click Set as Active on the theme you want to use.
Additional information on how to create and configure themes can be found here.
The admin panel includes a theme editor at /admin/themes with the following capabilities:
- View and edit theme files (.cshtml, .css, .js, etc.) with CodeMirror syntax highlighting
- Versioned backups are created automatically when saving, with a 3-backup retention limit
- Revert to a previous backup version
- Create new custom themes from any existing theme as a template
- Built-in themes are read-only and cannot be modified directly; create a custom copy first
Theme files are validated server-side before saving via IThemeContentValidator.
DasBlog Core uses ASP.NET Core Identity with cookie-based authentication:
- Login at
/account/loginwith sliding expiration cookies - Custom
DasBlogPasswordHasherbridges the legacy password format - Role-based authorization controls admin access (edit posts, manage comments, site settings)
- Tag helpers like
dasblog-authorizedanddasblog-unauthorizedcontrol visibility of UI elements based on auth state (details here)
If you have additional questions or concerns please submit an issue.