From 0a61f7ed1619aeadfeec23b2830af8aefe3cdd2a Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 15 Jun 2018 16:20:57 +1200 Subject: [PATCH] DOCS Link to public folder instructions from 4.0.0 docs It's far too common for people to follow 4.0.0, only to get surprised theres more to it --- docs/en/04_Changelogs/4.0.0.md | 5 +++++ docs/en/04_Changelogs/4.1.0.md | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index 086481fe7..a4ac7fb1e 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -556,6 +556,11 @@ If you deploy release archives or upload code via FTP, either ensure those archives can correctly extract symlinks, or explicitly switch to the "copy" mode to avoid symlinks. +At this point, you should consider using a [public/ folder as the webroot](4.1.0#public-folder), +which was introduced in the newer [4.1.0](4.1.0) release. +The same [vendor-plugin](https://github.com/silverstripe/vendor-plugin) mechanism +should be used to expose public files in your themes and project folders. + ### SS_Log replaced with PSR-3 logging {#psr3-logging} One of the great changes that comes with SilverStripe 4 is the introduction of diff --git a/docs/en/04_Changelogs/4.1.0.md b/docs/en/04_Changelogs/4.1.0.md index de2fe8134..ecd884042 100644 --- a/docs/en/04_Changelogs/4.1.0.md +++ b/docs/en/04_Changelogs/4.1.0.md @@ -10,7 +10,7 @@ Note: if you receive an error message about an undefined constant while upgrading with `composer`, re-running the command should solve the issue. -### Upgrade `public/` folder (optional) +### Upgrade `public/` folder (optional) {#public-folder} This release allows the maintenance of a public webroot folder which separates all web-accessible files from protected project files (like the vendor folder @@ -60,7 +60,7 @@ You may also need to add various changes to your code if you reference the BASE_ public folder. - You can check if a public folder exists with `Director::publicDir()` -### Example `public/` folder structure +### Example `public/` folder structure {#public-folder-example} For example, this is an existing folder structure: @@ -140,7 +140,7 @@ After migration the folder structure would look like: └── composer.php ``` -### Use new `$public` theme set +### Use new `$public` theme set {#public-theme} In addition there is a new helper pseudo-theme that you can configure to expose files in the `public/` folder to the themed css / javascript file lookup. For instance, this is how you can prioritise those @@ -163,7 +163,7 @@ Note that `Requirements` calls will look in both the `public` folder (first) and resolving css or javascript files. Any files that aren't in the public folder must be exposed using the composer.json "expose" mechanism described below. -### Expose root project files +### Expose root project files {#expose-root-files} If you have files comitted to source control outside of the `public` folder, but you need them to be available to the web server, you can also use the composer.json `expose` directive to symlink / copy these to `public/resources/`. @@ -212,7 +212,7 @@ For more information on how vendor modules work please see the documentation on [vendor plugin page](https://github.com/silverstripe/vendor-plugin) or the [publishing a module](/developer_guides/extending/how_tos/publish_a_module) documentation. -### Path manipulation helpers +### Path manipulation helpers{#path-manipulation} The following filesystem helpers have been added in order to better support working with cross-platform path manipulation: