Giter Club home page Giter Club logo

htmlboilerplate's Introduction

This simple util makes html files complete by adding , and tags if content isn't wrapped into tag. If supplied file has .md extension then additional markdown-it script is added into resulting html file for converting markdown to html. Supplied html file will be overwritten by this script.

3rd party projects this utils relies on:

Usage

makehtml.sh  file.html
makehtml.sh  file.md

Examples

You write example.html:

<code class="markdown"><pre>
Document 1
==========

Some list

* item 1
* item 2
* item 3
</pre></code>

After applying makehtml.sh example.html resulting code will be:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>example</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css/out/water.css">
    <!-- Other css alternatives: https://css-tricks.com/no-class-css-frameworks/ -->
  </head>
  <body>
    <main>
    <code class="markdown"><pre>
Document 1
==========

Some list

* item 1
* item 2
* item 3
</pre></code>
    </main>
    <script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js" type="text/javascript"></script>
<script type="text/javascript">
    // some helper script to init markdown processing
</script>
  </body>
</html>

Same result will be if this script is applied on .md file.

Demo page

Why

In the past I kept local notes for myself in .md files but they needed special viewer or converting to html. Instead I can just embed markdown inside portable html files which can be viewed anywhere with no extra software required. Next time I just edit these html's directly with no source .md required.

Project page: https://github.com/rekcuFniarB/HtmlBoilerplate#readme

htmlboilerplate's People

Contributors

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