Skip to content

Commit

Permalink
docs: fix config defaults
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <[email protected]>
  • Loading branch information
pulsejet committed Oct 22, 2023
1 parent e38da20 commit d5fcf19
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@ jobs:
runs-on: ubuntu-latest
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: cp CHANGELOG.md docs/changelog.md
- run: pip install mkdocs-material pillow cairosvg
- run: mkdocs gh-deploy --force

- name: Build documentation
run: |
cp CHANGELOG.md docs/changelog.md
sed -n '/DEFAULTS = \[/,/];/p' lib/Settings/SystemConfig.php | sed 's/^ //' > docs/system-config.php
pip install mkdocs-material pillow cairosvg
mkdocs gh-deploy --force
3 changes: 2 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
changelog.md
changelog.md
system-config.php
4 changes: 3 additions & 1 deletion docs/system-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ description: Documentation for config.php options that Memories uses
This is a list of all options in `config.php` that memories uses

```php
--8<-- "lib/SystemConfigDefault.php"
<?php

--8<-- "docs/system-config.php"
```
7 changes: 4 additions & 3 deletions lib/Settings/SystemConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

class SystemConfig
{
// Do not change the next line, it's used by the docs
// to generate the default config page
public const DEFAULTS = [
// Path to exiftool binary
'memories.exiftool' => '',
Expand All @@ -18,7 +20,7 @@ class SystemConfig

// Temporary directory for non-php binaries. The directory must be writable
// and the webserver user should be able to create executable binaries in it.
// Note that go-vod temp files are separately configured (see memories.vod.tempdir)
// go-vod temp files are separately configured (memories.vod.tempdir)
// Defaults to system temp directory if blank
'memories.exiftool.tmp' => '',

Expand All @@ -36,7 +38,7 @@ class SystemConfig
'memories.gis_type' => -1,

// Default timeline path for all users
// If set to '_empty_', the user is prompted to select a path on first open (default)
// If set to '_empty_', the user is prompted to select a path
'memories.timeline.default_path' => '_empty_',

// Default viewer high resolution image loading condition
Expand Down Expand Up @@ -89,7 +91,6 @@ class SystemConfig
'memories.video_default_quality' => '0',

// Memories only provides an admin interface for these
// https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#previews
'enabledPreviewProviders' => [],
'preview_max_x' => 4096,
'preview_max_y' => 4096,
Expand Down

0 comments on commit d5fcf19

Please sign in to comment.