From 8cd72fc8d8d567783bb9a211eb5c366574192742 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 21 Aug 2022 22:46:32 +0200 Subject: [PATCH] Added docs for PagedArticleWebPage. --- .../web/doc_classes/PagedArticleWebPage.xml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/modules/web/doc_classes/PagedArticleWebPage.xml b/modules/web/doc_classes/PagedArticleWebPage.xml index 2e6b5429d..c0212c07d 100644 --- a/modules/web/doc_classes/PagedArticleWebPage.xml +++ b/modules/web/doc_classes/PagedArticleWebPage.xml @@ -1,8 +1,25 @@ + Using this class, a small self contained multi page article can be created. + Using this class, a small self contained multi page article can be created. + It will load every file from a folder ([code]articles_folder[/code]) in alpahbetical order, parse them as markdown, and create a paginated page from every single one of them. Additionally it will also serve a folder if it's [code]serve_folder[/code] property points to an existing folder. These can be accessed at [code]...articles_url/files/[/code]. If [code]serve_folder_relative[/code] is true (default), then this folder is relative to the [code]articles_folder[/code]. This makes it possible to serve images, videos, custom css, javascript, etc. for a PagedArticle, while all of the article's data can reside in one folder. + If it finds a summary.md, it will serve it as the root, else it will generate one. + The links is generates currently look like: [code]/01_test.md[/code] + As an example let's take this folder: + [code]article/ + -- article_files/ + ---- test.jpg + -- page1.md + -- page2.md + -- summary.md[/code] + A [PagedArticleWebPage] is pointed to the [code]article[/code] folder, it's [code]serve_folder[/code] property is set to [code]article_files[/code], and is accesible at [code]http://127.0.0.1/test_article[/code]: + [code]Opening: http://127.0.0.1/test_article will send summary.md rendered as html. + Opening: http://127.0.0.1/test_article/page1.md will send page1.md rendered as html. + Opening: http://127.0.0.1/test_article/page2.md will send page2.md rendered as html. + Opening: http://127.0.0.1/test_article/files/test.jpg will send test.jpg.[/code] @@ -10,30 +27,37 @@ + generates a summary page containing all article links. This is used as the index if summary.md is unavailable. + Returns the index page's data. + Returns the summary page's data. + Manually loads everything. + The folder containing the articles. + The folder that should be served. It could contain images, css, etc. These files are accessible under [code]...articles_url/files/[/code]. + Whether this folder is relative or not to the articles_folder.