GithubHelp home page GithubHelp logo

saoyor / mdwiki Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lisijie/mdwiki

0.0 2.0 0.0 78 KB

一个简单极速的wiki引擎,使用 Markdown 撰写文章

Go 54.31% Batchfile 0.12% CSS 40.02% HTML 5.55%

mdwiki's Introduction

mdwiki

mdwiki 是一个Go语言开发的wiki引擎,可用于构建wiki系统或个人博客。

特点

  • 使用简单
  • 不需要数据库,基于文档
  • 使用markdown编写文档
  • 极速访问

安装

go get -u github.com/lisijie/mdwiki

使用说明

目录说明:

  • static 静态资源目录
  • themes 主题模版目录,每个主题一个目录
  • posts 文档目录,每篇文档一个markdown文件,建议分2级目录存储

创建文档:

在posts目录下新建一个markdown文档,在文件头插入以下信息

---
layout: 文章使用的模版文件
title: 文章标题
category: 文章类别
keywords: 文章关键字
---

模板函数:

str2html

将输出字符串转成html,示例:

{{str2html .post.Content}}
GetPostListByCategory

根据分类名获取某个分类文章列表,示例:

{{$postList := GetPostListByCategory "foo" 1 10}}
<ul>
{{range $kk, $p := $postList}}
	<li>{{$p.Title}}</li>
{{end}}
</ul>
GetPostList

获取最新的文章列表,示例:

{{$postList := GetPostList 1 10}}
<ul>
{{range $kk, $p := $postList}}
	<li>{{$p.Title}}</li>
{{end}}
</ul>
ShowPageBar

显示分页栏,生成的是bootstrap的分页格式,示例:

{{ShowPageBar 1 100 "/foo"}}

mdwiki's People

Contributors

lisijie avatar

Watchers

 avatar  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.