aboutsummaryrefslogtreecommitdiff
path: root/_doc/example
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-23 19:26:29 +0700
committerShulhan <ms@kilabit.info>2026-01-24 07:11:24 +0700
commitbd65f02acbd18532342f18e65e86edd1a2062e1c (patch)
treea14cd70acdb84fd447c1ba3629453a073c200d59 /_doc/example
parent62c2e03409e8f7bc6f3f20df36603344afaf2b3a (diff)
downloadciigo-bd65f02acbd18532342f18e65e86edd1a2062e1c.tar.xz
all: move _example/ directory under _doc/ directory
This allow us to inspect the example using the serve-doc task, along with the content of _doc/.
Diffstat (limited to '_doc/example')
-rw-r--r--_doc/example/.gitignore4
-rw-r--r--_doc/example/favicon.icobin0 -> 4550 bytes
-rw-r--r--_doc/example/favicon.ico.license2
-rw-r--r--_doc/example/html.tmpl50
-rw-r--r--_doc/example/index.adoc24
-rw-r--r--_doc/example/index.css164
-rw-r--r--_doc/example/sub/custom.css6
-rw-r--r--_doc/example/sub/index.adoc9
8 files changed, 259 insertions, 0 deletions
diff --git a/_doc/example/.gitignore b/_doc/example/.gitignore
new file mode 100644
index 0000000..37384e4
--- /dev/null
+++ b/_doc/example/.gitignore
@@ -0,0 +1,4 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info>
+/.ciigo_rescan
+/journal
diff --git a/_doc/example/favicon.ico b/_doc/example/favicon.ico
new file mode 100644
index 0000000..a32b4a2
--- /dev/null
+++ b/_doc/example/favicon.ico
Binary files differ
diff --git a/_doc/example/favicon.ico.license b/_doc/example/favicon.ico.license
new file mode 100644
index 0000000..6109097
--- /dev/null
+++ b/_doc/example/favicon.ico.license
@@ -0,0 +1,2 @@
+SPDX-License-Identifier: GPL-3.0-or-later
+SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
diff --git a/_doc/example/html.tmpl b/_doc/example/html.tmpl
new file mode 100644
index 0000000..98c9356
--- /dev/null
+++ b/_doc/example/html.tmpl
@@ -0,0 +1,50 @@
+<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
+<!-- SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> -->
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="theme-color" content="#375EAB" />
+
+ <title>{{.Title}}</title>
+ <link rel="stylesheet" href="/index.css" />
+ {{- range .Styles}}
+ <link rel="stylesheet" href="{{.}}" />
+ {{- end}}
+</head>
+
+<body>
+ <div class="topbar">
+ <div class="container">
+ <div class="top-heading">
+ <a href="/">ciigo</a>
+ </div>
+ <div class="menu">
+ <form class="item" action="/_internal/search">
+ <input type="text" name="q" placeholder="Search" />
+ </form>
+ </div>
+ <div class="menu">
+ <a href="/sub">Sub</a>
+ </div>
+ </div>
+ </div>
+
+ <div class="page">
+ <div class="container">
+ {{.Body}}
+ </div>
+ <!-- .container -->
+ </div>
+ <!-- .page -->
+
+ <div class="footer">
+ Powered by <a href="https://sr.ht/~shulhan/ciigo">
+ ciigo
+ </a>
+ </div>
+</body>
+
+</html>
diff --git a/_doc/example/index.adoc b/_doc/example/index.adoc
new file mode 100644
index 0000000..e76bfa0
--- /dev/null
+++ b/_doc/example/index.adoc
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info>
+
+= Welcome to ciigo
+Shulhan <ms@kilabit.info>
+25 September 2019
+:sectanchors:
+:sectlinks:
+:toc:
+
+`ciigo` is a library and a program to write static web server with embedded
+files using
+https://asciidoctor.org/docs/what-is-asciidoc/[AsciiDoc^]
+markup format.
+
+== ciigo as library
+
+For an up to date documentation of how to use the library see the
+https://git.sr.ht/~shulhan/ciigo[repository page^].
+
+== ciigo as CLI
+
+`ciigo` as CLI can convert, generate, and/or serve a directory that contains
+markup files, as HTML files.
diff --git a/_doc/example/index.css b/_doc/example/index.css
new file mode 100644
index 0000000..3467881
--- /dev/null
+++ b/_doc/example/index.css
@@ -0,0 +1,164 @@
+/* SPDX-License-Identifier: GPL-3.0-or-later */
+/* SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> */
+
+body {
+ margin: 0;
+ font-family: Arial, sans-serif;
+ background-color: #fff;
+ line-height: 1.3;
+ text-align: center;
+ color: #222;
+}
+pre {
+ font-family: Menlo, monospace;
+ font-size: 0.875rem;
+ line-height: 1.4;
+ overflow-x: auto;
+ background: #efefef;
+ padding: 0.625rem;
+ border-radius: 0.3125rem;
+}
+a {
+ color: #375eab;
+ text-decoration: none;
+}
+a:hover {
+ text-decoration: underline;
+}
+
+p,
+li {
+ max-width: 50rem;
+ word-wrap: break-word;
+}
+p,
+pre,
+ul,
+ol {
+ margin: 1.25rem;
+}
+
+h1,
+h2,
+h3,
+h4 {
+ margin: 1.25rem 0 1.25rem;
+ padding: 0;
+ color: #375eab;
+ font-weight: bold;
+}
+h1 {
+ font-size: 1.75rem;
+ line-height: 1;
+}
+h1 .text-muted {
+ color: #777;
+}
+h2 {
+ clear: right;
+ font-size: 1.25rem;
+ background: #e0ebf5;
+ padding: 0.5rem;
+ line-height: 1.25;
+ font-weight: normal;
+ overflow: auto;
+ overflow-wrap: break-word;
+}
+h2 a {
+ font-weight: bold;
+}
+h3 {
+ font-size: 1.25rem;
+ line-height: 1.25;
+ overflow: auto;
+ overflow-wrap: break-word;
+}
+h3,
+h4 {
+ margin: 1.25rem 0.3125rem;
+}
+h4 {
+ font-size: 1rem;
+}
+
+h2 > span,
+h3 > span {
+ float: right;
+ margin: 0 25px 0 0;
+ font-weight: normal;
+ color: #5279c7;
+}
+
+dl {
+ margin: 1.25rem;
+}
+dd {
+ margin: 0 0 0 1.25rem;
+}
+dl,
+dd {
+ font-size: 0.875rem;
+}
+
+/**
+ * Custom classes for pages
+ */
+
+.topbar {
+ background: #e0ebf5;
+ height: 4rem;
+ overflow: hidden;
+}
+
+.topbar .top-heading,
+.topbar .menu {
+ padding: 1.313rem 0;
+ font-size: 1.25rem;
+ font-weight: normal;
+}
+
+.topbar .top-heading {
+ float: left;
+}
+.topbar .top-heading a {
+ color: #222;
+ text-decoration: none;
+}
+
+.topbar .menu {
+ float: right;
+}
+.topbar .menu a {
+ margin: 0.625rem 0.125rem;
+ padding: 0.625rem;
+ color: white;
+ background: #375eab;
+ border: 0.0625rem solid #375eab;
+ border-radius: 5px;
+}
+.topbar .menu form {
+ margin-left: 0.625rem;
+}
+.page {
+ width: 100%;
+}
+
+.page > .container,
+.topbar > .container {
+ text-align: left;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 0 1.25rem;
+}
+
+.container .meta {
+ font-style: italic;
+ margin: 1.25rem;
+}
+
+.footer {
+ text-align: center;
+ color: #666;
+ font-size: 0.875rem;
+ margin: 2.5rem 0;
+}
diff --git a/_doc/example/sub/custom.css b/_doc/example/sub/custom.css
new file mode 100644
index 0000000..c113fea
--- /dev/null
+++ b/_doc/example/sub/custom.css
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: GPL-3.0-or-later */
+/* SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> */
+
+h1 {
+ color: sienna;
+}
diff --git a/_doc/example/sub/index.adoc b/_doc/example/sub/index.adoc
new file mode 100644
index 0000000..a28cb80
--- /dev/null
+++ b/_doc/example/sub/index.adoc
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info>
+
+= Sub directory
+Second Author <m.shulhan@gmail.com>
+24 November 2020
+:stylesheet: custom.css
+
+This is an example of content in sub directory using custom stylesheet.