Skip to content

4. Designing a theme

Mark Downie edited this page Jan 27, 2020 · 24 revisions

DasBlog Core uses a templating system based on the Razor Engine to define the layouts of each theme. Each unique theme is contained in a folder in the Themes folder, to select a given Theme update Theme element in the Site Admin page. To create a new theme create a new folder with the following elements:

  • _Layout.cshtml - Top level template for all views in the theme
  • _BlogPageSummary.cshtml - Layout of the blog home page (allows multiple posts to be listed)
  • _BlogPage.cshtml - Layout of an individual blog post
  • custom.css (optional) - Used to apply additional transformation to override the default site CSS.

alt text

The number of posts you can view on the home page is defined by the Front Page Entry Count in admin/settings.

Modifying the look of the home page

Alternatively if you want a differing design aesthetic for the home page you might also consider enabling the Show item Summary in aggregated views in admin/settings. This enables the following layout:

  • _Layout.cshtml - Top level template for all views in the theme
  • _BlogItemSummary.cshtml - Layout of the blog home page in the Summary format
  • _BlogItem.cshtml - Layout of an individual summary blog post

alt text

Note: All supporting Views (outside the Themes folder) assume the use of bootstrap, this may not work for everyone. If you need to override any other Views (e.g. category, archive) they can be copied into your Themes folder and modified as necessary. DasBlog Core will always check your Themes folder first for Views to use.

Additional questions?

If you have additional questions or concerns please submit an issue.

Clone this wiki locally