Skip to content

An open source extensible static & dynamic blog system. (an alternative tool with same features at StardustDL/paperead)

License

Notifications You must be signed in to change notification settings

StardustDL/acblog

Repository files navigation

AcBlog

CI CD Homepage Mirrors License AcBlog.Tools.SDK

An open source extensible static & dynamic blog system.

cover

The homepage is powered by AcBlog hosted on GitHub Pages.

  • A mirror homepage on Gitee.

Screenshots

Home Posts Archives Search

Features

  • Based on WebAssembly & SignalR
  • Single Page APP
    • Installable
    • Offline
  • Frontend
    • WebAssembly: full static files
    • SPA by WebAssembly with server prerender
    • SPA without WebAssembly by communicating with server
  • Backend
    • Static-file backend with generator
    • Dynamic server backend
  • Post
    • Category & Keywords
    • Markdown rendering
    • LaTeX math rendering
    • Diagram rendering
    • Media links
    • Password protection
    • Table of contents
  • Slides
    • Preview & Full page
  • Note
  • Custom pages
    • Custom layout
    • Full HTML
  • Visitor statistic
  • Comments
  • Archives with timeline
  • Sitemap
  • Feeds (Atom & RSS)
  • Search (Open Search supported)
  • Docker deployment
    • Docker Client.WebAssembly
    • Docker Client.WebAssembly.Host
    • Docker Client.Server
    • Docker Server.API

Guide

Full Static Hosting

GitHub Pages hosting, based on wasm-ghpages-generate-action and static-backend-generate-action.

Frontend

Use AcBlog's WebAssembly client docker image:

docker pull acblog/wasm:latest
docker run -d -p 8000:80 acblog/wasm:latest

You can use volumn to apply settings:

docker run -d \
  -v $PWD/appsettings.json:/app/appsettings.json \
  -v $PWD/manifest.json:/app/manifest.json \
  -p 8000:80 acblog/wasm:latest

For GitHub Pages hosting, you can use wasm-ghpages-generate-action.


Use AcBlog's WebAssembly hosted client docker image:

docker pull acblog/wasm-host:latest
docker run -d -p 8000:80 acblog/wasm-host:latest

You can use volumn to apply settings:

docker run -d \
  -v $PWD/appsettings.json:/app/appsettings.json \
  -v $PWD/manifest.json:/app/wwwroot/manifest.json \
  -p 8000:80 acblog/wasm-host:latest

Use AcBlog's server client docker image (no WebAssembly):

docker pull acblog/client:latest
docker run -d -p 8000:80 acblog/client:latest

You can use volumn to apply settings:

docker run -d \
  -v $PWD/appsettings.json:/app/appsettings.json \
  -p 8000:80 acblog/client:latest

Backend

Static

Use AcBlog's SDK:

dotnet tool install -g AcBlog.Tools.Sdk \
  --add-source https://sparkshine.pkgs.visualstudio.com/StardustDL/_packaging/feed/nuget/v3/index.json

acblog init
acblog remote add origin "./dist"
acblog push

For GitHub Pages hosting, you can use static-backend-generate-action.

Dynamic

Use AcBlog's API server docker image:

docker pull acblog/api:latest
docker run -d -p 8000:80 acblog/api:latest

Compose

Use docker-compose to deploy WebAssembly hosted client and Api server:

cd docker/deploy
docker-compose up

Maybe you need to restart api container after database initializing.

SDK

Use AcBlog's command-line Sdk tool to communicate with AcBlog server.

dotnet tool install -g AcBlog.Tools.Sdk \
  --add-source https://sparkshine.pkgs.visualstudio.com/StardustDL/_packaging/feed/nuget/v3/index.json

acblog --help

Build

  1. Install .NET SDK 5.0, NodeJS 12.x and npm.
  2. Install Gulp & Libman
  3. Install psake
npm install -g gulp
dotnet tool install --global Microsoft.Web.LibraryManager.Cli
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted; Install-Module -Name psake
  1. Restore dependencies

Add NuGet source: StardustDL's NUGET feeds.

Invoke-psake Restore
  1. Build project
Invoke-psake Build

Test & Benchmark

Invoke-psake CI

Dependencies

Status

Status