-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
132 lines (127 loc) · 6.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!-- AUTO GENERATED HTML: DO NOT MODIFY MANUALLY -->
<!doctype html>
<html lang="en">
<head>
<!-- header -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Server-Side-Includes Server">
<title>SSI Server & Static Pages Generator</title>
<link id="linkFavicon" rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
<!--// header -->
</head>
<body>
<div class="container">
<!-- nav -->
<nav id="nav" class="navbar navbar-expand-lg navbar-light bg-light border-bottom"
style="position:fixed; top:0; left:0; right:0; z-index: 99;">
<div class="container">
<a class="navbar-brand" href="/">
<i class="bi bi-hdd-stack"></i>
SSI Server</a>
<ul class="mr-2 navbar-nav">
<li class="nav-item">
<a href="/source.html" class="nav-link"><i class="bi bi-file-earmark-text"></i>
Source</span></a>
</li>
<li class="nav-item">
<a href="/license.html" class="nav-link"><i class="bi bi-file-earmark-text"></i>
License</span></a>
</li>
<li class="nav-item">
<a href="https://github.com/michaelliao/ssi-server" class="nav-link">
<i class="bi bi-github"></i>
Fork</span></a>
</li>
</ul>
</div>
</nav>
<script>
$(function () {
$(`#nav ul a[href="${location.pathname}"]`).addClass('active');
});
</script>
<!--// nav-->
<div style="padding-top: 80px;">
<div class="row">
<div class="col-12">
<h1>What is Server Side Includes</h1>
<p>From WikiPedia:
<a href="https://en.wikipedia.org/wiki/Server_Side_Includes">Server Side Includes</a>
</p>
<blockquote cite="https://en.wikipedia.org/wiki/Server_Side_Includes">
<h3>Server Side Includes</h3>
<p>Server Side Includes (SSI) is a simple interpreted server-side scripting language used almost
exclusively for the World Wide Web. It is most useful for including the contents of one or
more files into a web page on a web server (see below), using its <code>#include</code>
directive. This could commonly be a common piece of code throughout a site, such as a page
header, a page footer and a navigation menu. SSI also contains control directives for
conditional features and directives for calling external programs. It is supported by
Apache, LiteSpeed, nginx, IIS as well as W3C's Jigsaw. It has its roots in NCSA HTTPd.</p>
<p>In order for a web server to recognize an SSI-enabled HTML file and therefore carry out these
instructions, either the filename should end with a special extension, by default
<code>.shtml</code>, <code>.stm</code>, <code>.shtm</code>, or, if the server is configured
to allow this, set the execution bit of the file.
</p>
<h3>Examples</h3>
<p>
A web page containing a daily quotation could include the quotation by placing the following
code into the file of the web page:</p>
<pre><code><!--#include file="../quote.txt" --></code></pre>
<p>
With one change of the quote.txt file, all pages that include the file will display the
latest daily quotation. The inclusion is not limited to files, and may also be the text
output from a program, or the value of a system variable such as the current time.</p>
</blockquote>
<h1>What is SSI Server</h1>
<p>SSI Server is a simple Python3 script that serves as HTTP server that supports SSI directive.
However, it only helps HTML developers build better pages by better structure. It generates all
HTML pages without SSI, and helps deploys on those servers that only support HTML. e.g. GitHub
pages.</p>
<p>SSI Server supports one and the only one directive: <code>include</code> with <code>file</code>:
</p>
<pre><code><!--#include file="inc/header.html" --></code></pre>
<h3>How SSI Server Works</h3>
<p>SSI Server handles <code>/index.html</code> by processing underlying <code>/index.shtml</code>.
The <code>index.html</code> file is generated or updated by <code>./ssi_server.py -g</code>.
</p>
<h3>How to Use SSI Server</h3>
<p>Download <a
href="https://github.com/michaelliao/ssi-server/raw/master/ssi_server.py">ssi_server.py</a>
to your www root directory and run <code>./ssi_server.py</code>.
</p>
</div>
</div>
</div>
</div>
<!-- footer -->
<footer class="p-5 mt-5 bg-light border-top">
<div class="container">
<div class="row">
<div class="col-12">
<div class="mb-4"><i class="bi bi-hdd-stack"></i> SSI Server, copyleft 2023</div>
<ul class="list-unstyled small text-muted">
<li class="mb-2">Designed and built by
<a target="_blank" href="https://github.com/michaelliao">Michael Liao
<i class="bi bi-box-arrow-up-right"></i></a>.
</li>
<li class="mb-2">Check the source code on
<a target="_blank" href="https://github.com/michaelliao/ssi-server">Github
<i class="bi bi-box-arrow-up-right"></i></a>
</li>
<li class="mb-2">Code licensed
<a target="_blank" href="https://github.com/michaelliao/ssi-server/blob/master/LICENSE">GPLv3
<i class="bi bi-box-arrow-up-right"></i></a>
</li>
</ul>
</div>
</div>
</div>
</footer>
<!--// footer -->
</body>
</html>