Commit graph

663 commits

Author SHA1 Message Date
Daniel Rudolf 6465c2b0a9
Support REQUEST_URI routing method
With Pico 1.0 you had to setup URL rewriting (e.g. using `mod_rewrite` on Apache) in a way that rewritten URLs follow the `QUERY_STRING` principles. Starting with version 1.1, Pico additionally supports the `REQUEST_URI` routing method, what allows you to simply rewrite all requests to just `index.php`. Pico then reads the requested page from the `REQUEST_URI` environment variable provided by the webserver. Please note that `QUERY_STRING` takes precedence over `REQUEST_URI`.
2016-04-24 20:11:05 +02:00
Daniel Rudolf 31e55ca24a
.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
2016-04-24 04:14:58 +02:00
Daniel Rudolf 8b1539640d
Update CHANGELOG.md 2016-04-24 04:06:47 +02:00
Daniel Rudolf 49cb6c144a
Use Pico's 404.md to deny access to lib, content... dirs 2016-04-24 04:06:40 +02:00
Daniel Rudolf 6234be88b0
Always use on404Content... execution path when serving a 404.md 2016-04-24 04:06:04 +02:00
Daniel Rudolf 3a36dbd934
Build system: Add automatic version file updates for picocms.org 2016-04-24 03:25:55 +02:00
Daniel Rudolf d19621a908
Improve themes dir guessing; add $config['theme_url'] config 2016-04-24 01:22:43 +02:00
Daniel Rudolf 1b3ef7516d
Drop the "index" part of URLs
Closes #347. Thanks @Robby-
2016-04-23 21:41:09 +02:00
Daniel Rudolf a119122497 Fix coding standard violation 2016-04-22 14:31:14 +02:00
Daniel Rudolf b133f6dae5 Add Pico::VERSION_ID (like PHP_VERSION_ID) 2016-04-22 14:23:46 +02:00
Daniel Rudolf 4140ad48ac Update CHANGELOG.md 2016-04-21 19:19:03 +02:00
Daniel Rudolf 4e215fe522 Default theme: Force HTTPS to load Google Fonts
See https://github.com/picocms/Pico/pull/346#issuecomment-213000364 (via #346 / d6accc2), thanks @smcdougall
2016-04-21 19:18:15 +02:00
Daniel Rudolf 2d728d56af Update CHANGELOG.md 2016-04-21 14:16:14 +02:00
Daniel Rudolf 32be061cd6 Merge pull request #346 from ghuron/patch-1
Use http or https depending on page access
2016-04-21 14:14:41 +02:00
ghuron d6accc23ee Use http or https depending on page access 2016-04-21 14:58:47 +03:00
Daniel Rudolf 8dfb1b14c7
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
2016-04-17 02:44:41 +02:00
Daniel Rudolf 27d32430ee Update CHANGELOG.md 2016-04-16 13:57:18 +02:00
Daniel Rudolf 2678473e09 Merge pull request #342 from ErickMR19/patch-1
Update style.css
2016-04-16 13:55:47 +02:00
Erick Madrigal Ríos 0e632bdaa1 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
2016-04-16 01:14:19 -06:00
Daniel Rudolf d8f9166918
Fix nginx configuration example
Thanks Robby (via IRC)
2016-04-15 17:25:20 +02:00
Daniel Rudolf 6557f5684d Update CHANGELOG.md 2016-04-04 13:48:29 +02:00
Daniel Rudolf 3fbcea7837 Default theme: Add definition list styling
Resolves #339. Thanks @Marcussacapuces91
2016-04-04 13:46:19 +02:00
Daniel Rudolf 2d2491e36f Update CHANGELOG.md 2016-03-24 17:42:40 +01:00
Daniel Rudolf b31c93acf6 Inline docs: Fix blogging tutorial
Fixes #338. Thank you @marctilman
2016-03-24 17:41:26 +01:00
Daniel Rudolf 46781c7c7b Version 1.0.2
```
* [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
```
2016-03-16 14:36:08 +01:00
Daniel Rudolf 92b72104da Update CHANGELOG.md 2016-03-16 14:35:41 +01:00
Daniel Rudolf 5534e401f7 Update CHANGELOG.md 2016-03-16 14:30:45 +01:00
Daniel Rudolf bbd8ef8847 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.
2016-03-16 14:27:42 +01:00
Daniel Rudolf 0a4e7443d2 Fix class doc typos 2016-03-16 13:33:52 +01:00
Daniel Rudolf d56d3f8c8c Revert "Default theme: Move elements into Twig blocks"
This reverts commit a3fa373119.

At first glance this adds flexibility, but at the moment it is impossible with Twig to ensure the existance of a block. As a result, custom themes may break the plugin. A custom theme should overwrite a plugin's template explicitly.
2016-03-12 00:18:49 +01:00
Daniel Rudolf 3d11b8a979 Replace is_a() function calls with instanceof operator 2016-03-11 19:07:45 +01:00
Daniel Rudolf dc621b24cd Improve class docs of Pico::loadConfig() 2016-03-06 21:00:00 +01:00
Daniel Rudolf 988a23fd02 Modular config: Load config from any config/*.config.php
Resolves #330

After loading the `config/config.php`, Pico proceeds with any existing `config/*.config.php` in alphabetical order. The file order is crucial: Config values which has been set already, cannot be overwritten by a succeeding file. This is also true for arrays, i.e. when specifying `$config['test'] = array('foo' => 'bar')` in `config/a.config.php` and `$config['test'] = array('baz' => 42)` in `config/b.config.php`, `$config['test']['baz']` will be undefined
2016-03-06 20:55:46 +01:00
Daniel Rudolf cd74b681f5 Fix scope isolated config includes 2016-03-06 20:47:25 +01:00
Daniel Rudolf 75d5081bfb Use scope isolated includes for plugins & config 2016-03-06 20:06:24 +01:00
Daniel Rudolf 5bb1c325ff Add onSinglePageLoading event; allow skipping pages in onSinglePageLoaded 2016-03-06 00:54:36 +01:00
Daniel Rudolf 245cd15770 Refactor Pico::prepareFileContent() for better performance 2016-03-06 00:49:45 +01:00
Daniel Rudolf 479926eeb4 Add Pico::VERSION constant 2016-03-06 00:38:51 +01:00
Daniel Rudolf 43705d0f76 Minor code refactoring 2016-03-06 00:29:40 +01:00
Daniel Rudolf 0d40259c06 Merge branch 'master' into pico-1.1 2016-03-03 00:34:41 +01:00
Daniel Rudolf 8426a53f63 Allow Pico::$requestFile to point to somewhere outside content_dir
Bugfix; Refactoring Pico::load404Content() and Pico::discoverCurrentPage()
2016-03-03 00:04:31 +01:00
Daniel Rudolf 2a3e2fa576 Fix typos in class docs/exception messages 2016-03-02 22:10:49 +01:00
Daniel Rudolf 1709b920d1 Add AbstractPicoPlugin::getPluginConfig() method 2016-03-02 21:46:35 +01:00
Daniel Rudolf a3fa373119 Default theme: Move elements into Twig blocks
Allows plugins to extend the default template
2016-03-02 21:44:38 +01:00
Daniel Rudolf 86614a3ab4 Default theme: Use flexbox to grow content div 2016-03-02 21:40:58 +01:00
Daniel Rudolf a8f0fd1f33 Merge branch 'master' into pico-1.1 2016-02-29 21:00:14 +01:00
Daniel Rudolf a2aa46fd0e Don't let dependant plugins automatically enable plugins which should be disabled by default
Follow-up to f10440b and c0a7fdc
2016-02-29 20:58:42 +01:00
Daniel Rudolf c0a7fdc801 Don't always check dependants of a disabled plugin
This isn't necessary because dependant plugins will check their dependencies on their own. Follow-up to f10440b
2016-02-29 20:41:41 +01:00
Daniel Rudolf 98b1f87281 CONTRIBUTING.md: Update markdown parsers 2016-02-29 20:20:02 +01:00
Daniel Rudolf 5a9c02f7bf Allow plugins to trigger events
You MUST NOT trigger events of Pico's core through a plugin!
2016-02-29 19:51:06 +01:00