From 0a4e7443d243b571d48966828bc3324ffbfd47e5 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Wed, 16 Mar 2016 13:33:52 +0100 Subject: [PATCH 01/22] Fix class doc typos --- lib/Pico.php | 4 ++-- lib/PicoTwigExtension.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Pico.php b/lib/Pico.php index 3d057df..b7be16a 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1140,8 +1140,8 @@ class Pico /** * Registers the twig template engine * - * This method also registers Picos core Twig filters `link` and `content` - * as well as Picos {@link PicoTwigExtension} Twig extension. + * This method also registers Pico's core Twig filters `link` and `content` + * as well as Pico's {@link PicoTwigExtension} Twig extension. * * @see Pico::getTwig() * @return void diff --git a/lib/PicoTwigExtension.php b/lib/PicoTwigExtension.php index c249ff4..aa24fbe 100644 --- a/lib/PicoTwigExtension.php +++ b/lib/PicoTwigExtension.php @@ -1,7 +1,7 @@ Date: Wed, 16 Mar 2016 14:27:42 +0100 Subject: [PATCH 02/22] Fix Date meta header parsing with ISO-8601 datetime strings Symfony YAML interprets ISO-8601 datetime strings and returns timestamps instead of the string. This behavior conforms to the YAML standard, i.e. this is no bug of Symfony YAML. Fixes #336. Thanks @csholmq for reporting this. --- lib/Pico.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/Pico.php b/lib/Pico.php index b7be16a..ffcd6b4 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -791,7 +791,17 @@ class Pico } if (!empty($meta['date'])) { - $meta['time'] = strtotime($meta['date']); + // workaround for issue #336 + // Symfony YAML interprets ISO-8601 datetime strings and returns timestamps instead of the string + // this behavior conforms to the YAML standard, i.e. this is no bug of Symfony YAML + if (is_int($meta['date'])) { + $meta['time'] = $meta['date']; + + $rawDateFormat = (date('H:i:s', $meta['time']) === '00:00:00') ? 'Y-m-d' : 'Y-m-d H:i:s'; + $meta['date'] = date($rawDateFormat, $meta['time']); + } else { + $meta['time'] = strtotime($meta['date']); + } $meta['date_formatted'] = utf8_encode(strftime($this->getConfig('date_format'), $meta['time'])); } else { $meta['time'] = $meta['date_formatted'] = ''; From 5534e401f73f297e35d792e4271c8d37c1f9a2ae Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Wed, 16 Mar 2016 14:30:45 +0100 Subject: [PATCH 03/22] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9430cf..05bf200 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Released: - ``` * [Fixed] Check dependencies when a plugin is enabled by default +* [Fixed] Allow `Pico::$requestFile` to point to somewhere outside `content_dir` +* [Fixed] #336: Fix `Date` meta header parsing with ISO-8601 datetime strings ``` ### Version 1.0.1 From 92b72104dad311217829c70cbbbabe43f1f6b3b3 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Wed, 16 Mar 2016 14:35:41 +0100 Subject: [PATCH 04/22] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05bf200..bf22cd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ Pico Changelog ============== ### Version 1.0.2 -Released: - +Released: 2016-03-16 ``` +* [Changed] Various small improvements and changes... * [Fixed] Check dependencies when a plugin is enabled by default * [Fixed] Allow `Pico::$requestFile` to point to somewhere outside `content_dir` * [Fixed] #336: Fix `Date` meta header parsing with ISO-8601 datetime strings From b31c93acf6ce2ddd7463a1cf1e275f0798390fe4 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Thu, 24 Mar 2016 17:41:26 +0100 Subject: [PATCH 06/22] Inline docs: Fix blogging tutorial Fixes #338. Thank you @marctilman --- content-sample/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content-sample/index.md b/content-sample/index.md index 209369b..d3f0ebb 100644 --- a/content-sample/index.md +++ b/content-sample/index.md @@ -135,10 +135,10 @@ something like the following: {% endif %} {% endfor %} ``` -4. Make sure to exclude the blog articles from your page navigation. You can - achieve this by adding `{% if not page starts with "blog/" %}...{% endif %}` +4. Make sure to exclude blog articles from your page navigation. You can achieve + this by adding `{% if not (page.id starts with "blog/") %}...{% endif %}` to the navigation loop (`{% for page in pages %}...{% endfor %}`) in your - themes `index.twig`. + theme's `index.twig`. ## Customization From 2d2491e36f45a3d3e61597a02fbe4105ca818e34 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Thu, 24 Mar 2016 17:42:40 +0100 Subject: [PATCH 07/22] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf22cd6..0e03d53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ Pico Changelog ============== +### Version 1.0.3 +Released: - + +``` +* [Changed] Improve documentation +``` + ### Version 1.0.2 Released: 2016-03-16 From 3fbcea78378b9ca46422bbaea466582c00f1ba23 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Mon, 4 Apr 2016 13:46:19 +0200 Subject: [PATCH 08/22] Default theme: Add definition list styling Resolves #339. Thanks @Marcussacapuces91 --- themes/default/style.css | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/themes/default/style.css b/themes/default/style.css index a8c0030..eec79e0 100644 --- a/themes/default/style.css +++ b/themes/default/style.css @@ -137,13 +137,12 @@ h3 { margin-top: 2em; } -p, table { +p, table, ol, ul, pre, blockquote, dl { margin-bottom: 1em; } ol, ul { padding-left: 30px; - margin-bottom: 1em; } b, strong { @@ -198,17 +197,20 @@ code { pre { background: #eee; padding: 20px; - margin-bottom: 1em; overflow: auto; } blockquote { font-style: italic; - margin: 0 0 1em 15px; + margin-left: 15px; padding-left: 10px; border-left: 5px solid #dddddd; } +dd { + margin-left: 2em; +} + /* Structure Styles /*---------------------------------------------*/ .inner { From 6557f5684d47fbf71b6fd29769f816fc2d1d1941 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Mon, 4 Apr 2016 13:48:29 +0200 Subject: [PATCH 09/22] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e03d53..81f096a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Released: - ``` * [Changed] Improve documentation +* [Changed] Add CSS rules for definition lists to default theme ``` ### Version 1.0.2 From d8f916691809b19b05104906ee3700c5cf3f8407 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Fri, 15 Apr 2016 17:25:20 +0200 Subject: [PATCH 10/22] Fix nginx configuration example Thanks Robby (via IRC) --- content-sample/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content-sample/index.md b/content-sample/index.md index d3f0ebb..28ffb2d 100644 --- a/content-sample/index.md +++ b/content-sample/index.md @@ -284,13 +284,13 @@ still shows no rewritten URLs, force URL rewriting by setting `$config['rewrite_url'] = true;` in your `config/config.php`. If you're using Nginx, you can use the following configuration to enable -URL rewriting. Don't forget to adjust the path (`/pico/`; line `1` and `4`) +URL rewriting. Don't forget to adjust the path (`/pico`; line `1` and `4`) to match your installation directory. You can then enable URL rewriting by setting `$config['rewrite_url'] = true;` in your `config/config.php`. - location /pico/ { + location ~ ^/pico(.*) { index index.php; - try_files $uri $uri/ /pico/?$uri&$args; + try_files $uri $uri/ /pico/?$1&$args; } ## Documentation From 0e632bdaa191b4efc63fbb70028b50cd2e426b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20Madrigal=20R=C3=ADos?= Date: Sat, 16 Apr 2016 01:14:19 -0600 Subject: [PATCH 11/22] Update style.css Responsive design is currently broken when the width is between 768px and 850px, because the width of inner class is set fixed at 850px --- themes/default/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/default/style.css b/themes/default/style.css index eec79e0..fb012a6 100644 --- a/themes/default/style.css +++ b/themes/default/style.css @@ -214,7 +214,8 @@ dd { /* Structure Styles /*---------------------------------------------*/ .inner { - width: 850px; + width: 100%; + max-width: 850px; margin: 0 auto; } From 27d32430eedf966cbfe139ac5dcc9c2912c9fd46 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sat, 16 Apr 2016 13:57:18 +0200 Subject: [PATCH 12/22] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f096a..020d155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Released: - ``` * [Changed] Improve documentation * [Changed] Add CSS rules for definition lists to default theme +* [Fixed] #342: Fix responsiveness in default theme ``` ### Version 1.0.2 From 8dfb1b14c772da71bb6ce17b48588910c64af40b Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sun, 17 Apr 2016 02:44:41 +0200 Subject: [PATCH 13/22] Improve HTTPS detection with proxies Fixes #344. Thanks @Robby- Implementation details taken from Symfony 3.0.4, method \Symfony\Component\HttpFoundation\Request::isSecure(), see https://github.com/symfony/symfony/blob/v3.0.4/src/Symfony/Component/HttpFoundation/Request.php#L1169-L1192 --- CHANGELOG.md | 1 + lib/Pico.php | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 020d155..a3ae6eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Released: - * [Changed] Improve documentation * [Changed] Add CSS rules for definition lists to default theme * [Fixed] #342: Fix responsiveness in default theme +* [Fixed] #344: Improve HTTPS detection with proxies ``` ### Version 1.0.2 diff --git a/lib/Pico.php b/lib/Pico.php index ffcd6b4..f566a06 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1237,12 +1237,13 @@ class Pico } $protocol = 'http'; - if (!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] !== 'off')) { + if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) { + $secureProxyHeader = strtolower(current(explode(',', $_SERVER['HTTP_X_FORWARDED_PROTO']))); + $protocol = in_array($secureProxyHeader, array('https', 'on', 'ssl', '1')) ? 'https' : 'http'; + } elseif (!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] !== 'off')) { $protocol = 'https'; } elseif ($_SERVER['SERVER_PORT'] == 443) { $protocol = 'https'; - } elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')) { - $protocol = 'https'; } $this->config['base_url'] = From d6accc23ee90edcb063039b4e2d446f36d447cdc Mon Sep 17 00:00:00 2001 From: ghuron Date: Thu, 21 Apr 2016 14:58:47 +0300 Subject: [PATCH 14/22] Use http or https depending on page access --- themes/default/index.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/index.twig b/themes/default/index.twig index 37f8f16..c723c88 100644 --- a/themes/default/index.twig +++ b/themes/default/index.twig @@ -10,7 +10,7 @@ {% endif %} - + From 2d728d56afc091c4af472dd0896ff92f10550021 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Thu, 21 Apr 2016 14:16:14 +0200 Subject: [PATCH 15/22] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3ae6eb..5d3b638 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Released: - * [Changed] Add CSS rules for definition lists to default theme * [Fixed] #342: Fix responsiveness in default theme * [Fixed] #344: Improve HTTPS detection with proxies +* [Fixed] #346: Fix mixed content warning in default theme ``` ### Version 1.0.2 From 4e215fe522b39469a84a508fe3d71c6086183f03 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Thu, 21 Apr 2016 19:18:15 +0200 Subject: [PATCH 16/22] Default theme: Force HTTPS to load Google Fonts See https://github.com/picocms/Pico/pull/346#issuecomment-213000364 (via #346 / d6accc2), thanks @smcdougall --- themes/default/index.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/index.twig b/themes/default/index.twig index c723c88..9d7c691 100644 --- a/themes/default/index.twig +++ b/themes/default/index.twig @@ -10,7 +10,7 @@ {% endif %} - + From 4140ad48acef82c5fc69b0115bfbcdb65c4b9bfb Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Thu, 21 Apr 2016 19:19:03 +0200 Subject: [PATCH 17/22] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d3b638..2fc2d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ Released: - * [Changed] Add CSS rules for definition lists to default theme * [Fixed] #342: Fix responsiveness in default theme * [Fixed] #344: Improve HTTPS detection with proxies -* [Fixed] #346: Fix mixed content warning in default theme +* [Fixed] #346: Force HTTPS to load Google Fonts in default theme ``` ### Version 1.0.2 From 3a36dbd9342f0a68975ed4ee9f3745d5b8ed15df Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sun, 24 Apr 2016 03:25:44 +0200 Subject: [PATCH 18/22] Build system: Add automatic version file updates for picocms.org --- _build/deploy-phpdoc-release.sh | 25 +++++++++++++-- _build/generate-version.sh | 57 +++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 3 deletions(-) create mode 100755 _build/generate-version.sh diff --git a/_build/deploy-phpdoc-release.sh b/_build/deploy-phpdoc-release.sh index 42f11e2..8d3410e 100755 --- a/_build/deploy-phpdoc-release.sh +++ b/_build/deploy-phpdoc-release.sh @@ -6,8 +6,11 @@ fi if [ "$DEPLOY_VERSION_BADGE" != "true" ]; then echo "Skipping version badge deployment because it has been disabled" fi -if [ "$DEPLOY_PHPDOC_RELEASES" != "true" ] || [ "$DEPLOY_VERSION_BADGE" != "true" ]; then - [ "$DEPLOY_PHPDOC_RELEASES" != "true" ] && [ "$DEPLOY_VERSION_BADGE" != "true" ] && exit 0 || echo +if [ "$DEPLOY_VERSION_FILE" != "true" ]; then + echo "Skipping version file deployment because it has been disabled" +fi +if [ "$DEPLOY_PHPDOC_RELEASES" != "true" ] || [ "$DEPLOY_VERSION_BADGE" != "true" ] || [ "$DEPLOY_VERSION_FILE" != "true" ]; then + [ "$DEPLOY_PHPDOC_RELEASES" != "true" ] && [ "$DEPLOY_VERSION_BADGE" != "true" ] && [ "$DEPLOY_VERSION_FILE" != "true" ] && exit 0 || echo fi DEPLOYMENT_ID="${TRAVIS_BRANCH//\//_}" @@ -51,7 +54,7 @@ if [ "$DEPLOY_VERSION_BADGE" == "true" ]; then "release" "$TRAVIS_TAG" "blue" # commit version badge - echo "Committing changes..." + echo "Committing version badge..." git add "$DEPLOYMENT_DIR/badges/pico-version.svg" git commit \ --message="Update version badge for $TRAVIS_TAG" \ @@ -60,6 +63,22 @@ if [ "$DEPLOY_VERSION_BADGE" == "true" ]; then echo fi +# update version file +if [ "$DEPLOY_VERSION_FILE" == "true" ]; then + generate-version.sh \ + "$DEPLOYMENT_DIR/_data/version.yml" \ + "${TRAVIS_TAG#v}" + + # commit version file + echo "Committing version file..." + git add "$DEPLOYMENT_DIR/_data/version.yml" + git commit \ + --message="Update version file for $TRAVIS_TAG" \ + "$DEPLOYMENT_DIR/_data/version.yml" + [ $? -eq 0 ] || exit 1 + echo +fi + # deploy github-deploy.sh "$TRAVIS_REPO_SLUG" "tags/$TRAVIS_TAG" "$TRAVIS_COMMIT" [ $? -eq 0 ] || exit 1 diff --git a/_build/generate-version.sh b/_build/generate-version.sh new file mode 100755 index 0000000..4a3ec8b --- /dev/null +++ b/_build/generate-version.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +## +# Updates the version file +# +# @author Daniel Rudolf +# @link http://picocms.org +# @license http://opensource.org/licenses/MIT +# + +set -e + +# parameters +VERSION_FILE_PATH="$1" # target file path +VERSION_FULL="$2" # full version string (e.g. 1.0.0-beta.1+7b4ad7f) + +# print parameters +echo "Generating version file..." +printf 'VERSION_FILE_PATH="%s"\n' "$VERSION_FILE_PATH" +printf 'VERSION_FULL="%s"\n' "$VERSION_FULL" +echo + +# evaluate version constraint (see http://semver.org/) +printf 'Evaluating version constraint...\n' +if [[ "$VERSION_FULL" =~ ^([0-9]+)\.([0-9]{1,2})\.([0-9]{1,2})(-([0-9A-Za-z\.\-]+))?(\+([0-9A-Za-z\.\-]+))?$ ]]; then + VERSION_MAJOR="${BASH_REMATCH[1]}" + VERSION_MINOR="${BASH_REMATCH[2]}" + VERSION_PATCH="${BASH_REMATCH[3]}" + VERSION_SUFFIX="${BASH_REMATCH[5]}" + VERSION_BUILD="${BASH_REMATCH[7]}" + + VERSION_MILESTONE="$VERSION_MAJOR.$VERSION_MINOR" + VERSION_NAME="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH" + VERSION_ID="$VERSION_MAJOR$(printf '%02d' "$VERSION_MINOR")$(printf '%02d' "$VERSION_PATCH")" +else + echo "Invalid version constraint; skipping..." >&2 + exit 1 +fi + +# generate version file +printf 'Updating version file...\n' +echo -n "" > "$VERSION_FILE_PATH" +exec 3> "$VERSION_FILE_PATH" + +printf 'full: %s\n' "$VERSION_FULL" >&3 +printf 'name: %s\n' "$VERSION_NAME" >&3 +printf 'milestone: %s\n' "$VERSION_MILESTONE" >&3 +printf 'id: %d\n' "$VERSION_ID" >&3 +printf 'major: %d\n' "$VERSION_MAJOR" >&3 +printf 'minor: %d\n' "$VERSION_MINOR" >&3 +printf 'patch: %d\n' "$VERSION_PATCH" >&3 +printf 'suffix: %s\n' "$VERSION_SUFFIX" >&3 +printf 'build: %s\n' "$VERSION_BUILD" >&3 + +exec 3>&- + +echo From 6234be88b02ae465381d26e2d33f93180aae7643 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sun, 24 Apr 2016 04:06:04 +0200 Subject: [PATCH 19/22] Always use `on404Content...` execution path when serving a 404.md --- lib/Pico.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Pico.php b/lib/Pico.php index f566a06..c498faf 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -298,7 +298,8 @@ class Pico // load raw file content $this->triggerEvent('onContentLoading', array(&$this->requestFile)); - if (file_exists($this->requestFile)) { + $notFoundFile = '404' . $this->getConfig('content_ext'); + if (file_exists($this->requestFile) && (basename($this->requestFile) !== $notFoundFile)) { $this->rawContent = $this->loadFileContent($this->requestFile); } else { $this->triggerEvent('on404ContentLoading', array(&$this->requestFile)); From 49cb6c144a6c8a11b408667138046c61978e92cc Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sun, 24 Apr 2016 04:06:40 +0200 Subject: [PATCH 20/22] Use Pico's 404.md to deny access to lib, content... dirs --- .htaccess | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index 192f3a4..aa6d489 100644 --- a/.htaccess +++ b/.htaccess @@ -1,11 +1,11 @@ RewriteEngine On - #May be required to access sub-directories + # May be required to access sub directories #RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L,QSA] - RewriteRule ^(config|content|content-sample|lib|vendor)/.* - [R=404,L] + RewriteRule ^(.git|config|content|content-sample|lib|vendor)/.* index.php?404 [L] SetEnv PICO_URL_REWRITING 1 From 8b1539640dfefed171eb714af408e0518ed76561 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sun, 24 Apr 2016 04:06:47 +0200 Subject: [PATCH 21/22] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fc2d91..2c478c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ Released: - ``` * [Changed] Improve documentation * [Changed] Add CSS rules for definition lists to default theme +* [Changed] Always use `on404Content...` execution path when serving a `404.md` +* [Changed] Deny access to `.git` directory (`.htaccess` file) +* [Changed] Use Pico's `404.md` to deny access to `.git`, `config`, `content`, +* `content-sample`, `lib` and `vendor` dirs (`.htaccess` file) * [Fixed] #342: Fix responsiveness in default theme * [Fixed] #344: Improve HTTPS detection with proxies * [Fixed] #346: Force HTTPS to load Google Fonts in default theme From 31e55ca24a9cf01200a360e01a37cdc9c241c054 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sun, 24 Apr 2016 04:14:58 +0200 Subject: [PATCH 22/22] .htaccess: Pass full URL to Pico when requesting content, lib... dirs This allows Pico to e.g. serve content/config.md when http://example.com/pico/config/ is requested --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index aa6d489..9e7ac73 100644 --- a/.htaccess +++ b/.htaccess @@ -5,7 +5,7 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L,QSA] - RewriteRule ^(.git|config|content|content-sample|lib|vendor)/.* index.php?404 [L] + RewriteRule ^(.git|config|content|content-sample|lib|vendor)/.*$ index.php?$0 [L,QSA] SetEnv PICO_URL_REWRITING 1