Giter Club home page Giter Club logo

blog's Introduction

简介

本工程是一个基于FlaskPython Markdown开发的简易博客。 本博客支持基本的Markdown语法,并且支持table和Meta信息,具体参见About.md

工程依赖包安装

本工程主要依赖于Flask、Jinja2,具体参见requirement.txt

pip install -r requirements.txt

基本用法

  1. Python环境搭建及依赖包安装,依赖包参见requirements.txt
  2. 将你写好的.md文件丢到generate.pyINPUT_CONTENT所配置的目录中,默认为./in目录;
  3. 运行generate.py文件,生成html页面文件和索引文件;
  4. 运行blog.py文件,启动flask网站,用以对外提供访问html文件;
  5. 访问http://127.0.0.1:5000/api/index/generate/生成索引文件;
  6. 访问http://127.0.0.1:5000/upload/上传你编写好的md文件(md文件名请使用英文字母、数字、中划线、下划线的组合);

工程结构简介

blog
├─start.sh          -- linux启动脚本
├─stop.sh           -- linux停止脚本
├─start.bat         -- windows启动脚本
├─blog.py           -- flask工程主文件
├─generate.py       -- Markdown生成html工具
├─ReadMe.md         -- 本文档
├─requirements.txt  -- 依赖包
├─settings.py       -- flask 配置
│
├─api           -- 数据查询接口
├─in
│  └─About.md   -- 博客撰写方法说明
│
├─static        -- 静态资源文件夹
│  ├─favicon.ico
│  ├─css
│  ├─font
│  ├─fonts
│  └─js
├─templates     -- html模板
└─utils         -- 工具类

示例

screenshot

blog's People

Contributors

yancai avatar

Watchers

 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.