-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
Pico 1.0 #252
Pico 1.0 #252
Conversation
A empty index.html is a solution for nothing...
The plugin magic takes place here...
DummyPlugin is a template for Pico plugins. You're a plugin developer? This template may be helpful :-)
These plugins are crucial for backward compatibility
Great work! I would definitely like to push this upstream-- it's so fresh, so clean 👍 Just a couple small problems to fix straight away: In //define('HTTPDOCS', realpath(rtrim(__DIR__, '/')) . '/');
//define('ROOT_DIR', realpath(HTTPDOCS . '../httpdocs-includes') . '/');
define('ROOT_DIR', realpath(rtrim(__DIR__, '/')) . '/');
//define('THEMES_DIR', HTTPDOCS . 'themes/');
define('THEMES_DIR', ROOT_DIR . 'themes/'); and line 377 of //$pathComponent = $_SERVER['QUERY_STRING'];
$pathComponent = (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''); I'd like to get some more input, anyone else still following Pico?? |
Oops, that was the wrong |
When ordering posts by date, would it make more sense to use something like this?
Currently it's this.
This seems to be the only thing that works for me, as I'm using the date format of |
I'm not really sure what you mean. In this PR posts aren't sorted by the |
Well, if you go to https://botwiki.org/tag/twitterbot, the posts are now correctly ordered while using the If I go back to using Feel free to clone https://github.com/botwiki/botwiki.org and play with it locally. |
This looks great to me. Would be more than happy to see it merged. @fourtonfish, have you looked through the changes in the PR? The code you're referring to isn't used anymore in it. Your problem, as I understand it, is already fixed here. |
@PontusHorn Ah, my bad, I think I only looked at the most current stable, not this PR. Well, great job, then :-) |
- Use Travis build status - Update version number in config template
…onfig['timezone']
…ar.gz" Should make it easier for a ordinary user to distinct source code and release 😃
First of all: Why? The sourcecode of existing forks like BaunCMS and PhilleCMS isn't "stupidly simple" anymore... You can read Picos sourcecode from top to down and even copy&paste programmers will understand what's going on. It's all about "understanding at first glance".
Most important second: All changes are 100% backward compatible.
I considered writing something own, but then caught up with Pico. The only thing missing was clean code - Picos concept, workflow and code really is "stupidly simple", but very powerful. Actually I just did a code refactoring. I don't want to fork Pico and I won't do it even if you reject my changes (obviously I'll still use it myself 😄).
This should be v1.0 ready. I recommend to release it as v1.0-beta, waiting some weeks to test it on a large user basis (I'll fix all appearing problems) and finally releasing it as Pico 1.0 😄
Please give me a hint if you'll merge this, I'll then update the homepage (
gh-pages
branch),changelog.txt
etc. accordingly.What did I do?
?sub/page
, rewriting to basically remove the?
is still possible and recommended. Contrary to Pico 0.9 every webserver should work just fine. Pico 0.9 required working URL rewriting, so if you want to use old plugins/themes/contents, a working rewrite setup may still be required. If you're not using the default.htaccess
, you must update your rewrite rules to follow the new principles. Internal links in content files are declared with%base_url%?sub/page
. Internal links in templates should be declared using the newlink
filter (e.g.{{ "sub/page"|link }}
), what basically callsPico::getPageUrl()
. You musn't change anything if you setup rewriting (what was required in Pico 0.9...), so I assume this to be fully backward compatible 😄IPicoPlugin
for details. The new event system supports plugin dependencies as well as some new events. It was necessary to reliably distinct between old and new events, so all events were renamed. The newPicoDeprecated
plugin is crucial for backward compatibility, it's enabled on demand. Refer to its class docs for details.sub/index.md
is listed beforesub/foo.md
).sub.md
whilesub/index.md
exists) are now excluded from the pages list.404.md
files (if there is asub/404.md
, this file is displayed in favour of the global404.md
file, when e.g. the non-existingsub/notexisting.md
is requested)PicoParsePagesContent
plugin isn't enabled. It's disabled by default, but gets automatically enabled withPicoDeprecated
as soon as an old plugin is loaded. This is necessary to maintain backward compatibility. You can still disable it manually by executing$pico->getPlugin('PicoParsePagesContent')->setEnabled(false);
or adding$config['PicoParsePagesContent.enabled'] = false;
to yourconfig.php
.onMetaHeaders
event anymore. The implicit availability of headers is supposed to be used by users and pure (!) theme developers only, so we're still instructing plugin developers to register their headers. See the commit message of 7537159 for more detail.%meta.*%
, so you mustn't repeat yourself. You can now put an excerpt into thedescription
meta variable and output the same content at the beginning of the article using%meta.description%
(seeindex.md
for a example).Pico::run()
method, which returns the parsed page contents instead of directlyecho
ing them. ThePicoDeprecated
plugin defines the now deprecated constantsROOT_DIR
,LIB_DIR
etc., so old plugins can still use them. Those constants are defined before readingconfig.php
in Picos root folder, so upgrading users usually aren't bothered with e.g. aPHP Notice: Use of undefined constant ROOT_DIR - assumed 'ROOT_DIR'
error when usingROOT_DIR
in theirconfig.php
(so: no BC break). New users don't need the constants anymore, relative paths are now always interpreted to be relative to Picos root dir, so$config['content_dir'] = 'content';
is always sufficient (previously this was depending on the webserver config). All these changes are supposed to improve Picos interoperability with other applications and allows developers to integrate Pico in other applications, therefore I additionally added a newPico::setConfig()
method to even make the use of aconfig.php
optional.index.html
files were removed; instead of helping users to secure their website, they create a false sense of security. This leads to situations like "I'm receiving a empty website when navigating to the content folder, thus everything must be safe!"