Skip to content

Commit a662bcd

Browse files
committed
merge gh-pages4.x into gh-pages
1 parent 2e3177f commit a662bcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+4020
-492
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
node_modules
22
npm-debug.log
3+
package-lock.json
34
_site
45
.DS_Store
56
/.idea/
7+

404.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
Page not found! :(
1111

1212
<script>
13-
if (window.location.pathname.indexOf('/docs/') >= 0 && window.location.pathname.indexOf('/v3/') <= 0) {
13+
if (window.location.pathname.indexOf('/docs/') !== -1) {
14+
if (window.location.pathname.indexOf('/v4/') !== -1) {
15+
window.location = '/docs/v4' + window.location.pathname.substr(5);
16+
} else if (window.location.pathname.indexOf('/v3/') !== -1) {
1417
window.location = '/docs/v3' + window.location.pathname.substr(5);
18+
} else if (window.location.pathname.indexOf('/v2/') !== -1) {
19+
window.location = '/docs/v2' + window.location.pathname.substr(5);
20+
}
1521
}
16-
</script>
22+
</script>

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
source 'https://rubygems.org'
22
gem 'github-pages', group: :jekyll_plugins
3+
4+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
5+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Gemfile.lock

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ GEM
2424
ethon (0.12.0)
2525
ffi (>= 1.3.0)
2626
eventmachine (1.2.7)
27+
eventmachine (1.2.7-x64-mingw32)
2728
execjs (2.7.0)
2829
faraday (0.15.4)
2930
multipart-post (>= 1.2, < 3)
@@ -236,13 +237,17 @@ GEM
236237
ethon (>= 0.9.0)
237238
tzinfo (1.2.5)
238239
thread_safe (~> 0.1)
239-
unicode-display_width (1.5.0)
240+
tzinfo-data (1.2018.5)
241+
tzinfo (>= 1.0.0)
242+
unicode-display_width (1.4.0)
240243

241244
PLATFORMS
242245
ruby
246+
x64-mingw32
243247

244248
DEPENDENCIES
245249
github-pages
250+
tzinfo-data
246251

247252
BUNDLED WITH
248253
2.0.1

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@ This is the repository for the Slim website at www.slimframework.com.
88
If you spot any errors, typos or missing information, please submit a pull
99
request.
1010

11-
### Running locally
11+
### Windows User
12+
You need to make sure you have [Ruby Devkit Installed (MSYS2)](https://rubyinstaller.org/add-ons/devkit.html).
1213

13-
To run this site locally so that you can test your changes:
14+
### Running Locally
1415

15-
* `$ sudo gem install bundler`
16-
* `$ bundle install`
16+
To run this site locally so that you can test your changes:
17+
```bash
18+
$ sudo gem install bundler
19+
$ bundle install
20+
```
1721

1822
Now, run the local jekyll:
19-
20-
$ bundle exec jekyll serve
23+
```bash
24+
$ bundle exec jekyll serve
25+
```
2126

2227
and browse to http://localhost:4000
2328

@@ -27,13 +32,22 @@ The CSS uses Less and is managed by `grunt`.
2732

2833
Install the tool chain:
2934

30-
* `$ npm install -g grunt-cli`
31-
* `$ npm install`
32-
35+
```bash
36+
$ npm install -g grunt-cli
37+
$ npm install
38+
```
3339

3440
To change any CSS, edit the appropriate files in `assets\less` and then run:
3541

36-
* `$ grunt`
42+
```bash
43+
$ grunt
44+
```
3745

3846
You can also run `grunt watch` to automatically rebuild when you make CSS
3947
changes.
48+
49+
### Build Instructions For Deployment
50+
51+
```bash
52+
$ bundle exec jekyll build
53+
```

_config.yml

Lines changed: 88 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ markdown: kramdown
33
timezone: America/New_York
44
title: Slim Framework
55
url: http://www.slimframework.com
6+
slim_version: v4
7+
slim_docs_versions: v2, v3, v4
68
slim_website_repo: https://github.com/slimphp/Slim-Website/tree/gh-pages/
79
urlBasePath:
810
include: [.htaccess]
@@ -19,10 +21,87 @@ defaults:
1921
path: ""
2022
type: "pages"
2123
values:
22-
docs:
24+
docs-v4:
2325
- title: Get Started
2426
items:
25-
- [/docs, Home]
27+
- [/docs/v4, Home]
28+
- [/docs/v4/start/installation.md, Installation]
29+
- [/docs/v4/start/upgrade.md, Upgrade Guide]
30+
- [/docs/v4/start/web-servers.md, Web Servers]
31+
- [/docs/v4/deployment/deployment.md, Deployment]
32+
- title: Concepts
33+
items:
34+
- [/docs/v4/concepts/life-cycle.md, Application Life Cycle]
35+
- [/docs/v4/concepts/value-objects.md, PSR-7]
36+
- [/docs/v4/concepts/middleware.md, Middleware]
37+
- [/docs/v4/concepts/di.md, Dependency Container]
38+
- title: The Application
39+
items:
40+
- [/docs/v4/objects/application.md, Overview]
41+
- [/docs/v4/objects/application.md#notices-and-warnings-handling, Notices & Warnings Handling]
42+
- title: The Request
43+
items:
44+
- [/docs/v4/objects/request.md, Overview]
45+
- [/docs/v4/objects/request.md#the-request-method, Method]
46+
- [/docs/v4/objects/request.md#the-request-headers, Headers]
47+
- [/docs/v4/objects/request.md#the-request-body, Body]
48+
- [/docs/v4/objects/request.md#uploaded-files, Uploaded Files]
49+
- [/docs/v4/objects/request.md#request-helpers, Helpers]
50+
- [/docs/v4/objects/request.md#route-object, Route object]
51+
- [/docs/v4/objects/request.md#media-type-parsers, Media type parsers]
52+
53+
- title: The Response
54+
items:
55+
- [/docs/v4/objects/response.md, Overview]
56+
- [/docs/v4/objects/response.md#the-response-status, Status]
57+
- [/docs/v4/objects/response.md#the-response-headers, Headers]
58+
- [/docs/v4/objects/response.md#the-response-body, Body]
59+
- [/docs/v4/objects/response.md#returning-json, JSON]
60+
- title: Routing
61+
items:
62+
- [/docs/v4/objects/routing.md, Overview]
63+
- [/docs/v4/objects/routing.md#how-to-create-routes, Create Routes]
64+
- [/docs/v4/objects/routing.md#route-callbacks, Callbacks]
65+
- [/docs/v4/objects/routing.md#route-strategies, Strategies]
66+
- [/docs/v4/objects/routing.md#route-placeholders, Placeholders]
67+
- [/docs/v4/objects/routing.md#route-names, Names]
68+
- [/docs/v4/objects/routing.md#route-groups, Groups]
69+
- [/docs/v4/objects/routing.md#route-middleware, Middleware]
70+
- [/docs/v4/objects/routing.md#router-caching, Caching]
71+
- [/docs/v4/objects/routing.md#container-resolution, Container Resolution]
72+
- title: Packaged Middleware
73+
items:
74+
- [/docs/v4/middleware/routing.md, Routing]
75+
- [/docs/v4/middleware/error-handling.md, Error Handling]
76+
- [/docs/v4/middleware/method-overriding.md, Method Overriding]
77+
- [/docs/v4/middleware/output-buffering.md, Output Buffering]
78+
- [/docs/v4/middleware/content-length.md, Content Length]
79+
- title: Cook book
80+
items:
81+
- [/docs/v4/cookbook/route-patterns.md, Trailing / in routes]
82+
- [/docs/v4/cookbook/retrieving-current-route.md, Retrieving Current Route]
83+
- [/docs/v4/cookbook/enable-cors.md, Enabling CORS]
84+
- [/docs/v4/cookbook/uploading-files.md, Uploading Files using POST forms]
85+
- title: Contributing
86+
items:
87+
- [/docs/v4/contributors/strategy.md, Branching Strategy]
88+
- [/docs/v4/contributors/guidelines.md, Guidelines]
89+
90+
- scope:
91+
path: "docs/v4"
92+
type: "pages"
93+
values:
94+
layout: docs-v4
95+
96+
-
97+
scope:
98+
path: ""
99+
type: "pages"
100+
values:
101+
docs-v3:
102+
- title: Get Started
103+
items:
104+
- [/docs/v3, Home]
26105
- [/docs/v3/start/installation.md, Installation]
27106
- [/docs/v3/start/upgrade.md, Upgrade Guide]
28107
- [/docs/v3/start/web-servers.md, Web Servers]
@@ -33,7 +112,8 @@ defaults:
33112

34113
- title: Concepts
35114
items:
36-
- [/docs/v3/concepts/value-objects.md, PSR 7]
115+
- [/docs/v3/concepts/life-cycle.md, Application Life Cycle]
116+
- [/docs/v3/concepts/value-objects.md, PSR-7]
37117
- [/docs/v3/concepts/middleware.md, Middleware]
38118
- [/docs/v3/concepts/di.md, Dependency Container]
39119
- title: The Application
@@ -94,17 +174,17 @@ defaults:
94174
- [/docs/v3/features/csrf.md, CSRF Protection]
95175
- [/docs/v3/features/flash.md, Flash Messages]
96176
- ['https://github.com/slimphp/Slim/wiki/Middleware-for-Slim-Framework-v3.x', 3rd Party]
97-
98177
- title: Contributing
99178
items:
100179
- [/docs/v3/contributors/strategy.md, Branching Strategy]
101180
- [/docs/v3/contributors/guidelines.md, Guidelines]
102-
-
103-
scope:
104-
path: "docs"
181+
182+
- scope:
183+
path: "docs/v3"
105184
type: "pages"
106185
values:
107-
layout: docs
186+
layout: docs-v3
187+
108188
-
109189
scope:
110190
path: ""

_includes/header.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<link rel="stylesheet" href="/assets/css/all.css"/>
1717
<link rel="shortcut icon" href="/assets/images/favicon.png"/>
1818
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
19+
<link href="https://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet">
1920
<script src="https://use.typekit.net/yjz4fyo.js"></script>
2021
<script>try{Typekit.load();}catch(e){}</script>
2122
<script>
@@ -29,7 +30,7 @@
2930
})();
3031
</script>
3132
</head>
32-
<body style="padding-top: 5em">
33+
<body>
3334
<nav class="navbar navbar-default navbar-fixed-top">
3435
<div class="container-fluid">
3536
<!-- Brand and toggle get grouped for better mobile display -->
@@ -40,17 +41,27 @@
4041
<span class="icon-bar"></span>
4142
<span class="icon-bar"></span>
4243
</button>
43-
<a class="navbar-brand" href="/"><img src="/assets/images/favicon.png" height="24px" alt="Slim"/></a>
44+
<a class="navbar-logo" href="/">Slim</a>
4445
</div>
4546

4647
<!-- Collect the nav links, forms, and other content for toggling -->
4748
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
4849
<ul class="nav navbar-nav">
4950
<li{% if page.url contains "/blog" %} class="active"{% endif %}><a href="/blog">Blog</a></li>
50-
<li{% if page.url contains "/docs" %} class="active"{% endif %}><a href="/docs">User Guide</a></li>
51+
<li{% if page.url contains "/docs" %} class="active"{% endif %}><a href="/docs/{{ site.slim_version }}">User Guide</a></li>
5152
<li><a href="http://discourse.slimframework.com/">Support</a></li>
5253
<li{% if page.url contains "/contribute" %} class="active"{% endif %}><a href="/contribute">Contribute</a></li>
5354
</ul>
55+
{% if page.url contains "/docs/v" %}
56+
{% assign versions = site.slim_docs_versions | split: ", " %}
57+
{% for version in versions %}
58+
{% if page.url contains version %}
59+
<div class="navbar-documentation-version-badge">
60+
<span>{{ version }} Documentation</span>
61+
</div>
62+
{% endif %}
63+
{% endfor %}
64+
{% endif %}
5465
</div>
5566
</div>
5667
</nav>

_includes/maintainers.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<footer class="site-footer">
2+
<p>
3+
Created and maintained by <br/>
4+
<a href="http://joshlockhart.com">Josh Lockhart</a>,
5+
<a href="http://www.silentworks.co.uk" target="_blank">Andrew Smith</a>,
6+
<a href="http://akrabat.com/" target="_blank">Rob Allen</a>,
7+
<a href="http://www.lgse.com/" target="_blank">Pierre Bérubé</a>, and the
8+
<a href="https://github.com/orgs/slimphp/people" target="_blank">Slim Framework Team</a>
9+
</p>
10+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" style="margin: 0; padding-top: 20px">
11+
<input type="hidden" name="cmd" value="_s-xclick">
12+
<input type="hidden" name="hosted_button_id" value="9YRVXHRZT6H3L">
13+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
14+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
15+
</form>
16+
</footer>

_includes/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</div>
55

66
<div class="col-md-3 slim-button-wrapper">
7-
<a class="slim-button" href="/docs"><i class="fa fa-book"></i><span>User Guide</span></a>
7+
<a class="slim-button" href="/docs/{{ site.slim_version }}"><i class="fa fa-book"></i><span>User Guide</span></a>
88
</div>
99

1010
<div class="col-md-3 slim-button-wrapper">

_includes/search-box.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<h3 class="toc-title">Search</h3>
2+
<div class="svg-icons" style="height: 0; width: 0; position: absolute; visibility: hidden">
3+
<svg xmlns="http://www.w3.org/2000/svg">
4+
<symbol id="sbx-icon-clear-3" viewBox="0 0 40 40"><path d="M16.228 20L1.886 5.657 0 3.772 3.772 0l1.885 1.886L20 16.228 34.343 1.886 36.228 0 40 3.772l-1.886 1.885L23.772 20l14.342 14.343L40 36.228 36.228 40l-1.885-1.886L20 23.772 5.657 38.114 3.772 40 0 36.228l1.886-1.885L16.228 20z" fill-rule="evenodd"/></symbol>
5+
<symbol id="sbx-icon-search-13" viewBox="0 0 40 40"><path d="M26.806 29.012a16.312 16.312 0 0 1-10.427 3.746C7.332 32.758 0 25.425 0 16.378 0 7.334 7.333 0 16.38 0c9.045 0 16.378 7.333 16.378 16.38 0 3.96-1.406 7.593-3.746 10.426L39.547 37.34c.607.608.61 1.59-.004 2.203a1.56 1.56 0 0 1-2.202.004L26.807 29.012zm-10.427.627c7.322 0 13.26-5.938 13.26-13.26 0-7.324-5.938-13.26-13.26-13.26-7.324 0-13.26 5.936-13.26 13.26 0 7.322 5.936 13.26 13.26 13.26z" fill-rule="evenodd"/></symbol>
6+
</svg>
7+
</div>
8+
<form novalidate="novalidate" onsubmit="return false;" class="searchbox" style="visibility:hidden;height:0;margin-bottom:30px">
9+
<div role="search" class="searchbox__wrapper">
10+
<input id="docsearch" type="search" name="search" placeholder="Search in the doc" autocomplete="off" required="required" class="searchbox__input">
11+
<button type="submit" title="Submit your search query." class="searchbox__submit" >
12+
<svg role="img" aria-label="Search">
13+
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#sbx-icon-search-13"></use>
14+
</svg>
15+
</button>
16+
<button type="reset" title="Clear the search query." class="searchbox__reset hide">
17+
<svg role="img" aria-label="Reset">
18+
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#sbx-icon-clear-3"></use>
19+
</svg>
20+
</button>
21+
</div>
22+
</form>

0 commit comments

Comments
 (0)