GitXplorerGitXplorer
p

makeweb

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
c463d41c37da25f9360832971de46304a1ead3f6

Fix bug in setting alternative template

committed 5 years ago
Unverified
146557d344cbcda87ebacd4dc9377238c811ead2

Return error when something fails

committed 5 years ago
Unverified
9e54c22d0271db7b56269079f5292439d9caa04c

Handle unhandled errors

committed 5 years ago
Unverified
de19f8cc3bf1e217093906b00e38fb6f7b7acad3

Comment out WIP pieces

committed 5 years ago
Unverified
754731d52cb83220f3b74212b19ac41d04ded101

Basic plugin system

committed 5 years ago
Unverified
ca1a589bee3b4672873f6c69e35edac9fb97bcbe

Add LICENSE

committed 5 years ago

README

The README file for this repository.

Makeweb

Static site generator designed to be simple to use, but also powerful.

Install

go get github.com/PaperMountainStudio/makeweb-cli

Advantages

  • fast
  • cheap
  • secure
  • flexible
  • easy to edit
  • easy to migrate

Usage

mkdir ~/makeweb_example
cd ~/makeweb_example
mkdir input
mkdir templates
touch input/index.html templates/default

Now you have created basic project structure. Open input/index.html in your editor and write:

{
    "title": "Makeweb example"
}
---
content

This is your webpage content, but we also need a template. Open templates/default and write:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <title>{{.title}}</title>
  </head>
  <body>
  {{.text}}
  </body>
</html>

As you can see, we use {{.title}} to get title we specified in webpage content's header. The {{.text}} is a special case, this is substituted by the content of webpage - in our case input/index.html after the ---.

Now everything is ready, you can generate it.

makeweb-cli

We can see that a new directory output has been created. That is where our generated webpage is. If you have python3 installed, you can use this to serve it:

cd output
python3 -m http.server

And type localhost:8000 to your browser. You should see the generated webpage.