From e6360694bf26749b6e5585d77a2b746a5d346337 Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Fri, 3 Feb 2023 17:54:00 +0100 Subject: [PATCH] Add mkdocs for docs --- .github/workflows/ci.yml | 14 +++++++++ docs/appendixes/tips.md | 4 +-- docs/appendixes/troubleshooting.md | 2 +- docs/designers/language-basic-syntax.md | 3 +- .../language-syntax-quotes.md | 2 +- .../language-syntax-variables.md | 2 +- docs/designers/language-builtin-functions.md | 2 +- .../language-function-if.md | 2 +- .../language-function-section.md | 4 +-- .../language-function-while.md | 2 +- .../language-function-html-options.md | 2 +- .../language-function-html-select-date.md | 2 +- .../language-function-html-select-time.md | 4 +-- .../language-function-math.md | 4 +-- docs/designers/language-modifiers.md | 28 ++++-------------- .../language-modifier-capitalize.md | 2 +- .../language-modifier-date-format.md | 14 ++++----- .../language-modifier-escape.md | 2 +- .../language-modifier-from-charset.md | 2 +- .../language-modifier-lower.md | 2 +- .../language-modifier-nl2br.md | 4 +-- .../language-modifier-regex-replace.md | 2 +- .../language-modifier-replace.md | 2 +- .../language-modifier-string-format.md | 2 +- .../language-modifier-to-charset.md | 2 +- .../language-modifier-unescape.md | 2 +- .../language-modifier-upper.md | 2 +- .../language-modifier-wordwrap.md | 2 +- .../language-variables-smarty.md | 6 ++-- docs/getting-started.md | 19 +++++++----- docs/images/favicon.ico | Bin 0 -> 7782 bytes docs/index.md | 2 +- .../advanced-features-objects.md | 2 +- docs/programmers/api-functions/api-fetch.md | 2 +- .../api-functions/api-mute-expected-errors.md | 2 +- .../api-variables/variable-error-reporting.md | 2 +- .../api-variables/variable-use-sub-dirs.md | 2 +- docs/programmers/charset.md | 22 ++++++-------- docs/programmers/plugins/plugins-modifiers.md | 2 +- .../plugins/plugins-naming-conventions.md | 2 +- .../programmers/resources/resources-string.md | 4 +-- mkdocs.yml | 17 +++++++++++ 42 files changed, 107 insertions(+), 94 deletions(-) create mode 100644 docs/images/favicon.ico create mode 100644 mkdocs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 681c45ac..97911d51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,3 +79,17 @@ jobs: - name: Run tests with phpunit run: php ./vendor/phpunit/phpunit/phpunit + deploy: + runs-on: ubuntu-lastest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: actions/cache@v2 + with: + key: ${{ github.ref }} + path: .cache + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force + \ No newline at end of file diff --git a/docs/appendixes/tips.md b/docs/appendixes/tips.md index cdcc56b1..8e905f90 100644 --- a/docs/appendixes/tips.md +++ b/docs/appendixes/tips.md @@ -14,7 +14,7 @@ shorthand way with Smarty, using the > **Note** > > "Undefined variable" errors will show an E\_NOTICE if not disabled in -> PHP\'s [`error_reporting()`](&url.php-manual;error_reporting) level or +> PHP\'s [`error_reporting()`](https://www.php.net/error_reporting) level or > Smarty\'s [`$error_reporting`](#variable.error.reporting) property and > a variable had not been assigned to Smarty. @@ -114,7 +114,7 @@ Dates {#tips.dates} ===== As a rule of thumb, always pass dates to Smarty as -[timestamps](&url.php-manual;time). This allows template designers to +[timestamps](https://www.php.net/time). This allows template designers to use the [`date_format`](#language.modifier.date.format) modifier for full control over date formatting, and also makes it easy to compare dates if necessary. diff --git a/docs/appendixes/troubleshooting.md b/docs/appendixes/troubleshooting.md index d605dd2b..dc896df6 100644 --- a/docs/appendixes/troubleshooting.md +++ b/docs/appendixes/troubleshooting.md @@ -110,7 +110,7 @@ the corresponding error is in the template. - This means that your application registered a custom error handler - (using [set\_error\_handler()](&url.php-manual;set_error_handler)) + (using [set\_error\_handler()](https://www.php.net/set_error_handler)) which is not respecting the given `$errno` as it should. If, for whatever reason, this is the desired behaviour of your custom error handler, please call diff --git a/docs/designers/language-basic-syntax.md b/docs/designers/language-basic-syntax.md index 2509857c..8c20ef5a 100644 --- a/docs/designers/language-basic-syntax.md +++ b/docs/designers/language-basic-syntax.md @@ -2,7 +2,8 @@ Basic Syntax ============ A simple Smarty template could look like this: -```html + +```smarty

{$title|escape}