ivanovx / downr

Dirt-simple markdown blog system built using ASP.NET Core and Razor Pages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

downr5

Dirt-simple markdown blog system built using ASP.NET Core and Razor Pages.

Blogging with downr

Blogging with downr is deliberately very simple: you basically just write Markdown. If you want to customize the style or HTML layout, you have 3 files to edit. Obviously, you can customize it all you want, but if you're simply into blogging with Markdown you never need to look at the source code.

Here are the basic conventions of blogging with downr:

  • The Markdown and media assets for each post are stored in individual folders named according to the posts' slugs
  • Each post must have a YAML header containing post metadata
  • Each post's content is authored in an individual Markdown file named index.md
  • Images and other media are stored in the media subfolder for each post's folder
  • All posts' content are stored in the top-most _posts folder in the repository

Metadata

The top section of each Markdown file must contain a YAML header with some simple metadata elements. All of these elements are required. The YAML below demonstrates this convention.

---
title: Introducing downr5
date: 03-03-2020
categories: downr, blogging
---

Image Path Fix-ups

At run-time, the src attributes for each image in your posts will be fixed automatically. This enables you to edit and preview your content in Visual Studio Code in exactly the same way it'll be rendered once you publish your blog.

From ![Sample post](media/header.png) to <img src="/posts/sample-post/media/header.png" alt="Sample post">

Project Details

  • Initial project structure created using dotnet new downr.
  • The NuGet dependencies:
    • Markdig is used for Markdown-to-HTML conversion.
    • YamlDotNet is used to parse the YAML headers in post Markdown files.
    • The HTML Agility Pack for .NET Core is used for proccessing HTML files.
  • Bower is used to install the client-side JavaScript resources, specifically, Sematic UI, as this is used for the client-side experience construction.
  • Obviously, NPM is being used to install the build resources

Build Docker image

Downr supported Docker and you can built your project image.

  • docker build -t <your username>/downr .
  • docker push <your username>/downr

Run downr docker image localy:

docker run -d -p 80:80 <your username>/downr to run Docker image localy.

About

Dirt-simple markdown blog system built using ASP.NET Core and Razor Pages.


Languages

Language:C# 62.8%Language:HTML 32.3%Language:CSS 4.1%Language:Dockerfile 0.7%Language:JavaScript 0.2%