Code Monkey home page Code Monkey logo

tiwi's Introduction

Supports Live Reload

build License: MIT Go Report Card Go Reference

Installation

Clone repository

git clone https://github.com/EdwinWalela/tiwi

Run tests and compile tiwi

cd tiwi && make

Run tiwi

./tiwi


tiwi parses and builds html sites from markdown

Usage:
  tiwi [command]

Available Commands:
  build       Generates HTML files
  create      Initializes the tiwi project
  help        Help about any command

Flags:
  -h, --help   help for tiwi

Use "tiwi [command] --help" for more information about a command.

Usage

$ ./tiwi create

The create command takes in an argument of the project name.

Please specify the project name:

tiwi create <my-project>

For example:

tiwi create my-tiwi-site

Create a project

./tiwi create my-site

The create command scaffolds the project with the following default markdown files:

  • index.md
  • not-found.md
  • first-article.md
  • getting started.md

Generate HTML

./tiwi build -w <project-name>

This commands generates a folder called static containing the HTML files

The build command takes in an optional flag -w which converts empty lines to <br/> tags

$ ./tiwi build my-site

Found [4] page(s):

- first-article.md
- getting-started.md
- index.md
- not-found.md

Generating HTML...

Process complete. HTML files generated at mysite/static.

Generated static website


Contributing

Any contribution, in the form of a suggestion, bug report or pull request, is well accepted.

Here is a list of good issues to get started

tiwi's People

Contributors

edwinwalela avatar

Stargazers

Eric Githinji avatar White avatar Peter Tepela avatar Song Liu avatar  avatar Göksel Küçükşahin avatar Miran Kamal avatar Andrzej Gawor avatar Aidan van Wyk avatar Alex Bukov  avatar  avatar microup avatar

Watchers

 avatar

Forkers

sankaire yunghavy

tiwi's Issues

Tests should not use a hardcoded path to the test-site directory

The tests use a hard coded value for the path of the test-site directory.

func TestGetPages(t *testing.T) {
	pages, err := getPages("../../test-site")
	assert.NoError(t, err)
	assert.Equal(t, 4, len(pages))
}

To improve readability and maintainability, it would be better to define a constant which holds the value of the test-site directory and reference it where needed in the tests.

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.