Coder Social home page Coder Social logo

simple-static-generator's Introduction

项目1

使用django制作blog,项目托管到了github上,关于项目的说明可以在github上的README中看到:

项目2

该项目我制作的是一个简单的静态网页生成器,项目在md2web目录下,其核心文件是该目录下的convert.py文件。该项目可以将src目录及其子目录下的所有的markdown文件转换成html文件,并根据其目录结构生成索引index.html,生成结果将会保存在build目录下。
具体使用方法如下:

安装项目所需的python环境

  1. python3.4,该项目是在python3.4环境下开发的,如果使用python2运行可能会出现一些问题。
  2. markdown,项目用到了markdown这个package,可用pip install markdown进行安装。

准备项目所需的素材

该项目是要对convert.py同目录下的src目录下的markdown文件进行处理,所以需要讲要处理的markdown文件放到src目录下。在我上传的项目中,已经在src目录下放了测试要用的markdown文件,所以此步骤可以滤过。

运行项目

进入md2web目录,即convert.py所在的目录,然后运行:

python convert.py

运行命令后便会在此目录下生成一个build目录,和一个index.html文件。打开index.html文件即可。

项目结果

生成的索引即index.html,如下:

点击索引中的文件即可进入文件的详情页面,如下:

simple-static-generator's People

Contributors

youyongsong avatar

Watchers

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