Skip to content

EdiWang/Moonglade

Repository files navigation

Moonglade Blog

Moonglade is a personal blogging platform optimized for deployment on Microsoft Azure. It is designed with developers in mind, offering essential blogging features such as posts, comments, categories, archives, tags, and pages.

📦 Deployment Notice

  • Stable Code: Always use the stable code from the Release branch instead of the master branch.

  • Security: Enable HTTPS and HTTP/2 on your web server for enhanced security and performance.

  • Deployment Options: While Azure is recommended, Moonglade Blog can also be deployed on other cloud providers or on-premises environments.

Full Deploy on Azure

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. There is no automated script to deploy it, you need to manually create all the resources.

image

Quick Deploy on Azure (App Service on Linux)

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

🐵 Development

Tools Alternative
Visual Studio 2022 Visual Studio Code with .NET 8.0 SDK
SQL Server 2022 SQL Server LocalDB, PostgreSQL or MySQL

Setup Database

Free version of SQL Server Express would be sufficient for production use.

Database appsettings.json/ConnectionStrings/MoongladeDatabase Example
Microsoft SQL Server Server=(local);Database=moonglade;Trusted_Connection=True;
MySQL Server=localhost;Port=3306;Database=moonglade;Uid=root;Pwd=***;
PostgreSQL User ID=***;Password=***;Host=localhost;Port=5432;Database=moonglade;Pooling=true;

Build Source

Build and run ./src/Moonglade.sln

  • Home page: https://localhost:17251
  • Admin: https://localhost:17251/admin
    • Default username: admin
    • Default password: admin123

⚙ Configuration

This section is for appsettings.json. For other blog settings, please use "/admin/settings" UI.

Authentication

Moonglade is using local account by default, you can manage accounts in /admin/settings/account. You can also use Microsoft Entra ID to login. See Wiki document for setup Microsoft Entra ID.

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.

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
}

File System (Not Recommended)

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

Windows Deployment Example:

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

Linux Deployment Example:

{
  "Provider": "filesystem",
  "FileSystemPath": "/var/UploadedImages"
}

Comment Moderator

Setup Moonglade.ContentSecurity Azure Function to enable comment moderation.

"ContentModerator": {
  "Provider": "",
  "ApiEndpoint": "",
  "ApiKey": ""
}

Email Notification

Setup Moonglade.Email Azure Function to enable email notification for new comments, new replies, webmentions and pingbacks. Then enable notification in admin portal.

"Email": {
  "ApiEndpoint": "",
  "ApiKey": ""
}

Others

🎉 Protocols or Standards

Name Feature Status Service Endpoint
RSS Subscription Supported /rss
Atom Subscription Supported /atom
OPML Subscription Supported /opml
Open Search Search Supported /opensearch
Pingback Social Supported /pingback
Webmention Social Supported /webmention
Reader View Reader mode Supported N/A
FOAF Social Supported /foaf.xml
IndexNow SEO Supported N/A
RSD Service Discovery Deprecated N/A
MetaWeblog Blogging Deprecated N/A
Dublin Core Metadata SEO Basic Support N/A
BlogML Blogging Not planned
APML Social Not planned
Trackback Social Not planned

免责申明

对于中国访客,我们有一份特供的免责申明。请确保你已经阅读并理解其内容:免责申明(仅限中国访客)