From 809eea695b434dec9343ecdcd57514925d725dc3 Mon Sep 17 00:00:00 2001 From: Paul Asmuth Date: Thu, 14 May 2020 13:55:32 +0200 Subject: [PATCH] update the documentation - Update the "Getting Started" page - Update the examples page - Add automatic page titles for all documentation pages - Add new URI redirects for the wwwdocs --- .gitignore | 3 + CMakeLists.txt | 13 + doc/figures/quickstart1.clp | 18 +- doc/figures/quickstart1.svg | 22 +- doc/figures/quickstart2.clp | 29 +- doc/figures/quickstart2.svg | 378 +++++++++++++++------ doc/figures/quickstart3.clp | 35 +- doc/figures/quickstart3.svg | 393 ++++++++++++++++------ doc/frontpage.md | 16 +- doc/{quickstart.md => getting-started.md} | 114 +++---- doc/web/build_examples.py | 18 +- doc/web/build_pages.py | 12 +- doc/web/documentation.css | 29 +- doc/web/redirects.txt | 68 ++-- 14 files changed, 782 insertions(+), 366 deletions(-) rename doc/{quickstart.md => getting-started.md} (51%) diff --git a/.gitignore b/.gitignore index 5a0f2f09b..4fb0908ee 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ install_manifest.txt wwwdocs config.h test-results + +# Local Netlify folder +.netlify \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index ed1e29a65..c86ddcabb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,3 +123,16 @@ add_custom_target(doc COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/wwwdocs COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/doc/web/build.sh ${CMAKE_CURRENT_BINARY_DIR}/wwwdocs) +file(GLOB doc_figure_files "doc/**/*.clp") +foreach(doc_figure_path ${doc_figure_files}) + get_filename_component(doc_figure_name ${doc_figure_path} NAME_WE) + get_filename_component(doc_figure_srcdir ${doc_figure_path} DIRECTORY) + add_custom_target( + doc_figure_${doc_figure_name} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/clip ${doc_figure_srcdir}/${doc_figure_name}.clp -e ${doc_figure_srcdir}/${doc_figure_name}.svg) + add_dependencies(doc_figure_${doc_figure_name} clip-cli) + add_dependencies(doc doc_figure_${doc_figure_name}) +endforeach() + + diff --git a/doc/figures/quickstart1.clp b/doc/figures/quickstart1.clp index 4a68bf746..fa39ac4c0 100644 --- a/doc/figures/quickstart1.clp +++ b/doc/figures/quickstart1.clp @@ -1,10 +1,8 @@ -(layout/margins margin 4em) - -(plot/lines - data-x (100 200 300 400 500 600 700 800 900) - data-y (1.2 1.8 1.3 1.6 1.5 1.3 1.8 1.9 2.0) - limit-y (0 3) - limit-x (0 1000) - marker-shape (pentagon) - marker-size 8pt) - +(figure/plot + lines ( + data-x (100 200 300 400 500 600 700 800 900) + data-y (1.2 1.8 1.3 1.6 1.5 1.3 1.8 1.9 2.0) + limit-y (0 3) + limit-x (0 1000) + marker-shape (pentagon) + marker-size 8pt)) diff --git a/doc/figures/quickstart1.svg b/doc/figures/quickstart1.svg index 8b73eb15a..48b6b216c 100644 --- a/doc/figures/quickstart1.svg +++ b/doc/figures/quickstart1.svg @@ -1,13 +1,15 @@ + + - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/doc/figures/quickstart2.clp b/doc/figures/quickstart2.clp index cd29d6fb3..c0de1f6c4 100644 --- a/doc/figures/quickstart2.clp +++ b/doc/figures/quickstart2.clp @@ -1,16 +1,13 @@ -(layout/margins margin 4em) - -(plot/axes - limit-y (0 3) - limit-x (0 1000) - label-format-x (scientific) - label-placement-x (linear-interval 100 100 900)) - -(plot/lines - data-x (100 200 300 400 500 600 700 800 900) - data-y (1.2 1.8 1.3 1.6 1.5 1.3 1.8 1.9 2.0) - limit-y (0 3) - limit-x (0 1000) - marker-shape (pentagon) - marker-size 8pt) - +(figure/plot + axes ( + limit-y (0 3) + limit-x (0 1000) + label-format-x (scientific) + label-placement-x (linear-interval 100 100 900)) + lines ( + data-x (100 200 300 400 500 600 700 800 900) + data-y (1.2 1.8 1.3 1.6 1.5 1.3 1.8 1.9 2.0) + limit-y (0 3) + limit-x (0 1000) + marker-shape (pentagon) + marker-size 8pt)) diff --git a/doc/figures/quickstart2.svg b/doc/figures/quickstart2.svg index 265f1d2e5..cd7a05ed2 100644 --- a/doc/figures/quickstart2.svg +++ b/doc/figures/quickstart2.svg @@ -1,97 +1,287 @@ + + - - - - - - - - - - - 1.0 × 10² - 2.0 × 10² - 3.0 × 10² - 4.0 × 10² - 5.0 × 10² - 6.0 × 10² - 7.0 × 10² - 8.0 × 10² - 9.0 × 10² - - - - - - - - - - - - - 0.0 - 0.3 - 0.6 - 0.9 - 1.2 - 1.5 - 1.8 - 2.1 - 2.4 - 2.7 - 3.0 - - - - - - - - - - - 1.0 × 10² - 2.0 × 10² - 3.0 × 10² - 4.0 × 10² - 5.0 × 10² - 6.0 × 10² - 7.0 × 10² - 8.0 × 10² - 9.0 × 10² - - - - - - - - - - - - - 0.0 - 0.3 - 0.6 - 0.9 - 1.2 - 1.5 - 1.8 - 2.1 - 2.4 - 2.7 - 3.0 - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/figures/quickstart3.clp b/doc/figures/quickstart3.clp index add5a09bb..c5b08d0f4 100644 --- a/doc/figures/quickstart3.clp +++ b/doc/figures/quickstart3.clp @@ -1,19 +1,16 @@ -(layout/margins margin 4em) - -(plot/axes - limit-y (0 3) - limit-x (0 1000) - label-format-x (scientific) - label-placement-x (linear-interval 100 100 900)) - -(plot/lines - data-x (100 200 300 400 500 600 700 800 900) - data-y (1.2 1.8 1.3 1.6 1.5 1.3 1.8 1.9 2.0) - limit-y (0 3) - limit-x (0 1000) - marker-shape (pentagon) - marker-size 8pt) - -(figure/legend - position (bottom left) - item (label "Example Data" marker-shape (pentagon))) +(figure/plot + axes ( + limit-y (0 3) + limit-x (0 1000) + label-format-x (scientific) + label-placement-x (linear-interval 100 100 900)) + lines ( + data-x (100 200 300 400 500 600 700 800 900) + data-y (1.2 1.8 1.3 1.6 1.5 1.3 1.8 1.9 2.0) + limit-y (0 3) + limit-x (0 1000) + marker-shape (pentagon) + marker-size 8pt) + legend ( + position (bottom left) + item (label "Example Data" marker-shape (pentagon)))) diff --git a/doc/figures/quickstart3.svg b/doc/figures/quickstart3.svg index 33b528842..83503b87b 100644 --- a/doc/figures/quickstart3.svg +++ b/doc/figures/quickstart3.svg @@ -1,99 +1,300 @@ + + - - - - - - - - - - - 1.0 × 10² - 2.0 × 10² - 3.0 × 10² - 4.0 × 10² - 5.0 × 10² - 6.0 × 10² - 7.0 × 10² - 8.0 × 10² - 9.0 × 10² - - - - - - - - - - - - - 0.0 - 0.3 - 0.6 - 0.9 - 1.2 - 1.5 - 1.8 - 2.1 - 2.4 - 2.7 - 3.0 - - - - - - - - - - - 1.0 × 10² - 2.0 × 10² - 3.0 × 10² - 4.0 × 10² - 5.0 × 10² - 6.0 × 10² - 7.0 × 10² - 8.0 × 10² - 9.0 × 10² - - - - - - - - - - - - - 0.0 - 0.3 - 0.6 - 0.9 - 1.2 - 1.5 - 1.8 - 2.1 - 2.4 - 2.7 - 3.0 - - - - - - - - - - - Example Data - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/frontpage.md b/doc/frontpage.md index 312451702..f1dd6ec6e 100644 --- a/doc/frontpage.md +++ b/doc/frontpage.md @@ -19,22 +19,20 @@ lower-level drawing primitives such as markers, arrows and lines. ## 1. Introduction -This chapter contains reference specifications and descriptions for concepts -that are shared among all tools. - ## 2. General Concepts This chapter contains reference specifications and descriptions for concepts -that are shared among all tools. +that are shared among all commands.