Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Merge pull request #127 from creative-commoners/pulls/master/… #128

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .github/workflows/deploy-gh-pages.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On


### =============== Legacy redirects ===============

# Packages no longer exist
RewriteCond %{REQUEST_URI} ^(.*)en/.*/package-.*\.html [NC]
RewriteRule ^(.*)$ %1 [L,R=302]

# 2.x no longer exists
RewriteCond %{REQUEST_URI} ^(.*)en/2[.] [NC]
RewriteRule ^(.*)$ %1 [L,R=302]

# Redirect non-languaged minor versions to major version, e.g. /3.1/DataObject.html to /3/DataObject.html
RewriteCond %{REQUEST_URI} ^(.*)(\d)[.]\d/(.*)$ [NC]
RewriteRule ^(\d)\.\d/(.*)$ %1%2/%3 [L,R=302]

# Redirect language minor version to major version, e.g. /en/3.1/File.html to /3/File.html
RewriteCond %{REQUEST_URI} ^(.*)en/([\d]+)[.][\w.]+/(.*)$ [NC]
RewriteRule ^(.*)$ %1%2/%3 [L,R=302]

# Class redirect. E.g.
# /4/class-SilverStripe.AssetAdmin.Forms.FileSearchFormFactory.html
# /4/SilverStripe/AssetAdmin/Forms/FileSearchFormFactory.html
RewriteCond %{REQUEST_URI} ^(.*)([\w.]+)/class-([\w]+)\.html [NC]
RewriteRule ^(.*)$ %1%2/%3.html [L,R=302]
RewriteCond %{REQUEST_URI} ^(.*)([\w.]+)/class-([\w]+)\.([\w]+)\.html [NC]
RewriteRule ^(.*)$ %1%2/%3/%4.html [L,R=302]
RewriteCond %{REQUEST_URI} ^(.*)([\w.]+)/class-([\w]+)\.([\w]+)\.([\w]+)\.html [NC]
RewriteRule ^(.*)$ %1%2/%3/%4/%5.html [L,R=302]
RewriteCond %{REQUEST_URI} ^(.*)([\w.]+)/class-([\w]+)\.([\w]+)\.([\w]+)\.([\w]+)\.html [NC]
RewriteRule ^(.*)$ %1%2/%3/%4/%5/%6.html [L,R=302]
RewriteCond %{REQUEST_URI} ^(.*)([\w.]+)/class-([\w]+)\.([\w]+)\.([\w]+)\.([\w]+)\.([\w]+)\.html [NC]
RewriteRule ^(.*)$ %1%2/%3/%4/%5/%6/%7.html [L,R=302]
RewriteCond %{REQUEST_URI} ^(.*)([\w.]+)/class-([\w]+)\.([\w]+)\.([\w]+)\.([\w]+)\.([\w]+)\.([\w]+)\.html [NC]
RewriteRule ^(.*)$ %1%2/%3/%4/%5/%6/%7/%8.html [L,R=302]

### ============= End Legacy redirects =============

# Lookup script (used to be a SS app, now just a simple script)
# E.g. http://api.silverstripe.org.loc/search/lookup/?q=SilverStripe\ORM\HasManyList&version=4&module=framework
RewriteCond %{REQUEST_URI} ^(.*)search/lookup [NC]
RewriteRule ^/?search/lookup(/|$) %1search/lookup.php [L,R=302,QSA]

# Symlink to 5 index.html - default major version
RewriteCond %{REQUEST_URI} ^(.*)$ [NC]
RewriteRule ^/?$ %15/index.html [R=302,L]

# Serve docs in htdocs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} .* [NC]
RewriteRule ^(.*)$ htdocs/$1

# 404 handling
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* errors/404.html
</IfModule>
17 changes: 17 additions & 0 deletions .platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
infrastructure: ^3
php_settings:
version: 8.1
cli:
max_execution_time: 0
shared_dirs:
mysite:
data: {}
htdocs: {}
crons:
mytask:
time: "0 3 * * *"
command: "/var/www/mysite/www/makedoc.sh | logger -t SilverStripe_cron"
vhost: "mysite"
url_rules:
mysite:
- '^.*': 'apache'
12 changes: 12 additions & 0 deletions browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/mstile-70x70.png"/>
<square150x150logo src="/mstile-150x150.png"/>
<square310x310logo src="/mstile-310x310.png"/>
<wide310x150logo src="/mstile-310x150.png"/>
<TileColor>#005b94</TileColor>
</tile>
</msapplication>
</browserconfig>
1 change: 0 additions & 1 deletion conf/doctum.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"4": "4.x",
"3": "3.x"
},
"default_version": "5",
"paths": {
"www": "htdocs",
"cache": "data/cache",
Expand Down
5 changes: 2 additions & 3 deletions conf/doctum.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use Doctum\Project;
use Doctum\Doctum;
use SilverStripe\ApiDocs\Data\ApiJsonStore;
use SilverStripe\ApiDocs\Data\Config;
use SilverStripe\ApiDocs\Inspections\RecipeFinder;
use SilverStripe\ApiDocs\Inspections\RecipeVersionCollection;
use SilverStripe\ApiDocs\RemoteRepository\SilverStripeRemoteRepository;
use SilverStripe\ApiDocs\SilverstripeProject;

// Get config
$config = Config::getConfig();
Expand Down Expand Up @@ -70,7 +70,7 @@
// Override project
unset($doctum['project']);
$doctum['project'] = function ($sc) {
$project = new SilverstripeProject($sc['store'], $sc['_versions'], array(
$project = new Project($sc['store'], $sc['_versions'], array(
'build_dir' => $sc['build_dir'],
'cache_dir' => $sc['cache_dir'],
'remote_repository' => $sc['remote_repository'],
Expand All @@ -82,7 +82,6 @@
'source_dir' => $sc['source_dir'],
'insert_todos' => $sc['insert_todos'],
'base_url' => $sc['base_url'],
'favicon' => '/favicon.ico',
'footer_link' => [
'href' => 'https://github.com/silverstripe/api.silverstripe.org',
'rel' => 'noreferrer noopener',
Expand Down
40 changes: 0 additions & 40 deletions conf/themes/silverstripe/404.twig

This file was deleted.

16 changes: 0 additions & 16 deletions conf/themes/silverstripe/main_index.twig

This file was deleted.

68 changes: 0 additions & 68 deletions conf/themes/silverstripe/main_search.twig

This file was deleted.

24 changes: 24 additions & 0 deletions errors/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<!--[if lt IE 7 ]><html lang="en-GB" class="no-js lte6 lte7 lte8 lte9 lte10"><![endif]-->
<!--[if IE 7 ]><html lang="en-GB" class="no-js lte7 lte8 lte9 lte10"><![endif]-->
<!--[if IE 8 ]><html lang="en-GB" class="no-js lte8 lte9 lte10"><![endif]-->
<!--[if IE 9 ]><html lang="en-GB" class="no-js lte9 lte10"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en-GB" class="no-js"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>Page not found &raquo; SilverStripe API docs</title>
<link rel="stylesheet" type="text/css" href="/errors/error-styles.css">
</head>
<body>
<div class="gif_holder">
<div class="color_overlay">
<div class="text_container">
<h2>Whoa 404, either we broke something or you had a typing mishap :-/</h2>
<h3> Let's go back <a href="/">home.</a></h3>
</div>
</div>
</body>
</html>
6 changes: 3 additions & 3 deletions static/css/error-styles.css → errors/error-styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.gif_holder {
background-image: url('/images/page-not-found.gif');
background-image: url('https://www.silverstripe.com/themes/ssv3/img/banners/page-not-found.gif');
position: relative;
z-index: 807;
-webkit-background-size: cover;
Expand Down Expand Up @@ -52,5 +52,5 @@ a:hover {

body {
padding: 0;
margin: 0;
}
margin: 0;"
}
Loading
Loading