From 85ae94f62b75372943a8ffdd705ce932a7849a8d Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 6 Jan 2025 02:54:52 +0700 Subject: all: auto convert markup when HTTP client request GET to HTML file In development mode, where [ServeOptions.IsDevelopment] is set to true or when running "ciigo serve", the ciigo HTTP server will check if the new markup file is newer than HTML file when user press refresh or reload on the browser. If its newer, it will convert the markup file and return the new content of HTML file. --- testdata/onGet_template.gohtml | 1 + testdata/onGet_test.txt | 99 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 testdata/onGet_template.gohtml create mode 100644 testdata/onGet_test.txt (limited to 'testdata') diff --git a/testdata/onGet_template.gohtml b/testdata/onGet_template.gohtml new file mode 100644 index 0000000..dd786b2 --- /dev/null +++ b/testdata/onGet_template.gohtml @@ -0,0 +1 @@ +{{.Body}} diff --git a/testdata/onGet_test.txt b/testdata/onGet_test.txt new file mode 100644 index 0000000..048ac37 --- /dev/null +++ b/testdata/onGet_test.txt @@ -0,0 +1,99 @@ + +>>> one.adoc += One + +<<< one.html + +
+
+ + +>>> two.md +# Two + +<<< two.html +

Two

+ + + +>>> three.html + + + +<<< three.html + + + +>>> three.adoc += Three + +<<< new_three.html + +
+
+ + +>>> update_one.adoc += One + +Updated. + +<<< update_one.html + +
+
+

Updated.

+
+
+ + + +>>> /journal/index.adoc += Journal + +Hello world! + +<<< /journal/index.html + +
+
+

Hello world!

+
+
+ + +>>> /journal2/index.adoc += Journal 2 + +Hello world! + +<<< /journal2/index.html +Found. + + + +>>> END -- cgit v1.3-5-g9baa