annotate website/src/hosting.html.luan @ 1822:aeaf2b65c005

better parse tables
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 09 Jul 2024 12:46:27 -0600
parents f44dcb3fedf7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
1 local Luan = require "luan:Luan.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
2 local error = Luan.error
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
3 local Io = require "luan:Io.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
4 local Http = require "luan:http/Http.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
5 local Shared = require "site:/lib/Shared.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
6 local head = Shared.head or error()
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
7 local header = Shared.docs_header or error()
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
8
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
9
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
10 return function()
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
11 Io.stdout = Http.response.text_writer()
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
12 %>
1216
5dbb552075ff doctype
Franklin Schmidt <fschmidt@gmail.com>
parents: 1045
diff changeset
13 <!doctype html>
391
2f5cc9c2cbf0 replace Html.simply_html_page with simply_html_head and simply_html_body_bottom
Franklin Schmidt <fschmidt@gmail.com>
parents: 387
diff changeset
14 <html>
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
15 <head>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
16 <% head() %>
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
17 <title>Luan Web Hosting</title>
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
18 </head>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
19 <body>
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
20 <% header() %>
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
21 <div content>
1324
1660136ac451 website - remove Shared.luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 1323
diff changeset
22
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
23 <h1>Luan Web Hosting</h1>
382
8557581740db added tutorial
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
25 <p>Luan is currently mostly used for building websites. Luan <a href="https://hg.reactionary.software/repo/luan/file/tip/host">includes</a> a web hosting solution. You can install this for your own use, or you can just use our web host for free. I will explain how to use our web host.</p>
382
8557581740db added tutorial
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
27 <p>Start by creating an empty working directory. In this working directory, create a sub-directory called <b>src</b>. This will contain the website. Now in the working directory, make shell script called <b>serve.sh</b> containing:</p>
1812
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
28
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
29 <code block>
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
30 luan luan:http/serve.luan src
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
31 </code>
382
8557581740db added tutorial
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32
1748
Franklin Schmidt <fschmidt@gmail.com>
parents: 1735
diff changeset
33 <p>Run this script and go to <a href="http://localhost:8080/">http://localhost:8080/</a> in your browser. You should see the empty <b>src</b> directory. Now put some HTML files in <b>src</b>. You should see them in the browser. If you click on an HTML file, it should render. If you want HTML for the home page, use <b>index.html</b>. To use Luan to generate HTML, use whatever.html.luan as described the <a href="tutorial.html">Luan tutorial</a>.</p>
382
8557581740db added tutorial
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
35 <p>Suppose your domain is <b>www.whatever.com</b>. Our web host is <b>s1.luan.software</b>. So create a DNS CNAME record pointing <b>www.whatever.com</b> to <b>s1.luan.software</b>. Now make a shell script in the working directory called <b>push.sh</b> containing:</p>
1812
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
36
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
37 <code block>
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
38 luan luan:host/push.luan www.whatever.com password src
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
39 </code>
f44dcb3fedf7 docs - add code block
Franklin Schmidt <fschmidt@gmail.com>
parents: 1748
diff changeset
40
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
41 <p>Replace "password" with whatever password you want.</p>
382
8557581740db added tutorial
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
42
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
43 <p>Running this script will create your website. Running it again will update your website.</p>
382
8557581740db added tutorial
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
44
1735
4b56eff90040 add hosting.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1659
diff changeset
45 <p>If you are wondering why we offer this for free, it is because I am certain that modern scum (members of modern culture) will never use it. Modern scum hate everything that is simple and good, and love overcomplicated crap. So the free Luan hosting service will never have significant use, so I can easily offer it for free.</p>
382
8557581740db added tutorial
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
46
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
47 </div>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
48 </body>
391
2f5cc9c2cbf0 replace Html.simply_html_page with simply_html_head and simply_html_body_bottom
Franklin Schmidt <fschmidt@gmail.com>
parents: 387
diff changeset
49 </html>
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
50 <%
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1647
diff changeset
51 end