diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-23 19:26:29 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-24 07:11:24 +0700 |
| commit | bd65f02acbd18532342f18e65e86edd1a2062e1c (patch) | |
| tree | a14cd70acdb84fd447c1ba3629453a073c200d59 | |
| parent | 62c2e03409e8f7bc6f3f20df36603344afaf2b3a (diff) | |
| download | ciigo-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/.
| -rw-r--r-- | README.md | 63 | ||||
| -rw-r--r-- | REUSE.toml | 2 | ||||
| -rw-r--r-- | _doc/example/.gitignore (renamed from _example/.gitignore) | 0 | ||||
| -rw-r--r-- | _doc/example/favicon.ico | bin | 0 -> 4550 bytes | |||
| -rw-r--r-- | _doc/example/favicon.ico.license | 2 | ||||
| -rw-r--r-- | _doc/example/html.tmpl (renamed from _example/html.tmpl) | 2 | ||||
| -rw-r--r-- | _doc/example/index.adoc (renamed from _example/index.adoc) | 3 | ||||
| -rw-r--r-- | _doc/example/index.css | 164 | ||||
| -rw-r--r-- | _doc/example/sub/custom.css | 6 | ||||
| -rw-r--r-- | _doc/example/sub/index.adoc (renamed from _example/sub/index.adoc) | 5 | ||||
| -rw-r--r-- | _example/custom.css | 8 | ||||
| -rw-r--r-- | _example/favicon.ico | bin | 5686 -> 0 bytes | |||
| -rw-r--r-- | _example/index.css | 166 |
13 files changed, 210 insertions, 211 deletions
@@ -1,3 +1,6 @@ +<!-- SPDX-License-Identifier: GPL-3.0-or-later --> +<!-- SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> --> + # Welcome to ciigo <!--{{{--> @@ -124,12 +127,12 @@ ciigo version <!--{{{--> -In this repository, we have an "\_example" directory that we can try using -`ciigo`. +In this repository, we have an "\_doc/example/" directory that we can try +using `ciigo`. ``` -$ tree _example -_example/ +$ tree _doc/example +_doc/example/ ├── custom.css ├── favicon.ico ├── html.tmpl @@ -139,21 +142,21 @@ _example/ └── index.adoc ``` -First, lets convert all AsciiDoc files (.adoc) inside the "\_example" +First, lets convert all AsciiDoc files (.adoc) inside the "\_doc/example" directory recursively, ``` -$ ciigo convert ./_example -2025/01/06 19:17:07 convertFileMarkups: converting _example/sub/index.adoc -2025/01/06 19:17:07 convertFileMarkups: converting _example/index.adoc +$ ciigo convert ./_doc/example +2025/01/06 19:17:07 convertFileMarkups: converting _doc/example/sub/index.adoc +2025/01/06 19:17:07 convertFileMarkups: converting _doc/example/index.adoc $ ``` Then serve it under HTTP server, ``` -$ ciigo serve ./_example/ -2025/01/06 19:17:47 ciigo: starting HTTP server at http://127.0.0.1:6320 for "./_example" +$ ciigo serve ./_doc/example/ +2025/01/06 19:17:47 ciigo: starting HTTP server at http://127.0.0.1:6320 for "./_doc/example" ``` @@ -168,7 +171,7 @@ As we can see, the style of "/sub/" page is different because they use custom style defined using ``` -:stylesheet: /custom.css +:stylesheet: custom.css ``` inside the "/sub/index.adoc" file. @@ -178,7 +181,7 @@ their own style. Lets convert again but now using new "-template", ``` -$ ciigo -template _example/html.tmpl +$ ciigo -template _doc/example/html.tmpl $ ``` @@ -188,31 +191,31 @@ To force converting all markup files, we can update the modification time of our template file, ``` -$ touch _example/html.tmpl +$ touch _doc/example/html.tmpl $ ``` or delete all the HTML files, ``` -$ find _example/ -name "*.html" -delete +$ find _doc/example/ -name "*.html" -delete $ ``` and then run the convert command again. ``` -$ ciigo -template ./_example/html.tmpl convert ./_example/ -2025/01/06 19:28:17 convertFileMarkups: converting _example/sub/index.adoc -2025/01/06 19:28:17 convertFileMarkups: converting _example/index.adoc +$ ciigo -template ./_doc/example/html.tmpl convert ./_doc/example/ +2025/01/06 19:28:17 convertFileMarkups: converting _doc/example/sub/index.adoc +2025/01/06 19:28:17 convertFileMarkups: converting _doc/example/index.adoc $ ``` Run the `serve` command again to preview our new generated HTML files, ``` -$ ciigo serve ./_example/ -2025/01/06 19:36:07 ciigo: starting HTTP server at http://127.0.0.1:6320 for "./_example" +$ ciigo serve ./_doc/example/ +2025/01/06 19:36:07 ciigo: starting HTTP server at http://127.0.0.1:6320 for "./_doc/example" ``` @@ -228,18 +231,18 @@ as tile and a "Sub" menu at the top-right. The "ciigo serve" command able to watch for new changes on markup files and convert it automatically to HTML without need to run "convert" manually. -Lets run the serve command again on \_example directory, +Lets run the serve command again on "\_doc/example" directory, ``` -$ ciigo serve ./_example/ -2025/01/06 19:46:54 ciigo: starting HTTP server at http://127.0.0.1:6320 for "./_example" +$ ciigo serve ./_doc/example/ +2025/01/06 19:46:54 ciigo: starting HTTP server at http://127.0.0.1:6320 for "./_doc/example" ``` -Create new directory "journal" under "\_example", +Create new directory "journal" under "\_doc/example", ``` -$ mkdir -p ./_example/journal/ +$ mkdir -p ./_doc/example/journal/ $ ``` @@ -259,10 +262,6 @@ and we should see new HTML page generated with the above content. Each time we refresh the browser, ciigo will check if the markup file is updated and then convert it automatically to HTML and return it to browser. -Another way to trigger ciigo to rescan for new markup files is by creating -or updating file ".ciigo_rescan" inside the content directory. -In the above example, by creating file "\_example/.ciigo_rescan". - Lets try updating the "journal/index.adoc" into ``` @@ -274,7 +273,7 @@ Hello ciigo! and create or update the ".ciigo_rescan", ``` -$ touch _example/.ciigo_rescan +$ touch _doc/example/.ciigo_rescan $ ``` @@ -289,7 +288,7 @@ and when we refresh the browser, we should see the page being updated. Once we have write the content as we like, we can deploy the generated HTML files and other assets files to the server. -For example, using `rsync(1)` we can deploy the "\_example/" excluding the +For example, using `rsync(1)` we can deploy the "\_doc/example/" excluding the hidden files (start with ".") and files with extension ".adoc", ".md", and ".tmpl"; by issuing the following command, @@ -297,7 +296,7 @@ hidden files (start with ".") and files with extension ".adoc", ".md", and $ rsync --exclude='.*' \ --exclude='*.adoc' --exclude='*.md' --exclude='*.tmpl' \ --recursive --archive \ - _example/ \ + _doc/example/ \ user@myserver:/srv/pub/ ``` @@ -350,5 +349,5 @@ later. <!--}}}--> <!-- -vim: foldmethod=marker foldmarker={{{,}}} : +vim: foldmethod=marker foldmarker={{{,}}}: --> @@ -5,6 +5,6 @@ version = 1 [[annotations]] -path = ["go.sum", "README.md", "_example/favicon.ico", "testdata/**", "_AUR/**"] +path = ["go.sum", "testdata/**", "_AUR/**"] SPDX-FileCopyrightText = "2022 Shulhan <ms@kilabit.info>" SPDX-License-Identifier = "GPL-3.0-or-later" diff --git a/_example/.gitignore b/_doc/example/.gitignore index 37384e4..37384e4 100644 --- a/_example/.gitignore +++ b/_doc/example/.gitignore diff --git a/_doc/example/favicon.ico b/_doc/example/favicon.ico Binary files differnew file mode 100644 index 0000000..a32b4a2 --- /dev/null +++ b/_doc/example/favicon.ico 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/_example/html.tmpl b/_doc/example/html.tmpl index 527ab6a..98c9356 100644 --- a/_example/html.tmpl +++ b/_doc/example/html.tmpl @@ -1,5 +1,5 @@ -<!-- SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> --> <!-- SPDX-License-Identifier: GPL-3.0-or-later --> +<!-- SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> --> <!DOCTYPE html> <html> diff --git a/_example/index.adoc b/_doc/example/index.adoc index a1b6c85..e76bfa0 100644 --- a/_example/index.adoc +++ b/_doc/example/index.adoc @@ -1,5 +1,6 @@ -// SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> // 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 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/_example/sub/index.adoc b/_doc/example/sub/index.adoc index 060610d..a28cb80 100644 --- a/_example/sub/index.adoc +++ b/_doc/example/sub/index.adoc @@ -1,8 +1,9 @@ -// SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> // 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 +:stylesheet: custom.css This is an example of content in sub directory using custom stylesheet. diff --git a/_example/custom.css b/_example/custom.css deleted file mode 100644 index 8bf831b..0000000 --- a/_example/custom.css +++ /dev/null @@ -1,8 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -h1 { - color: sienna; -} diff --git a/_example/favicon.ico b/_example/favicon.ico Binary files differdeleted file mode 100644 index 8d22584..0000000 --- a/_example/favicon.ico +++ /dev/null diff --git a/_example/index.css b/_example/index.css deleted file mode 100644 index b6254c4..0000000 --- a/_example/index.css +++ /dev/null @@ -1,166 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -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; -} |
