Giter Site home page Giter Site logo

amy1105 / moonglade Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ediwang/moonglade

0.0 0.0 0.0 17.5 MB

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

License: GNU General Public License v3.0

Shell 0.77% JavaScript 4.17% C# 56.42% PowerShell 1.67% CSS 4.45% HTML 32.40% Dockerfile 0.11%

moonglade's Introduction

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

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.

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

moonglade's People

Contributors

anduin2017 avatar deliay avatar ediwang avatar hueifeng avatar kipergil avatar nugetninja avatar saigkill avatar weihanli avatar wenhyan avatar zhiyongpeng avatar zhuangkh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.