Skip to content

Commit 31af27a

Browse files
committed
Added a program build system so we can do proper releases. It will no longer be possible to run the program just by cloning the repo.
1 parent 238bfa8 commit 31af27a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4663
-309
lines changed

.gitignore

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
/local/
2-
/wiki/
1+
*.lnk
2+
local/
33

4+
/*.lua
45
/*.sublime-*
5-
/CreateExe.cmd
6-
/exe.lua
7-
/TODO.txt
6+
/.run
7+
/output/
8+
/srcgen/
9+
/temp/
10+
/wiki/
11+
12+
/gfx/appIcon*.png
13+
!/gfx/appIcon16.png

BuildTestsite.cmd

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
2-
3-
Copyright © 2018-2021 Marcus 'ReFreezed' Thunström
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
MIT License
2+
3+
Copyright © 2018-2021 Marcus 'ReFreezed' Thunström
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 67 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
<h1 align="center"><img src="logo.png" width="200" height="200" alt="LuaWebGen" title="LuaWebGen"></h1>
1+
<h1 align="center"><img src="gfx/logo.png" width="200" height="200" alt="LuaWebGen" title="LuaWebGen"></h1>
22

3-
<p align="center"><img src="https://img.shields.io/badge/version-0.19-green.svg" alt="version 0.19"></p>
3+
<p align="center">
4+
<a href="https://github.com/ReFreezed/LuaWebGen/releases/latest">
5+
<img src="https://img.shields.io/github/release/ReFreezed/LuaWebGen.svg" alt="">
6+
</a>
7+
<a href="https://github.com/ReFreezed/LuaWebGen/blob/master/LICENSE">
8+
<img src="https://img.shields.io/github/license/ReFreezed/LuaWebGen.svg" alt="">
9+
</a>
10+
</p>
411

512
**LuaWebGen** - static website generator, powered by Lua. Somewhat inspired by [Hugo](https://gohugo.io/).
613

714
Webpages are generated using HTML and markdown *templates* with embedded Lua code. CSS files can also include code.
815

16+
Download: [latest release](https://github.com/ReFreezed/LuaWebGen/releases/latest)
17+
918
- [Why?](#why)
1019
- [Example](#example)
1120
- [Installation / Usage](#installation--usage)
@@ -70,42 +79,81 @@ Page template, `page.html`:
7079

7180

7281
## Installation / Usage
82+
There are two versions of LuaWebGen: Windows and universal.
83+
Begin by [downloading](https://github.com/ReFreezed/LuaWebGen/releases/latest) and unzipping the program somewhere.
84+
85+
86+
### Windows
87+
Just run `webgen.exe`, like this:
88+
89+
```batch
90+
cd path/to/siteroot
91+
path/to/webgen.exe command [options]
92+
```
93+
94+
If you add the program folder to your [PATH](https://www.computerhope.com/issues/ch000549.htm)
95+
it's a bit nicer:
96+
97+
```batch
98+
cd path/to/siteroot
99+
webgen command [options]
100+
```
73101

74-
LuaWebGen requires Lua 5.1 and these libraries:
102+
> **Note:** The documentation uses this format.
75103
76-
- [Lua-GD](https://ittner.github.io/lua-gd/) for image manipulation.
77-
- [LuaFileSystem](https://keplerproject.github.io/luafilesystem/) for file system access.
78-
- [LuaSocket](http://w3.impa.br/~diego/software/luasocket/home.html) for URL handling.
79104

80-
If you're on Windows you can simply install [Lua for Windows](https://github.com/rjpcomputing/luaforwindows).
105+
### Universal
106+
This version requires these things to be installed:
81107

82-
> **Note:** LuaWebGen has only been tested on Windows.
108+
- [Lua 5.1](https://www.lua.org/)
109+
- [LuaFileSystem](https://keplerproject.github.io/luafilesystem/) - required for file system access.
83110

111+
Some functionality also require these things:
112+
113+
- [Lua-GD](https://ittner.github.io/lua-gd/) - required for image manipulation.
114+
- [LuaSocket](http://w3.impa.br/~diego/software/luasocket/home.html) - optional, for more CPU-friendly auto-builds.
115+
116+
> **Hint:** On Windows you can simply install [Lua for Windows](https://github.com/rjpcomputing/luaforwindows)
117+
> which includes everything that's needed in a neat package.
118+
119+
Run the program like this:
120+
121+
```batch
122+
cd path/to/siteroot
123+
lua path/to/webgen.lua command [options]
124+
```
125+
126+
> **Note:** LuaWebGen has only been tested on Windows so far.
127+
128+
129+
### Build Website
84130
To generate a website, run this from the [command line](https://github.com/ReFreezed/LuaWebGen/wiki/Command-Line):
85131

86132
```batch
87-
cd path/to/site/root
88-
lua path/to/LuaWebGen/main.lua build
133+
cd path/to/siteroot
134+
webgen build
89135
```
90136

91137
LuaWebGen expects this folder hierarchy:
92138

93139
```
94140
site-root/
95-
content/ -- All website content, including pages, images, CSS and JavaScript files.
96-
index.html|md -- Homepage/root index page.
97-
data/ -- Optional data folder. Can contain Lua, TOML and XML files.
98-
layouts/ -- All HTML layout templates.
99-
page.html -- Default page template.
100-
logs/ -- Automatically created log file folder.
101-
output/ -- Automatically created output folder.
102-
scripts/ -- Optional Lua script folder. The scripts must return a function.
103-
config.lua -- Site-wide configurations.
141+
content/ -- All website content, including pages, images, CSS and JavaScript files.
142+
index.(html|md) -- Homepage/root index page.
143+
data/ -- Optional data folder. Can contain Lua, TOML and XML files.
144+
layouts/ -- All HTML layout templates.
145+
page.html -- Default page template.
146+
logs/ -- Automatically created log file folder.
147+
output/ -- Automatically created output folder.
148+
scripts/ -- Optional Lua script folder. Scripts must return a function.
149+
config.lua -- Site-wide configurations.
104150
```
105151

106152
Everything in the *content* folder will be processed and end up in the *output* folder.
107153

108154
> **Note:** The *output* folder is automatically cleaned from files and folders that do not exist in the *content* folder,
109155
> so it's not a good idea to save files in the *output* folder.
110156
157+
See the [wiki](https://github.com/ReFreezed/LuaWebGen/wiki) for the full documentation.
158+
111159

bin/freetype6.dll

450 KB
Binary file not shown.

bin/gd-license.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
2+
by Cold Spring Harbor Laboratory. Funded under Grant P41-RR02188 by the
3+
National Institutes of Health.
4+
5+
Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 by
6+
Boutell.Com, Inc.
7+
8+
Portions relating to GD2 format copyright 1999, 2000, 2001, 2002 Philip
9+
Warner.
10+
11+
Portions relating to PNG copyright 1999, 2000, 2001, 2002 Greg Roelofs.
12+
13+
Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002 John Ellson
14+
(ellson@graphviz.org).
15+
16+
Portions relating to gdft.c copyright 2001, 2002 John Ellson
17+
(ellson@graphviz.org).
18+
19+
Portions relating to JPEG and to color quantization copyright 2000, 2001,
20+
2002, Doug Becker and copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000,
21+
2001, 2002, Thomas G. Lane. This software is based in part on the work of the
22+
Independent JPEG Group. See the file libjpeg-license.txt for more information.
23+
24+
See also libfreetype-license.txt, libpng-license.txt, zlib-license.txt, and
25+
libjpeg-license.txt, all of which are open source licenses compatible with
26+
free commercial and noncommercial use, in some cases with minor documentation
27+
requirements.
28+
29+
Portions relating to WBMP copyright 2000, 2001, 2002, 2003 Maurice Szmurlo and
30+
Johan Van den Brande.
31+
32+
Permission has been granted to copy, distribute and modify gd in any context
33+
without fee, including a commercial application, provided that this notice is
34+
present in user-accessible supporting documentation.
35+
36+
This does not affect your ownership of the derived work itself, and the intent
37+
is to assure proper credit for the authors of gd, not to interfere with your
38+
productive use of gd. If you have questions, ask. "Derived works" includes all
39+
programs that utilize the library. Credit must be given in user-accessible
40+
documentation.
41+
42+
This software is provided "AS IS." The copyright holders disclaim all
43+
warranties, either express or implied, including but not limited to implied
44+
warranties of merchantability and fitness for a particular purpose, with
45+
respect to this code and accompanying documentation.
46+
47+
Although their code does not appear in this version of gd, the authors wish to
48+
thank David Koblas, David Rowley, and Hutchison Avenue Software Corporation
49+
for their prior contributions.

bin/gd.dll

47.5 KB
Binary file not shown.

bin/jpeg62.dll

125 KB
Binary file not shown.

bin/lfs-license.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright � 2003 - 2020 Kepler Project.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

bin/lfs.dll

41.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)