• Stars
    star
    511
  • Rank 86,473 (Top 2 %)
  • Language
    C#
  • License
    GNU General Publi...
  • Created almost 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The ASP.NET Core blog system of https://edi.wang, runs on Microsoft Azure

Moonglade Blog

Build Status Docker Linux x64 .NET Build Linux

The .NET blog system of edi.wang that runs on Microsoft Azure. Designed for developers, enabling most common blogging features including posts, comments, categories, archive, tags and pages.

đŸ“Ļ Deployment

  • It is recommended to use stable code from Release rather than master branch.

  • It is recommended to enable HTTP/2 support on your web server.

☁ Full Deploy on Azure (Recommend)

This is the way https://edi.wang is deployed, by taking advantage of as many Azure services as possible, the blog can run very fast and secure.

This diagram shows a full Azure deployment for Moonglade for reference.

image

🐋 Quick Deploy on Azure

Use automated deployment script to get your Moonglade up and running in 10 minutes, follow instructions here

🐧 Quick Deploy on Linux without Docker

To quickly get it running on a new Linux machine without Docker, follow instructions here. You can watch video tutorial here.

đŸĩ Development

Tools Alternative
Visual Studio 2022 v17.4+ Visual Studio Code with .NET 7.0 SDK
SQL Server 2022 SQL Server LocalDB, PostgreSQL or MySQL

💾 Setup Database

Moonglade supports three types of database. You can choose from SQL Server, PostgreSQL or MySQL.

SQL Server

Create a SQL Server 2022 database, e.g. moonglade

Set the MoongladeDatabase to your database connection string in appsettings.Development.json

"MoongladeDatabase": "Server=(localdb)\\MSSQLLocalDB;Database=moonglade;Trusted_Connection=True;"

MySQL

Set DatabaseType to MySql

"DatabaseType": "MySql"

Set the MoongladeDatabase to your database connection string in appsettings.Development.json

"MoongladeDatabase": "Server=localhost;Port=3306;Database=moonglade;Uid=root;Pwd=******;"

PostgreSql

Set DatabaseType to PostgreSql

"DatabaseType": "PostgreSql"

Set the MoongladeDatabase to your database connection string in appsettings.Development.json

"MoongladeDatabase": "User ID=****;Password=****;Host=localhost;Port=5432;Database=****;Pooling=true;"

🔨 Build Source

Build and run ./src/Moonglade.sln

  • Admin: https://localhost:1055/admin
  • Default username: admin
  • Default password: admin123

⚙ Configuration

This section discuss system settings in appsettings.[env].json. For blog settings, please use "/admin/settings" UI.

For production, it is strongly recommended to use Environment Variables over appsetting.json file.

🛡 Authentication

Azure Active Directory

See Wiki document

Local Account (Alternative)

Set Authentication:Provider to "Local". You can manage accounts in /admin/settings/account

đŸ–ŧ Image Storage

ImageStorage controls how blog post images are stored.

Azure Blob Storage (Preferred)

You need to create an Azure Blob Storage with container level permission.

{
  "Provider": "azurestorage"
  "AzureStorageSettings": {
    "ConnectionString": "YOUR CONNECTION STRING",
    "ContainerName": "YOUR CONTAINER NAME"
  }
}

When configured the image storage to use Azure Blob, you can take advantage of CDN for your image resources. Just enable CDN in admin settings, the blog will get images from CDN.

Minio Blob Storage (Free)

You need to hava an Minio Server.

"Provider": "miniostorage"
"MinioStorageSettings": {
  "EndPoint": "Minio Server Endpoint(eg:localhost:9600)",
  "AccessKey": "Your Access Key",
  "SecretKey": "Your Secret Key",
  "BucketName": "Your BucketName",
  "WithSSL": false
}

Qiniu Blob Storage (Almost free)

You need to hava an Qiniu cloud account, and use Kodo storage service.

"Provider": "qiniustorage"
"QiniuStorageSettings": {
  "EndPoint": "Your Custom Domain",
  "AccessKey": "Your Access Key",
  "SecretKey": "Your Secret Key",
  "BucketName": "Your BucketName",
  "WithSSL": false
}

File System (Not Recommended)

You can also choose File System for image storage if you don't have a cloud option.

{
  "Provider": "filesystem",
  "FileSystemPath": "C:\\UploadedImages"
}

đŸ¤Ŧ Comment Moderator

📧 Email Notification

If you need email notification for new comments, new replies and pingbacks, you have to setup the Moonglade.Notification Azure Function first, and then enable notification in admin portal.

🔩 Others

🎉 Blog Protocols or Standards

  • RSS
  • Atom
  • OPML
  • Open Search
  • Pingback
  • Reader View
  • FOAF
  • RSD
  • MetaWeblog (Basic Support)
  • Dublin Core Metadata (Basic Support)
  • BlogML - Under triage
  • APML - Not planned
  • Trackback - Not planned

đŸŧ Example Blogs

There are a few individuals already setup thier blogs using Moonglade on Azure (Global or China), Alibaba Cloud, Tencent Cloud, etc.

Just Submit PR or issue if you want your blog to be listed here

More Repositories

1

EnvSetup

Choco script for setting up my dev box.
PowerShell
131
star
2

Elf

The ASP.NET Core URL forward service runs on Microsoft Azure
C#
81
star
3

Edi.Captcha.AspNetCore

The Captcha module used in my blog
C#
65
star
4

Edi.RouteDebugger

ASP.NET Core Middleware to show current route info and all routes
C#
48
star
5

Ruler

WinForms Ruler, renewed with .NET 8
C#
41
star
6

Azure-Blob-Sync

Sync files in Azure Blob Storage to local file system.
C#
14
star
7

RMBCapitalization

HTML
13
star
8

Edi.WordFilter

Module used in my blog system to filter disharmony words.
C#
12
star
9

Edi.TemplateEmail

Configure content template in xml and send email
C#
11
star
10

linux-cheatsheet-for-windows-users

For Windows folks like me who struggle to remember Linux commands
8
star
11

Moonglade.Email

The Azure Function used by my blog (https://edi.wang) to send email notifications
C#
8
star
12

Edi.ImageWatermark

Add watermark to images in .NET
C#
7
star
13

Edi.CreditCardUtils

.NET Standard Lib for Credit Card Number Operations
C#
6
star
14

Edi.AspNetCore.Jwt

JWT authentication library for my own
C#
4
star
15

ChinaDetector

Detect if current code is running on China machine
C#
4
star
16

SyndicationFeedReaderWriter

Continue to maintain dotnet/SyndicationFeedReaderWriter
C#
4
star
17

Edi.PasswordGenerator

Generate secure password
C#
2
star
18

Edi.CacheAside.InMemory

In memory cache helpers for ASP.NET Core for implement cache aside pattern in small and non-distributed apps
C#
2
star
19

Jerry

Jerry Mouse, a static web server based on ASP.NET Core
C#
2
star
20

GenFile

Generate test file at given size
C#
2
star
21

docker-samples

Dockerfile
1
star
22

ediwang

My profile
1
star
23

AzureBlobMimeTypeReset

AzureBlobMimeTypeReset
C#
1
star
24

Calc24-Blazor

24į‚šč§Ŗæŗ•čŽĄįŽ—器 Blazor WASM
C#
1
star