Skip to content

Commit 54ecb42

Browse files
docs(config): clarify skeleton and template directory behavior
Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent 564838a commit 54ecb42

1 file changed

Lines changed: 60 additions & 17 deletions

File tree

‎config/config.sample.php‎

Lines changed: 60 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -300,28 +300,71 @@
300300
'allow_user_to_change_display_name' => true,
301301

302302
/**
303-
* The directory where the skeleton files are located. These files will be
304-
* copied to the data directory of new users. Set empty string to not copy any
305-
* skeleton files. If unset and templatedirectory is an empty string, shipped
306-
* templates will be used to create a template directory for the user.
307-
* ``{lang}`` can be used as a placeholder for the language of the user.
308-
* If the directory does not exist, it falls back to non-dialect (from ``de_DE``
309-
* to ``de``). If that does not exist either, it falls back to ``default``
310-
*
311-
* Defaults to ``core/skeleton`` in the Nextcloud directory.
303+
* The directory containing initial content copied to a user's personal files
304+
* during their first login. This content can include ordinary files and
305+
* folders, such as welcome documents, example files, or organization-wide
306+
* reusable documents and folder structures.
307+
*
308+
* The path may include the optional ``{lang}`` placeholder to select
309+
* language-specific content. The placeholder is replaced with the user's
310+
* language code. For example, when this is set to
311+
* ``/path/to/skeleton/{lang}`` and a user's language is ``de_DE``, Nextcloud
312+
* first looks for ``/path/to/skeleton/de_DE``. If that directory does not
313+
* exist, Nextcloud falls back to the base language code (``de`` in this
314+
* example), looking for ``/path/to/skeleton/de``. If that directory also does
315+
* not exist, Nextcloud looks for ``/path/to/skeleton/default``.
316+
*
317+
* If the path does not include ``{lang}``, Nextcloud uses the configured
318+
* directory directly. Only one matching directory is used; content from
319+
* fallback directories is not merged. If no matching directory exists, no
320+
* content is copied.
321+
*
322+
* Set to an empty string (``''``) to disable copying skeleton content.
323+
*
324+
* NOTE: Copying skeleton content also triggers automatic initialization of the
325+
* user's template directory (see ``templatedirectory``). Setting this
326+
* parameter to an empty string therefore prevents template initialization on
327+
* first login. Users can still initialize a template directory later through
328+
* the Files UI, which uses the OCS API, but doing so does not copy skeleton
329+
* content. The template source directory itself is configured separately and is
330+
* not derived from this directory.
331+
*
332+
* Defaults to ``core/skeleton`` relative to the Nextcloud installation root.
312333
*/
313334
'skeletondirectory' => '/path/to/nextcloud/core/skeleton',
314335

315336
/**
316-
* The directory where the template files are located. These files will be
317-
* copied to the template directory of new users. Set empty string to not copy any
318-
* template files.
319-
* ``{lang}`` can be used as a placeholder for the language of the user.
320-
* If the directory does not exist, it falls back to non-dialect (from ``de_DE``
321-
* to ``de``). If that does not exist either, it falls back to ``default``
337+
* The directory containing template content that can be copied to a user's
338+
* template directory. Template files are ordinary files that users can select
339+
* as reusable templates when creating supported file types in the Files app.
340+
*
341+
* Like ``skeletondirectory``, this path may contain the optional ``{lang}``
342+
* placeholder. Nextcloud resolves it using the same language, base-language,
343+
* and ``default`` fallback order described for ``skeletondirectory``. The
344+
* placeholder is resolved independently for this setting.
345+
*
346+
* If the path does not include ``{lang}``, Nextcloud uses the configured
347+
* directory directly. Only one matching directory is used; content from
348+
* fallback directories is not merged. If no matching directory exists, no
349+
* template content is copied.
350+
*
351+
* This setting is independent of ``skeletondirectory``. Its default value is
352+
* ``core/skeleton/Templates`` relative to the Nextcloud installation root.
353+
* Changing ``skeletondirectory`` does not change that value. If a custom
354+
* skeleton directory contains a ``Templates`` subdirectory, Nextcloud copies
355+
* it as ordinary skeleton content; it does not automatically use it as the
356+
* user's template directory.
357+
*
358+
* Template content is copied only when the target template folder is empty.
359+
*
360+
* Set to an empty string (``''``) to disable copying template content from
361+
* this source. During automatic first-login initialization, Nextcloud may
362+
* still create or reuse the default template folder, but it will not copy
363+
* content from this source or configure that folder as the user's template
364+
* directory.
322365
*
323-
* To disable creating a template directory, set both skeletondirectory and
324-
* templatedirectory to empty strings.
366+
* Defaults to ``core/skeleton/Templates`` relative to the Nextcloud
367+
* installation root, regardless of the ``skeletondirectory`` value.
325368
*/
326369
'templatedirectory' => '/path/to/nextcloud/templates',
327370

0 commit comments

Comments
 (0)