picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.83k stars 617 forks source link

πŸŽ‰ First beta release of Pico 2.0 #401

Closed PhrozenByte closed 6 years ago

PhrozenByte commented 6 years ago

After 21 months and 157 commits, we're happy to announce the release of the first beta of Pico's second major release! πŸŽ‰

Click here to download Pico v2.0.0-beta.1: pico-release-v2.0.0-beta.1.tar.gz

Screenshot of Pico 2.0

Pico 2.0 introduces some major new features, but unfortunately also comes with some BC-breaking changes. However, as always, we tried to maintain BC whenever possible using Pico's official PicoDeprecated plugin. If you've spared to use features, that are deprecated since Pico 1.0, you should be fine. Since we wanted to finally release the first beta, we unfortunately didn't have time to write a changelog or upgrade instructions yet. We'll publish them with the second beta. Nevertheless, the upgrade process should be pretty straight-forward and is basically the same as with Pico 1.0.

Even though the changes are pretty immense, we are aware of the fact that developing Pico 2.0 took a pretty long time. In the future we'll try to release Pico more often and in smaller pieces.

For a complete list of changes, please refer to Pico 2.0's main pull request #334. You can find Pico 2.0's source code in the pico-1.1 branch. Please note that you can now find both Pico's official PicoDeprecated plugin and Pico's official default theme in separate repos.

As always, feedback is highly appreciated! ❀️

nitrix commented 6 years ago

I can tell a lot of time went into this.

I, myself, was even working on a better admin panel and doing improvements on your CMS on my side. Seems like you're always ahead of the curve.

I really like the project, the decisions it made, the vision it has, how receptive it is to feedbacks and the continuous love its getting.

@PhrozenByte hats off. Great work (: I'll definitively try the new version.

nliautaud commented 6 years ago

Congrats ! Everything works fine here, and I confirm that my plugins are (or will be) compatible with 2.0. PicoUsers, PicoPagesList, PicoPagesImages, PicoOutput, PicoContentEditor and P01contact.

clausbertels commented 6 years ago

These are wonderful improvements! Thank you for taking so much of your time to provide us with such a great and lightweight cms. I'd love to make a full tutorial on setting Pico 2 up and creating templates once it's released. Maybe even in-depth documentation about that (like Pico's Twig filters and data structure, ...)

But I was wondering if full support for subdirectories would be on the feature list soon? So I can access only pages (and the dir's metadata in a separate .yml) in a certain directory in my templates. The current CategorizedPages plugin does this job, poorly, by reading and exploding the url but this doesn't seem like a very robust method.

PhrozenByte commented 6 years ago

I'd love to make a full tutorial on setting Pico 2 up and creating templates once it's released. Maybe even in-depth documentation about that (like Pico's Twig filters and data structure, ...)

I'd love to see that! πŸ‘ Pico's documentation definitely needs improvements, @smcdougall had some great ideas and is currently working on a rewrite of the docs with a completely different approach. I'm sure he'd be very grateful about some help! See picocms/picocms.github.io#6

But I was wondering if full support for subdirectories would be on the feature list soon?

I'm not sure what you mean by that, can you please elaborate a little bit more? If it's basically about making the pages array accessibly through a tree structure: We're planning to release a official plugin for that with Pico 2.0. I was even thinking about adding it to Pico's core lately. It's a quite essential feature for theme developers and not really possible with pure Twig (actually, it is possible, but not very robust...).

clausbertels commented 6 years ago

I'm not sure what you mean by that, can you please elaborate a little bit more?

It's basically about what you said. But for others that might read this; Let's say my site looks like this:

schermafbeelding 2017-11-12 om 17 25 23

I'd like to be able to set a template on ./portfolio/index.md in which I can access all of it's folders and those folders' pages' yaml headers and content. This way I can easily create a landing page for all of portfolio's content by using i.e. {{ for p in current_dir }} {{ current_dir.icon }} {{ p.title }} {{ endfor }}. But this is, I think, very difficult to program because you have to account for all the possible use cases:

I think it's quite essential too, but others might not need this. I'd be very happy with an official plugin!

I'll definitely have a good look at @smcdougall's PR!

(good thing we're in the same time zone @PhrozenByte. Love the fast responses.)

nliautaud commented 6 years ago

@clausbertels concerning pages, the PicoPagesList plugin should provide what you're looking for.

Ex. getting pages of a given directory :

{% set filteredpages = pages | only('portfolio/') %}
{% for p in filteredpages %}
...

Or of the current directory :

{% set currentpath = current_page.id | replace({'/index': ''}) %}
{% set filteredpages = pages | only(currentpath) %}
{% for p in filteredpages %}
...
PhrozenByte commented 6 years ago

Yeah, that's exactly what a page tree does. There are already some plugins out there implementing this, but always with some additional features (like @nliautaud's PicoPagesList).

However, I don't think that we'll implement the "accessing ALL pages in a directory" (i.e. all decadents of a page, not just children) use case, because this would conflict with our plans to overhaul Pico's page discovery in Pico 3.0 (the far, far future... πŸ˜† see #317). Anyway, this shouldn't be a problem because leveling out a tree structure is very easy (no plugin necessary, just pure Twig).

I believe that page trees are pretty common stuff, that's the reason why I was thinking about adding this to Pico's core lately rather than using a plugin (like Pico's official PicoHttpParams plugin).

Having a separate meta-data-only .yml file in a directory is another topic, that's currently not planned (see the "Data files plugin" in #317).

PhrozenByte commented 6 years ago

I made the decision to add a page tree to Pico's core rather than creating a official plugin. I think a pretty high percentage of our users need something like that and it's such a basic thing to do, that many theme developers will use the new possibilities to build even more powerful themes.

Please refer to 28d2648 for implementation details and the Pico::buildPageTree class docs.

@clausbertels @nliautaud

PhrozenByte commented 6 years ago

Pico's second beta release is out now! (v2.0.0-beta.2)

The second beta primarily includes the new page tree (see https://github.com/picocms/Pico/issues/401#issuecomment-345458255) and the full changelog for Pico 2.0 (see CHANGELOG.md).

Pico 2.0 is basically ready for release! However, we really need some support to update our docs and website for Pico 2.0 - this is the only thing missing before we can release Pico 2.0! We have to update our docs (especially the install instructions) and write upgrade instructions similar to http://picocms.org/in-depth/upgrade/ including a "What's new" section targeting our users. Help is highly appreciated! See picocms/picocms.github.io#18 and partially picocms/picocms.github.io#7

@smcdougall @picocms

ILDaviz commented 6 years ago

thx man πŸ’ƒ

nitrix commented 6 years ago

I'm a little confused because the releases page shows it as pre-release, yet you claim it's released. Then, there's the name -beta in it that adds to the confusion. Then there's the fact all of this work exists on a branch named pico-1.1 and not develop or master as you'd expect.

Other than that, I love the project and what you guys are doing. Just these few points to iron out ;)

PhrozenByte commented 6 years ago

@nitrix: It says "second beta", not "second major release" πŸ˜„

However, as I was trying to point out, the code itself is ready to release. The only reason why this is just the second beta and not the final release are the missing docs and website updates - help is appreciated btw. I'm using Pico 2.0 in production for months now.

clausbertels commented 6 years ago

I second the motion that the whole projects structure is getting very confusing with development seemingly split between issues, branches, pull requests and a pre-release. Then again I don't have quite a lot of experience on Github.

If someone could write a very rough and quick guide for me to upgrade my own site to Pico 2 I can get started on writing a novice guide for installing as well as upgrading. (collaborating with @smcdougall probably)

PhrozenByte commented 6 years ago

I second the motion that the whole projects structure is getting very confusing with development seemingly split between issues, branches, pull requests and a pre-release. Then again I don't have quite a lot of experience on Github.

Actually it's quite simple. Pico's development happens in the pico-1.1 branch, #334 is just the pull request for this branch. Our website can be found in the picocms/picocms.github.io repo. Since Pico 2.0 wasn't released yet we use the pico-2.0 branch to prepare the website for the release. picocms/picocms.github.io#18 is the pull request for this branch.

If someone could write a very rough and quick guide for me to upgrade my own site to Pico 2 I can get started on writing a novice guide for installing as well as upgrading. (collaborating with @smcdougall probably)

I appreciate it! πŸ˜„ I wrote the updated general install & upgrade instructions yesterday (see https://github.com/picocms/Pico/blob/pico-1.1/README.md#install) and started (i.e. it's incomplete and still work in progress) writing the Pico 1.0 to Pico 2.0 upgrade tutorial today (live demo: http://phrozenbyte.github.io/Pico/in-depth/upgrade-pico-20/).

You can use this tutorial to test Pico 2.0!

Since Pico 2.0 introduces various BC-breaking changes we need detailed instructions on how to solve issues resulting from updating to Pico 2.0. However, users should not just solve the issues from BC-breaking changes, but should also stop using now deprecated features. This unfortunately requires some knowledge about the actual code changes... 😞

However, we additionally need a "What's new" section for all major changes, including those which don't necessarily lead to a change in existing installations. This doesn't require knowledge about Pico's source code, reading through Pico's CHANGELOG.md should be sufficient to write it. πŸ˜„

clausbertels commented 6 years ago

Reading up right now, saw that "download the latest Pico release" links to v1.0.6 ;) @PhrozenByte I'll be updating this comment with questions as I try getting my site running with 2.0 Some questions:

iagovar commented 6 years ago

Mmm, how do I configure the 404 error?

PhrozenByte commented 6 years ago

@iagovar: Please refer to Pico's user docs:

If a file cannot be found, the file content/404.md will be shown. You can add 404.md files to any directory. So, for example, if you wanted to use a special error page for your blog, you could simply create content/blog/404.md.

iagovar commented 6 years ago

Is there any possibility to implement the ability to put PHP includes inside .md files? I'm doing it through jquery and it's a bit messy to be honest

PhrozenByte commented 6 years ago

I'm not sure why you are asking the same question you've asked before a second time. This has been answered already, see https://github.com/picocms/Pico/issues/414#issuecomment-363395284

PhrozenByte commented 6 years ago

:tada: Pico's second major release v2.0.0 is out now! (yes, Pico 2.0 is officially stable now!)

It took a long time, but I think the waiting was worth it! :smiley: I think I don't need to make a long speech about it (especially because it was stable since v2.0.0-beta.3 anyway), so it only remains for me to say a big and heartfelt "thank you" to everyone who helped making this possible.

Please refer to Pico's new upgrade docs to find out what has changed and how to upgrade your Pico 1.0 installation to Pico 2.0. The docs target Pico users, not just developers, and therefore also includes a complete list of all new features (and we're not talking about a few minor changes here, it's a major release for a reason :laughing:).

As always, feedback is highly appreciated!

Have fun with Pico's second major release! :heart:

@theshka @smcdougall @picocms

omniperspective commented 6 years ago

Gefeliciteerd !!πŸ™

bricebou commented 6 years ago

Thanks for your amazing work !

bricebou commented 6 years ago

I've installed the release through composer and I was wondering if it's normal that the config/ dir is empty ? I understand it's in the vendor arborescence but for users, it's quite strange, don't you think ?

PhrozenByte commented 6 years ago

Sort of... I didn't want to create a copy of config/config.yml.template in picocms/pico-composer. Anyway, since we're referring to it in the user docs, I guess it's better to add it, even though it requires us to update the file there when we upgrade the config template in the main repo. Fixed in https://github.com/picocms/pico-composer/commit/40b146f75d7ccb8200ca4570da4e8b408ce7581d. Thank you for bringing this up @bricebou :+1:

bricebou commented 6 years ago

You're welcome @PhrozenByte :-) I was looking for the doc regarding accessing HTTP parameters (https://phrozenbyte.github.io/Pico/in-depth/features/http-params/) but I can't find it on picocms.org. Is it normal? or maybe you're working on it and I'm too fast... I wanted to make a link in a post I wrote about Twig pagination (update in https://github.com/picocms/Pico/issues/443).

PhrozenByte commented 6 years ago

@bricebou http://picocms.org/in-depth/features/http-params/

bricebou commented 6 years ago

Ok ! But I don't find any link to it from the left-side menu or from the main page content :-/

gilbitron commented 6 years ago

Congrats on the release of Pico 2.0.0 guys πŸŽ‰

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1: