solitudes

package module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Solitudes

🚬 在那些孤独的日子里,还有写作陪伴着我。 2020,从心出发

特色

  • 一个可以出书的博客引擎
  • 适合长篇多章节文章写作(专栏)
  • SEO 友好
  • 内置全文搜索
  • 文章历史版本保存(可浏览可被搜索)
  • Markdown 发布文章
  • 邮件、Server酱 通知
  • 多语言支持

指南

  1. 在 postgres 数据库执行以下命令,启用 uuid 扩展

    CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
    
  2. 创建一个数据文件夹

  3. 在 path/to/data/conf.yml 创建配置文件 (eg: data/conf.yml)

  4. 在 docker 中部署

    docker run --name solitudes -p 8080:8080 -v /path/to/data:/solitudes/data naiba/solitudes
    
  5. 打开 https://yourdomain/login 登录管理面板

感谢

Documentation

Index

Constants

View Source
const (
	// CtxAuthorized 用户已认证
	CtxAuthorized = "cazed"
	// CtxTranslator 翻译
	CtxTranslator = "ct"
	// AuthCookie 用户认证使用的Cookie名
	AuthCookie = "i_like_solitude"
	// CacheKeyPrefixRelatedChapters 缓存键前缀:章节
	CacheKeyPrefixRelatedChapters = "ckprc"
	// CacheKeyPrefixRelatedArticle 缓存键前缀:文章
	CacheKeyPrefixRelatedArticle = "ckpra"
	// CacheKeyPrefixRelatedSiblingArticle 缓存键前缀:相邻文章
	CacheKeyPrefixRelatedSiblingArticle = "ckprsa"
	// CacheKeyPrefixUploadFiles 缓存键前缀:上传的文件
	CacheKeyPrefixUploadFiles = "ckpuf"
)

Variables

View Source
var BuildVersion = "_BuildVersion_"

BuildVersion 构建版本

View Source
var Injector *dig.Container

Injector 运行时依赖注入

View Source
var TemplateIndex = map[byte]string{
	1: "article",
	2: "page",
}

TemplateIndex 模板索引

View Source
var Templates = map[byte]string{
	1: "Article template",
	2: "Page template",
}

Templates 文章模板

Functions

func BuildArticleIndex

func BuildArticleIndex()

BuildArticleIndex 重建索引

Types

type SysVeriable

type SysVeriable struct {
	Config    *model.Config
	DB        *gorm.DB
	Cache     *cache.Cache
	Search    bleve.Index
	SafeCache *safecache.SafeCache
	Pool      *ants.Pool
}

SysVeriable 全局变量

var System *SysVeriable

System 全局变量

Directories

Path Synopsis
cmd
web command
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址