{"action":"created","issue":{"url":"https://api.github.com/repos/picocms/Pico/issues/334","repository_url":"https://api.github.com/repos/picocms/Pico","labels_url":"https://api.github.com/repos/picocms/Pico/issues/334/labels{/name}","comments_url":"https://api.github.com/repos/picocms/Pico/issues/334/comments","events_url":"https://api.github.com/repos/picocms/Pico/issues/334/events","html_url":"https://github.com/picocms/Pico/pull/334","id":138058654,"number":334,"title":"Pico 1.1","user":{"login":"PhrozenByte","id":920356,"avatar_url":"https://avatars.githubusercontent.com/u/920356?v=3","gravatar_id":"","url":"https://api.github.com/users/PhrozenByte","html_url":"https://github.com/PhrozenByte","followers_url":"https://api.github.com/users/PhrozenByte/followers","following_url":"https://api.github.com/users/PhrozenByte/following{/other_user}","gists_url":"https://api.github.com/users/PhrozenByte/gists{/gist_id}","starred_url":"https://api.github.com/users/PhrozenByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhrozenByte/subscriptions","organizations_url":"https://api.github.com/users/PhrozenByte/orgs","repos_url":"https://api.github.com/users/PhrozenByte/repos","events_url":"https://api.github.com/users/PhrozenByte/events{/privacy}","received_events_url":"https://api.github.com/users/PhrozenByte/received_events","type":"User","site_admin":false},"labels":[{"id":205495339,"url":"https://api.github.com/repos/picocms/Pico/labels/info:%20Feedback%20Needed","name":"info: Feedback Needed","color":"006b75","default":false},{"id":283847452,"url":"https://api.github.com/repos/picocms/Pico/labels/type:%20Release","name":"type: Release","color":"000000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/picocms/Pico/milestones/3","html_url":"https://github.com/picocms/Pico/milestones/Version%201.1.0","labels_url":"https://api.github.com/repos/picocms/Pico/milestones/3/labels","id":1398298,"number":3,"title":"Version 1.1.0","description":"","creator":{"login":"PhrozenByte","id":920356,"avatar_url":"https://avatars.githubusercontent.com/u/920356?v=3","gravatar_id":"","url":"https://api.github.com/users/PhrozenByte","html_url":"https://github.com/PhrozenByte","followers_url":"https://api.github.com/users/PhrozenByte/followers","following_url":"https://api.github.com/users/PhrozenByte/following{/other_user}","gists_url":"https://api.github.com/users/PhrozenByte/gists{/gist_id}","starred_url":"https://api.github.com/users/PhrozenByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhrozenByte/subscriptions","organizations_url":"https://api.github.com/users/PhrozenByte/orgs","repos_url":"https://api.github.com/users/PhrozenByte/repos","events_url":"https://api.github.com/users/PhrozenByte/events{/privacy}","received_events_url":"https://api.github.com/users/PhrozenByte/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":5,"state":"open","created_at":"2015-11-06T19:18:09Z","updated_at":"2016-10-01T17:01:30Z","due_on":null,"closed_at":null},"comments":33,"created_at":"2016-03-03T02:49:06Z","updated_at":"2016-12-05T16:47:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/picocms/Pico/pulls/334","html_url":"https://github.com/picocms/Pico/pull/334","diff_url":"https://github.com/picocms/Pico/pull/334.diff","patch_url":"https://github.com/picocms/Pico/pull/334.patch"},"body":"At the moment this PR is _\"the mother of **WORK IN PROGRESS**\"_... :smile:\r\n\r\nActually I don't have much to show yet, I'm primarily trying to point to [`PhrozenByte/pico-admin`](https://github.com/PhrozenByte/pico-admin). I decided to start with development of the admin plugin, because it may give us some more ideas for Pico 1.1. Please use this PR to give feedback about the plugin (otherwise the discussion may get a bit fragmented).\r\n\r\n@theshka: Do you think it makes sense to ask @picocms once again to convert his/her account to an GitHub Organization? This will allow us to use [`picocms/pico-admin`](https://github.com/picocms/pico-admin) instead... This is particularly meaningful when bearing in mind that I'm planning to create multiple repositories (`picocms/pico-composer`, `picocms/pico-pagination`, `picocms/pico-tags`, `picocms/pico-feeds`, `picocms/pico-i18n`, `picocms/pico-search`)...\r\n\r\nMost importantly we have to make a decision about replacing Pico's default theme (see #297) with Pico 1.1 or to defer this until Pico 2.0. What are your opinions about this? (especially, but not solely, @theshka) My objections are primarily related to BC, but I have not formed a opinion about this yet. Please also refer to the \"Decisions to make\" section below.\r\n\r\nRefer to http://picocms.org/phpDoc/pico-1.1/ for updated phpDoc class docs.\r\n\r\nPlannings for the more distant future (i.e. Pico 2.0) can be found in #317. At the moment it's planned to let Pico 2.0 follow Pico 1.1 (i.e. no Pico 1.2).\r\n\r\nAs always, **feedback is highly appreciated!**\r\n\r\n#### Planned changes to Pico's core\r\n- [x] Add `Pico::VERSION` constant\r\n- [ ] Split `Pico::run()` into multiple methods, but still call them through `Pico::run()`\r\n- [x] Add `includePico()` function to prevent access to `$this`/`Pico` object in config/plugin files (use composer's `includeFile()` function instead?)\r\n- [x] #330: Implement a modular config\r\n- [ ] Allow Markdown configuration (`Parsedown` doesn't support much configuration, probably it will be limited to the optional usage of `Parsedown` instead of `ParsedownExtra`, `Parsedown::setBreaksEnabled()`, `Parsedown::setMarkupEscaped()` and `Parsedown::setUrlsLinked()`)\r\n- [ ] Create a (de facto never updated) `pico-composer` project to allow `composer` users to install Pico as dependency and benefit from `composer`'s update mechanism; see @gilbitron's [BaunCMS/Baun](https://github.com/BaunCMS/Baun) repo\r\n- [ ] Let `PicoDeprecate` differentiate between legacy levels (i.e. always enable the plugin to e.g. read `config.php` in Pico's root dir, but trigger deprecated events only when plugins of a specific legacy level are present)\r\n- [x] #299: Integrated `404 Not Found` page\r\n- [x] Add `Pico::is404Content()` method returning `true` when `Pico::$requestFile` doesn't exist (i.e. `on404ContenLoading` has been triggered)\r\n\r\n#### Planned changes to Pico's plugin system\r\n- [x] Allow Pico plugins to trigger custom events\r\n- [x] Add `onSinglePageLoading` event (new preliminary event to `onSinglePageLoaded`)\r\n- [x] When changing the `$page` parameter of the `onSinglePageLoaded` event to `null`, don't add this page to `$pages` (keeping `$page['sub/page'] = null` makes no sense, thus no BC break)\r\n- [ ] Add plugin API versioning (new `DummyPlugin::API_VERSION` constant with Pico's `major`.`minor` version describing which API version the plugin expects; if the constant doesn't exist, assume `1.0`); this allows us to overhaul the plugin event system in the future without breaking BC\r\n  - [ ] #318: Add `onParsedownRegistered` event and pass `$parsedown` (instance of `Parsedown`) to allow extending `erusev/parsedown`\r\n  - [ ] Replace `onTwigRegistration` event with `onTwigRegistered` and pass `$twig` (instance of `Twig_Environment`), remove `$twig` parameter from `onPageRendering` event\r\n- [x] Allow to manually load plugins (i.e. add `Pico::loadPlugin()` method)\r\n- [ ] Allow Pico plugins to be installed through `composer.json`. I've no idea how to realize this at the moment... Possible solution: [composer/installers](https://github.com/composer/installers)\r\n- [ ] Support multiple plugin dirs\r\n- [ ] Add hook/event for `Pico::getPageUrl()`\r\n- [ ] Add more events to `Pico::readPages()`, similar to the events of the current page\r\n\r\n#### Planned changes to Pico's UI (themes, Twig, routing, …)\r\n- [x] #347: Drop the \"index\" part of URLs\r\n- [ ] Support multiple theme dirs\r\n- [x] Make `theme_url` configurable; the default value should support that `Pico::$themesDir` is a arbitrary deep sub path of `dirname($_SERVER['SCRIPT_FILENAME'])` (i.e. `index.php` resp. `httpdocs` folder); otherwise fallback to ~~`themes` (and not~~ `basename(Pico::$themesDir)`~~)~~\r\n- ~~Use Twig blocks in default theme (i.e. `{% block replace_or_extend_me %}...{% endblock %}`)~~\r\n- [x] #305: Allow access to query string in Twig templates (i.e. `$_GET` superglobal)\r\n- [x] Support `REQUEST_URI`-based URL rewriting to allow a much simpler webserver configuration\r\n  - [ ] Update `in-depth/nginx.md` on Pico's website accordingly\r\n- [x] Use flexbox in Pico's default theme to pin the footer to the bottom of the window\r\n- [ ] Drop `{{ site_title }}` and `{{ rewrite_url }}` in favour of their `{{ config.* }}` equivalents. Rename `{{ current_page }}` to `{{ page }}`. Drop `{{ is_front_page }}` (use `{% if page.id == \"index\" %}` instead). Preserve BC with `PicoDeprecated`.  \r\n  Open question: Does `{{ page }}` interfere with `{% for page in pages %}`?\r\n- [ ] Calculate the previous and next page for all pages (doesn't increase calculation time, `array_search()` in `Pico::discoverCurrentPage()` walks through all pages anyway). Drop `{{ next_page }}` and `{{ previous_page }}` in favor of their resulting `{{ page.* }}` equivalents (see above). Preserve BC with `PicoDeprecated`.\r\n\r\n#### Decisions to make\r\n- Add only pages of the first level to the page navigation by default (e.g. `page.md` and `sub/index.md`, but not `sub/page.md`)  \r\n  _possible BC break, maybe we should defer this to Pico 2.0?_\r\n- Ignore all pages starting with a `_` for the page navigation by default (e.g. `_meta.md` and all files in `_collection/` are skipped)  \r\n  _possible BC break, maybe we should defer this to Pico 2.0?_\r\n- #297: New default theme using Bootstrap 3 or (provided it has been released already) Bootstrap 4  \r\n  _possible BC break, maybe we should defer this to Pico 2.0?_\r\n\r\n#### New official plugins\r\n- Blog features\r\n  - [ ] Pagination\r\n  - [ ] Tags\r\n  - [ ] RSS Feeds\r\n  - [x] #365: [File Prefixes](https://github.com/PhrozenByte/pico-file-prefixes)\r\n- [ ] [Editor/Page Admin](https://github.com/PhrozenByte/pico-admin)\r\n- [ ] Data Files\r\n  - Support independent (meta) data files (e.g. `content/catalog.yml`)\r\n  - The files are accessed similar to pages (e.g. `{{ data.catalog }}`).\r\n  - A data file named after a markdown file (e.g. both `content/catalog.yml` and `content/catalog.md` exist) is non-recursively merged into the page's meta data (i.e. into `{{ pages.catalog.meta }}`). However, the YAML frontmatter takes preference and the data file can still be accessed via `{{ data.catalog }}`.\r\n  - ~~The same happens for all pages (non-recursive) in a directory if there's a data file with the same name as the directory (e.g. `_collection.yml` and `_collection/` directory). You can enforce recursion for e.g. `_collection/subdir/` by creating `_collection/subdir.yml`.~~\r\n"},"comment":{"url":"https://api.github.com/repos/picocms/Pico/issues/comments/264906975","html_url":"https://github.com/picocms/Pico/pull/334#issuecomment-264906975","issue_url":"https://api.github.com/repos/picocms/Pico/issues/334","id":264906975,"user":{"login":"PhrozenByte","id":920356,"avatar_url":"https://avatars.githubusercontent.com/u/920356?v=3","gravatar_id":"","url":"https://api.github.com/users/PhrozenByte","html_url":"https://github.com/PhrozenByte","followers_url":"https://api.github.com/users/PhrozenByte/followers","following_url":"https://api.github.com/users/PhrozenByte/following{/other_user}","gists_url":"https://api.github.com/users/PhrozenByte/gists{/gist_id}","starred_url":"https://api.github.com/users/PhrozenByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhrozenByte/subscriptions","organizations_url":"https://api.github.com/users/PhrozenByte/orgs","repos_url":"https://api.github.com/users/PhrozenByte/repos","events_url":"https://api.github.com/users/PhrozenByte/events{/privacy}","received_events_url":"https://api.github.com/users/PhrozenByte/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T16:47:25Z","updated_at":"2016-12-05T16:47:25Z","body":"I'm thinking about renaming Pico 1.1 to Pico 2.0 (and the [currently planned Pico 2.0](https://github.com/picocms/Pico/issues/317) to Pico 3.0), primarily due to the fact that `PicoAdmin` requires the following BC-breaking change (strictly speaking; however, I don't think that it actually breaks something).\r\n\r\n- Order plugins (execution order matters!) by evaluating their dependencies. Older plugins implicitly depend on `PicoDeprecated`. See [`tsort`](https://github.com/wertarbyte/coreutils/blob/master/src/tsort.c), [`marcj/topsort.php`](https://github.com/marcj/topsort.php), [`haberco/topological-sort-php`](https://github.com/haberco/topological-sort-php).\r\n\r\nThe problem I'm facing is, that the execution order of plugins matter: When a plugin hooks into the `onRequestUrl` event, it might do stuff a dependant plugin relies on. Thus it is crucial that events of the dependant plugin are always fired *after* all plugins it depends on. Up to this point it was mostly the user's responsibility to make sure that plugins are executed in the right order by adding numerical prefixes.\r\n\r\nThis change is imminent because the (not yet released) `PicoSession` plugin initializes the session during the `onRequestUrl` event, whereas the `PicoAdmin` plugin expects the session to be already initialized in this event. Thus `PicoSession` must be executed before `PicoAdmin` (what isn't the case due to the present alphabetical order). I don't want to add numerical prefixes because this problem isn't limited to `PicoAdmin` and `PicoSession`, it also applies to the admin modules concept which allows plugin developers to extend `PicoAdmin`.\r\n\r\nRenaming Pico 1.1 to Pico 2.0 furthermore allows us to antedate some minor, but probably very useful BC-breaking changes (still I don't think that it actually breaks any existing plugin or theme):\r\n\r\n- Add only pages of the first level to the page navigation by default (e.g. `page.md` and `sub/index.md`, but not `sub/page.md`)\r\n- Ignore all pages starting with a `_` for the page navigation by default (e.g. `_meta.md` and all files in `_collection/` are skipped)\r\n- Remove `PicoParsePagesContent` (add it to the plugin portfolio on Pico's website)\r\n- Remove `PicoExcerpt` (add it to the plugin portfolio on Pico's website)\r\n- Don't sort pages when a unknown `$config['pages_order_by']` is specified\r\n- Load plugins from `plugins/<plugin name>.php` (non-recursive) and `plugins/<plugin name>/<plugin name>.php` (the class file must be named after the directory) only. Plugins with multiple classes may need to register an autoloader on their own. Also see #203\r\n  - *I'm not sure about this one yet, as this might actually break some old plugins...*\r\n- Trigger the `onMetaHeaders` event only once, cache results of `Pico::getMetaHeaders()`.\r\n\r\nBesides: Pico's new default theme actually is also a BC-breaking change...\r\n\r\nThe additional programming effort isn't a problem, all changes are actually pretty minor.\r\n\r\nFeedback is highly appreciated! (@all, specifically @smcdougall)"}}
{"actor":{"display_login":"PhrozenByte"}}