Giter VIP home page Giter VIP logo

buildwebpage's Introduction

buildwebpage

DESCRIPTION

The buildwebpage script builds a static webpage by inserting a number of subpages into a template.

Features:

  • Specification of a title for a subpage which can be referenced by the template
  • Assignment of an menu item to a subpage so it can be formatted distinctively
  • Markdown support for subpages

REQUIREMENTS

USAGE

Creating a webpage

By default the programme looks into the source folder, identifies the template by its file name and attempts to insert all remaining files in the folder into the template.

The whole content of a given subpage will be inserted into the template in place of a <!-- content --> comment. The content itself can be written in html or in markdown. For markdown conversion, add a <!-- markdown --> comment to the subpage.

It is also possible to assign a title to a subpage. A subpage may contain a comment <!-- title: SOME TITLE TEXT --> which will be inserted in place of a <!-- title --> comment in the template.

If the template contains a comment `', the comment will be replaced with the date the subpage file was last modified.

Additionally one can mark a specific tag in the template to be the menu item associated with a subpage by refering to its id using the <!-- menu: TAG ID --> comment. Any tag that contains the attribute id='TAG ID' will be added a class='menu-current' which can then be formatted using css.

Command-line Options

usage: buildwebpage [-h] [-d DIR] [-t FILE] [folder]

positional arguments:
  folder                source folder (default: ./_src/)

optional arguments:
  -h, --help            show this help message and exit
  -d DIR, --dest DIR    destination folder (default: ./)
  -t FILE, --template FILE
                        basename of the template file (default: _template.html)

LICENSE

Copyright (c) 2013-2015 Johannes Englisch

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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.