diff --git a/.gitignore b/.gitignore
index ec7927e..91e9b1b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
/assets/
-/htdocs/2.4/
-/htdocs/master/
-/htdocs/3.*/
/vendor/
+/modulesource/
+/en/
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..6946d88
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,32 @@
+
+ SetEnv HTTP_MOD_REWRITE On
+ RewriteEngine On
+
+ # "Symlink" the root to the latest release (with "moved temporarily")
+ RewriteRule ^/?$ /en/3.6/ [R=302,L]
+
+ # Remove trailing slashes, ensures the redirect to en works
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^(.*)/$ /$1 [L,R]
+
+ # Lookup script (used to be a SS app, now just a simple script)
+ RewriteCond %{REQUEST_URI} ^/search/lookup$
+ RewriteRule ^search/lookup /search/lookup.php [L,R=301,QSA]
+
+ # "Symlink" a "current" folder to the latest release
+ RewriteRule ^.*/current.*?(.*)? /en/3.6/$1 [R=301,L]
+
+ # Rewrite trunk to master
+ RewriteRule ^.*/trunk/.*(.*)? /en/master/$1 [L,R=301]
+
+ # Docs are stored in en - serve from there
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_URI} !^.*/en/.*$ [NC]
+ RewriteRule .* /en%{REQUEST_URI} [L,R=301]
+
+ # Rewrite PHPDocumentor links for apigen
+ RewriteCond %{REQUEST_FILENAME} !^class-
+ RewriteRule ^/?(trunk|[23]\.[0-9])/.*/(.+)\.html$ /$1/class-$2.html [R=301]
+
+ ErrorDocument 404 /errors/404.html
+
\ No newline at end of file
diff --git a/.platform.yml b/.platform.yml
new file mode 100644
index 0000000..bc4ca00
--- /dev/null
+++ b/.platform.yml
@@ -0,0 +1,12 @@
+infrastructure: ^3
+shared_dirs:
+ mysite:
+ modulesource: {}
+ en: {}
+crons:
+ mytask:
+ time: "0 3 * * *"
+ command: "/var/www/mysite/www/makedoc.sh | logger -t SilverStripe_cron"
+url_rules:
+ mysite:
+ - '^.*html': 'apache'
diff --git a/README.md b/README.md
index 94e0e2d..99465d1 100644
--- a/README.md
+++ b/README.md
@@ -32,21 +32,17 @@ generated through [APIGen](http://apigen.org/).
### Add a New Version
* Copy a version section block in `makedoc.sh` and update the version number
- * Update the .gitignore to ignore any new files generated in `htdocs` (you don't want to commit the static generated files!)
+ * Update the .gitignore to ignore any new files generated in `en` which is a directory synlinked outside of the web root (you don't want to commit the static generated files!)
* Run `makedoc.sh` and confirm the generation runs through properly
* Make a commit of the updated `makedoc.sh`
- * Update the redirections in `htdocs/.htaccess` to the stable version number
+ * Update the redirections in `.htaccess` to the stable version number
* Make a separate commit with the redirection (explained in deployment below)
**Please note:** Often the `master` branch will be representing an unstable major version (currently 4). When this needs
-to be updated, please edit `htdocs/search/lookup.php`.
+to be updated, please edit `search/lookup.php`.
### Deployment to production
- 1. Raise a ticket with ops team (they have to run a script after deployment)
- 2. Login to SilverStripe Platform (you'll need to ensure you have "api" stack permissions)
- 3. Deploy the commit that contains the update to `makedoc.sh`
- 4. Ops will run this script to generate the new static files.
- 5. Once this is complete, deploy the commit with the redirects.
+ This is now hosted on SilverStripe Platform, you can deploy from the dashboard. `makedoc.sh` is run on a nightly cron as defined in `platform.yml`.
### Symbol Lookup
diff --git a/htdocs/browserconfig.xml b/browserconfig.xml
similarity index 100%
rename from htdocs/browserconfig.xml
rename to browserconfig.xml
diff --git a/conf/apigen/templates/@layout.latte b/conf/apigen/templates/@layout.latte
index bce1d21..08c1a92 100644
--- a/conf/apigen/templates/@layout.latte
+++ b/conf/apigen/templates/@layout.latte
@@ -20,28 +20,27 @@ the file LICENSE.md that was distributed with this source code.
-