Compare commits

...

37 commits

Author SHA1 Message Date
Maya McDougall
09aa825787
Update Twig URL 2022-07-27 15:17:31 -04:00
Maya McDougall
ff5e345e58
Added Temporary PHP 8.0 Notice 2022-02-06 16:34:18 -05:00
Daniel Rudolf
7e3c6a7b3e
Merge pull request #599 from dipohl/patch-1
Update web links in index.md
2021-08-15 13:38:01 +02:00
dipohl
2e425dc8ef
Update index.md
Checked all web links and updated them where necessary especially eliminating some 404 errors.
2021-08-15 11:02:43 +02:00
Daniel Rudolf
09fbaaaf33
IRC: Switch from Freenode to Libera.Chat 2021-08-13 17:19:24 +02:00
Daniel Rudolf
d0f32c0a2b
Create SECURITY.md 2021-06-21 20:45:31 +02:00
Daniel Rudolf
d8470f9f5c
Replace Probot Stale with GitHub Action
Looks like Probot Stale is abandoned... Too bad. 😒
2021-03-09 13:40:16 +01:00
Daniel Rudolf
221625efac
CONTRIBUTING.md: Rename 'type: Question' label to 'type: Support' 2020-11-11 16:10:46 +01:00
Daniel Rudolf
7228129cad
Version 2.1.4
```
* [Changed] Silence PHP errors in Parsedown
* [Fixed] #560: Improve charset guessing for formatted date strings using
          `strftime()` (Pico always uses UTF-8, but `strftime()` might not)
```
2020-08-29 16:15:52 +02:00
Daniel Rudolf
b95cfe0a0e
Update Pico::VERSION and Pico::VERSION_ID 2020-08-29 16:15:37 +02:00
Daniel Rudolf
e4741d0fde
Update CHANGELOG.md 2020-08-29 16:14:52 +02:00
Daniel Rudolf
1916dc5645
Silence PHP notices in upstream Parsedown
Parsedown is a still unresolved issue in whole, this at least ensures that we don't fill up logfiles with useless errors...
2020-08-29 16:07:10 +02:00
Daniel Rudolf
4be1f6ae90
Try to proberly encode formatted date strings returned by strftime()
Fixes #560
2020-08-29 16:04:10 +02:00
Daniel Rudolf
0e2b124b8e
Version 2.1.3
```
* [New] Add `locale` option to `config/config.yml`
* [Changed] Improve Pico docs
```
2020-07-10 18:51:38 +02:00
Daniel Rudolf
590d467347
Update Pico::VERSION and Pico::VERSION_ID 2020-07-10 18:51:32 +02:00
Daniel Rudolf
649feed2f6
Update CHANGELOG.md 2020-07-10 18:50:35 +02:00
Dimitri Merejkowsky
1345d6ac82 More inclusive README
Replace 'you guys' by something more gender neutral.
2020-06-29 21:40:47 +02:00
Daniel Rudolf
60f27dfe85
Merge pull request #546 from asdfuser/master
Add option to set a locale
2020-06-14 19:03:08 +02:00
Daniel Willmann
b2df860546 Add option to set a locale
As mentioned in https://www.php.net/manual/en/function.basename.php both
basename() and dirname() are locale aware.
An incorrect locale can cause the page tree to behave in strange ways.

For example the structure

/über-uns
 |-index.md
 |-impressum.md

could lead to the page impressum not being a child of über-uns.
2020-06-14 17:34:46 +02:00
Daniel Rudolf
1aca13e83d
Version 2.1.2
```
* [Fixed] Fix DummyPlugin declaring API version 3
```
2020-04-10 23:18:00 +02:00
Daniel Rudolf
b892d6bb11
Update Pico::VERSION and Pico::VERSION_ID 2020-04-10 23:17:45 +02:00
Daniel Rudolf
0ddde859e8
Update CHANGELOG.md 2020-04-10 23:17:01 +02:00
Daniel Rudolf
6c746fabb6
Fix DummyPlugin declaring API version 3 2020-04-10 23:14:33 +02:00
Daniel Rudolf
af9c09e440
Add composer.json branch alias for Pico 3.0 2020-03-29 16:04:38 +02:00
Daniel Rudolf
5d6257feac
Update composer.json branch aliases 2020-03-29 14:35:52 +02:00
Daniel Rudolf
b49936fb3a
Version 2.1.1
```
* [Fixed] Require Parsedown 1.8.0-beta-7 and Parsedown Extra 0.8.0-beta-1 due
          to changes in Parsedown and Parsedown Extra breaking BC beyond repair
* [Changed] #523: Check for hidden pages based on page ID instead of full paths
* [Changed] Improve Pico docs
```
2019-12-31 16:33:55 +01:00
Daniel Rudolf
6672fb2277
Update Pico::VERSION and Pico::VERSION_ID 2019-12-31 16:33:45 +01:00
Daniel Rudolf
4c97f69ef8
Update CHANGELOG.md 2019-12-31 16:32:22 +01:00
Daniel Rudolf
8a44584291
Composer: Force Parsedown 1.8.0-beta-7 and Parsedown Extra 0.8.0-beta-1
A few days ago Parsedown released new ("stable") versions of Parsedown and Parsedown Extra: Parsedown 1.7.4 and Parsedown Extra 0.8.1. Parsedown 1.7.4 backports some features of Parsedown 1.8.0-beta-7 and is compatible with Parsedown Extra 0.8.1. However, due to these changes Parsedown Extra 0.8.1 now breaks compatibility with Parsedown 1.8.0-beta-7. Parsedown's release process is messed up beyond repair... Not sure what we're going to do now, this needs some research whether we can downgrade to Parsedown 1.7.4 without breaking things (what would require us to release a new major release, i.e. Pico 3.0). For now we're pinning Parsedown 1.8.0-beta-7 and Parsedown Extra 0.8.0-beta-1 as of Pico 2.1.0.
2019-12-31 16:25:52 +01:00
Daniel Rudolf
447479d973
Test hidden page requests on page ID
Fixes #523
2019-12-31 00:36:22 +01:00
Daniel Rudolf
1d250a2f7c
Travis CI: Switch to PHP 5.3 for branch deployment (just like release deployment) 2019-12-02 19:28:16 +01:00
Daniel Rudolf
86f82b930d
Travis CI: Update to Ubuntu Bionic, add HHVM 3.24 LTS 2019-12-02 19:22:57 +01:00
Daniel Rudolf
95146669f7
README.md: Add instructions for using a Git repo 2019-12-02 18:37:56 +01:00
Daniel Rudolf
ae1225f725
Travis CI: Add PHP 7.4 2019-11-30 16:43:00 +01:00
Daniel Rudolf
2661730ef5
CONTRIBUTING.md: Add `info: Pico CMS for Nextcloud\' label 2019-11-29 15:42:33 +01:00
Daniel Rudolf
41a4da5229
Merge pull request #515 from picocms/pico-2.1
This is **Pico 2.1 - small, but mighty!**

If you want to upgrade to Pico 2.1, simply follow the usual upgrade instructions for minor releases. Installing Pico is as easy as before. You can find more extensive upgrade instructions as well as a complete list of all additions and changes in Pico's [upgrade docs](http://picocms.org/in-depth/upgrade-pico-21/) - even though this is a minor release, it's still a lot of new and improved stuff!

You might also want to give [Pico CMS for Nextcloud `v1.0.0`](https://apps.nextcloud.com/apps/cms_pico) a try - it's now an official part of Pico. You can find more info at [picocms.org](http://picocms.org/plugins/#pico-cms-for-nextcloud)
2019-11-25 01:11:59 +01:00
Daniel Rudolf
b088555d17
Create .github/FUNDING.yml 2019-10-20 15:52:41 +02:00
14 changed files with 179 additions and 58 deletions

1
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1 @@
custom: https://www.bountysource.com/teams/picocms

17
.github/stale.yml vendored
View file

@ -1,17 +0,0 @@
daysUntilStale: 7
daysUntilClose: 2
exemptLabels:
- "type: Bug"
- "type: Enhancement"
- "type: Feature"
- "type: Idea"
- "type: Release"
- "info: Pinned"
staleLabel: "info: Stale"
markComment: >
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:
unmarkComment: false
closeComment: false
only: issues

28
.github/workflows/stale.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: "Mark or close stale issues and PRs"
on:
schedule:
- cron: "0 12 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 7
days-before-close: 2
stale-issue-message: >
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:
stale-pr-message: >
This pull request 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:
stale-pr-label: "info: Stale"
stale-issue-label: "info: Stale"
exempt-issue-labels: "type: Bug,type: Enhancement,type: Feature,type: Idea,type: Release,info: Pinned"
exempt-pr-labels: "type: Bug,type: Enhancement,type: Feature,type: Idea,type: Release,info: Pinned"
remove-stale-when-updated: true

View file

@ -1,4 +1,4 @@
dist: trusty
dist: bionic
sudo: false
language: php
@ -13,20 +13,27 @@ jobs:
- php: 5.3
dist: precise
- php: 5.4
dist: trusty
- php: 5.5
dist: trusty
- php: 5.6
dist: xenial
- php: 7.0
dist: xenial
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: nightly
- php: hhvm-3.24 # until Dec 2018
- php: hhvm-3.27 # until Sep 2019
- php: hhvm-3.30 # until Nov 2019
# Branch deployment stage
- stage: deploy-branch
if: type == "push" && tag IS blank
php: 5.6
php: 5.3
dist: precise
install:
- '[[ ",$DEPLOY_PHPDOC_BRANCHES," == *,"$TRAVIS_BRANCH",* ]] || travis_terminate 0'
- install.sh --deploy

View file

@ -16,6 +16,40 @@ Pico Changelog
`PicoDeprecated`'s changelog. Please note that BC-breaking changes
are only possible with a new major version.
### Version 2.1.4
Released: 2020-08-29
```
* [Changed] Silence PHP errors in Parsedown
* [Fixed] #560: Improve charset guessing for formatted date strings using
`strftime()` (Pico always uses UTF-8, but `strftime()` might not)
```
### Version 2.1.3
Released: 2020-07-10
```
* [New] Add `locale` option to `config/config.yml`
* [Changed] Improve Pico docs
```
### Version 2.1.2
Released: 2020-04-10
```
* [Fixed] Fix DummyPlugin declaring API version 3
```
### Version 2.1.1
Released: 2019-12-31
```
* [Fixed] Require Parsedown 1.8.0-beta-7 and Parsedown Extra 0.8.0-beta-1 due
to changes in Parsedown and Parsedown Extra breaking BC beyond repair
* [Changed] #523: Check for hidden pages based on page ID instead of full paths
* [Changed] Improve Pico docs
```
### Version 2.1.0
Released: 2019-11-24

View file

@ -192,7 +192,7 @@ Issues and pull requests labeled with `info: Feedback Needed` indicate that feed
- The `type: Release` label is used in the exact same way as `type: Feature` and indicates the primary pull request of a new Pico release (please refer to the *Branching* and *Build & Release process* sections above).
- The `type: Notice`, `type: Question` and `type: Discussion` labels are used to indicate "fyi" issues, issues opened by users or developers asking questions, and issues with disucssions about arbitrary topics related to Pico. They are neither combined with `pri` labels, nor with `status` labels.
- The `type: Notice`, `type: Support` and `type: Discussion` labels are used to indicate "fyi" issues, support-related issues (e.g. issues opened by users or developers asking questions), and issues with disucssions about arbitrary topics related to Pico. They are neither combined with `pri` labels, nor with `status` labels.
- The `type: Duplicate` label is used when there is already another issue or pull request related to this problem or feature request. Issues labeled with `type: Duplicate` are immediately closed.
@ -200,10 +200,10 @@ Issues and pull requests labeled with `info: Feedback Needed` indicate that feed
The `status: Deferred` label might get added to any open issue or pull request to indicate that it is still unresolved and will be resolved later. This is also true for the `info: Pinned` label: It indicates a important issue or pull request that remains open on purpose.
After resolving a issue, we usually keep it open for about a week to give users some more time for feedback and further questions. This is especially true for issues with the `type: Notice`, `type: Question`, `type: Discussion` and `type: Invalid` labels. After 7 days with no interaction, [Probot](https://probot.github.io/)'s [Stale](https://github.com/apps/stale) bot adds the `info: Stale` label to the issue to ask the participants whether the issue has been resolved. If no more activity occurs, the issue will be automatically closed by Stale bot 2 days later.
After resolving a issue, we usually keep it open for about a week to give users some more time for feedback and further questions. This is especially true for issues with the `type: Notice`, `type: Support`, `type: Discussion` and `type: Invalid` labels. After 7 days with no interaction, [Probot](https://probot.github.io/)'s [Stale](https://github.com/apps/stale) bot adds the `info: Stale` label to the issue to ask the participants whether the issue has been resolved. If no more activity occurs, the issue will be automatically closed by Stale bot 2 days later.
Issues and pull requests labeled with `info: Information Needed` indicate that we have asked one of the participants for further information and didn't receive any feedback yet. It is usually added after Stale bot adds the `info: Stale` label to give the participants some more days to give the necessary information.
Issues and pull requests, which are rather related to upstream projects (i.e. projects Pico depends on, like Twig), are additionally labeled with `info: Upstream`.
When a issue or pull request isn't directly related to Pico's core, but the project as a whole, it is labeled with `info: Meta`. The same applies to the `info: Website` label, however, in this case it is usually expedient to move the issue to the [`picocms.github.io` repo](https://github.com/picocms/picocms.github.io) containing Pico's website.
When a issue or pull request isn't directly related to Pico's core, but the project as a whole, it is labeled with `info: Meta`. Issues labeled with `info: Website` are related to [Pico's website](http://picocms.org), however, in this case it is usually expedient to move the issue to the [`picocms.github.io` repo](https://github.com/picocms/picocms.github.io) instead. The same applies to the `info: Pico CMS for Nextcloud` label; these issues are related to [Pico CMS for Nextcloud](https://apps.nextcloud.com/apps/cms_pico).

View file

@ -4,13 +4,29 @@ Pico
[![License](https://picocms.github.io/badges/pico-license.svg)](https://github.com/picocms/Pico/blob/master/LICENSE.md)
[![Version](https://picocms.github.io/badges/pico-version.svg)](https://github.com/picocms/Pico/releases/latest)
[![Build Status](https://api.travis-ci.org/picocms/Pico.svg?branch=master)](https://travis-ci.org/picocms/Pico)
[![Freenode IRC Webchat](https://picocms.github.io/badges/pico-chat.svg)](https://webchat.freenode.net/?channels=%23picocms)
[![Libera.Chat](https://picocms.github.io/badges/pico-chat.svg)](https://web.libera.chat/#picocms)
[![Open Bounties on Bountysource](https://www.bountysource.com/badge/team?team_id=198139&style=bounties_received)](https://www.bountysource.com/teams/picocms)
Pico is a stupidly simple, blazing fast, flat file CMS.
Visit us at http://picocms.org/ and see http://picocms.org/about/ for more info.
---
### PHP 8.0+ Users
Seeing an `Unparenthesized a ? b : c ? d : e is not supported.` error?
Pico currently has issues with PHP versions newer than 8.0. This is due to Pico's dependencies, and not Pico itself. There's currently an "alpha" build of Pico you can download as a [Pre-Bundled Release](https://github.com/picocms/Pico/releases/tag/v3.0.0-alpha.2) that solves this issue.
This "alpha" is **perfectly safe** to use in production, as the *only* changes are **updated dependencies and version number strings**. If you're curious, you can confirm this by [comparing the changes](https://github.com/picocms/Pico/compare/pico-3.0-alpha) between branches.
More work was intended to be done on this branch, hence the "3.0" label, but it hasn't happened yet. There's an [on-going discussion](https://github.com/picocms/Pico/issues/608) about getting just these updated dependencies merged in as an official update (either Pico 2.2 or 3.0) as soon as possible.
Sorry for the inconvenience, and thanks to all Pico users for your patience on the matter. ❤️
---
Screenshot
----------
@ -52,9 +68,32 @@ Do you know the feeling: You want to install a new website, so you upload all fi
Okay, here's the catch: There's no catch. That's it! Open your favorite web browser and navigate to your brand new, stupidly simple, blazing fast, flat file CMS! Pico's sample contents will explain how to create your own contents. 😊
### I want to manage my website using a Git repository
Git is a very powerful distributed version-control system - and it can be used to establish a nice workflow around your Pico website. Using a Git repository for your website aids content creation and deployment, including collaborative editing and version control. If you want to manage your website in a Git repository, you use a Composer-based installation.
1. Fork [Pico's Composer starter project][PicoComposerGit] using [GitHub's fork button][HelpFork]. If you don't want to use GitHub you aren't required to, you can choose whatever Git server you want. Forking manually just requires some extra steps: First clone the Git repository locally, add your Git server as a remote and push the repository to this new remote.
2. Clone your fork locally and add your contents and assets. You can edit Pico's `composer.json` to include 3rd-party plugins and themes, or simply add your own plugins and themes to Pico's `plugins` resp. `themes` directories. Don't forget to commit your changes and push them to your Git server.
3. Open a shell on your webserver and navigate to the `httpdocs` directory (e.g. `/var/www/html`). Download Composer, clone your Git repository to the desired directory (e.g. `/var/www/html/pico`) and install Pico's dependencies using Composer's `install` option:
```shell
$ curl -sSL https://getcomposer.org/installer | php
$ git clone https://github.com/<YOUR_USERNAME>/<YOUR_REPOSITORY> pico
$ php composer.phar --working-dir=pico install
```
4. If you update your website's contents, simply commit your changes and push them to your Git server. Open a shell on your webserver and navigate to Pico's install directory within the `httpdocs` directory (e.g. `/var/www/html/pico`) of your server. Pull all changes from your Git server and update Pico's dependencies using Composer's `update` option:
```shell
$ git pull
$ php composer.phar update
```
### I'm a developer
So, you're one of these amazing folks making all of this possible? We love you guys! As a developer we recommend you to clone [Pico's Git repository][PicoGit] as well as the Git repositories of [Pico's default theme][PicoThemeGit] and the [`PicoDeprecated` plugin][PicoDeprecatedGit]. You can set up your workspace using [Pico's Composer starter project][PicoComposerGit] and include all of Pico's components using local packages.
So, you're one of these amazing people making all of this possible? We love you folks! As a developer we recommend you to clone [Pico's Git repository][PicoGit] as well as the Git repositories of [Pico's default theme][PicoThemeGit] and the [`PicoDeprecated` plugin][PicoDeprecatedGit]. You can set up your workspace using [Pico's Composer starter project][PicoComposerGit] and include all of Pico's components using local packages.
Using Pico's Git repositories is different from using one of the installation methods elucidated above. It gives you the current development version of Pico, what is likely *unstable* and *not ready for production use*!
@ -166,7 +205,7 @@ If you're a developer, please refer to the "Contributing" section below and our
#### You still need help or experience a problem with Pico?
When the docs can't answer your question, you can get help by joining us on [#picocms on Freenode IRC][Freenode] ([logs][FreenodeLogs]). When you're experiencing problems with Pico, please don't hesitate to create a new [Issue][Issues] on GitHub. Concerning problems with plugins or themes, please refer to the website of the developer of this plugin or theme.
When the docs can't answer your question, you can get help by joining us on [#picocms on Libera.Chat][LiberaChat] ([logs][LiberaChatLogs]). When you're experiencing problems with Pico, please don't hesitate to create a new [Issue][Issues] on GitHub. Concerning problems with plugins or themes, please refer to the website of the developer of this plugin or theme.
**Before creating a new Issue,** please make sure the problem wasn't reported yet using [GitHubs search engine][IssuesSearch]. Please describe your issue as clear as possible and always include the *Pico version* you're using. Provided that you're using *plugins*, include a list of them too. We need information about the *actual and expected behavior*, the *steps to reproduce* the problem, and what steps you have taken to resolve the problem by yourself (i.e. *your own troubleshooting*).
@ -175,7 +214,7 @@ Contributing
You want to contribute to Pico? We really appreciate that! You can help make Pico better by [contributing code][PullRequests] or [reporting issues][Issues], but please take note of our [contribution guidelines][ContributionGuidelines]. In general you can contribute in three different areas:
1. Plugins & Themes: You're a plugin developer or theme designer? We love you guys! You can find tons of information about how to develop plugins and themes at http://picocms.org/development/. If you have created a plugin or theme, please add it to our [Wiki][], either on the [plugins][WikiPlugins] or [themes][WikiThemes] page. You may also [Submit][] it to our website, where it'll be displayed on the official [plugin][OfficialPlugins] or [theme][OfficialThemes] pages!
1. Plugins & Themes: You're a plugin developer or theme designer? We love you folks! You can find tons of information about how to develop plugins and themes at http://picocms.org/development/. If you have created a plugin or theme, please add it to our [Wiki][], either on the [plugins][WikiPlugins] or [themes][WikiThemes] page. You may also [Submit][] it to our website, where it'll be displayed on the official [plugin][OfficialPlugins] or [theme][OfficialThemes] pages!
2. Documentation: We always appreciate people improving our documentation. You can either improve the [inline user docs][EditInlineDocs] or the more extensive [user docs on our website][EditUserDocs]. You can also improve the [docs for plugin and theme developers][EditDevDocs]. Simply fork our website's Git repository from https://github.com/picocms/picocms.github.io, change the Markdown files and open a [pull request][PullRequestsWebsite].
@ -210,6 +249,7 @@ Official Pico Contributors won't claim bounties on their own behalf, Pico will n
[PicoDeprecatedPackagist]: https://packagist.org/packages/picocms/pico-deprecated
[PicoComposerPackagist]: https://packagist.org/packages/picocms/pico-composer
[SemVer]: http://semver.org
[HelpFork]: https://help.github.com/en/github/getting-started-with-github/fork-a-repo
[HelpUpgrade]: http://picocms.org/in-depth/upgrade/
[HelpUserDocs]: http://picocms.org/docs/
[HelpDevDocs]: http://picocms.org/development/
@ -221,8 +261,8 @@ Official Pico Contributors won't claim bounties on their own behalf, Pico will n
[WikiThemes]: https://github.com/picocms/Pico/wiki/Pico-Themes
[Issues]: https://github.com/picocms/Pico/issues
[IssuesSearch]: https://github.com/picocms/Pico/search?type=Issues
[Freenode]: https://webchat.freenode.net/?channels=%23picocms
[FreenodeLogs]: http://picocms.org/irc-logs
[LiberaChat]: https://web.libera.chat/#picocms
[LiberaChatLogs]: http://picocms.org/irc-logs
[PullRequests]: https://github.com/picocms/Pico/pulls
[PullRequestsWebsite]: https://github.com/picocms/picocms.github.io/pulls
[ContributionGuidelines]: https://github.com/picocms/Pico/blob/master/CONTRIBUTING.md

15
SECURITY.md Normal file
View file

@ -0,0 +1,15 @@
# Security Policy
## Supported Versions
Only the most recent stable version of Pico is supported.
## Reporting a Vulnerability
To mitigate the impact of possible security issues we ask you to disclose any security issues with Pico privately first ("responsible disclosure"). To do so please send an email to Pico's lead developer:
> Daniel Rudolf \<picocms.org@daniel-rudolf.de\>
You should receive an answer within 48 hours.
All messages with valid security reports will be puslished on GitHub in full text.

View file

@ -32,10 +32,11 @@
},
"require": {
"php": ">=5.3.6",
"ext-mbstring": "*",
"twig/twig": "^1.36",
"symfony/yaml" : "^2.8",
"erusev/parsedown": "~1.8.0|1.8.0@beta",
"erusev/parsedown-extra": "~0.8.0|0.8.0@beta"
"erusev/parsedown": "1.8.0-beta-7",
"erusev/parsedown-extra": "0.8.0-beta-1"
},
"suggest": {
"picocms/pico-theme": "Pico requires a theme to actually display the contents of your website. This is Pico's official default theme.",
@ -51,8 +52,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev",
"dev-pico-2.1": "2.1.x-dev"
"dev-master": "2.1.x-dev",
"dev-pico-3.0": "3.0.x-dev"
}
}
}

View file

@ -7,6 +7,7 @@ base_url: ~ # Pico will try to guess its base URL, if th
rewrite_url: ~ # A boolean (true or false) indicating whether URL rewriting is forced
debug: ~ # Set this to true to enable Pico's debug mode
timezone: ~ # Your PHP installation might require you to manually specify a timezone
locale: ~ # Your PHP installation might require you to manually specify a locale to use
##
# Theme

View file

@ -5,8 +5,8 @@ Social:
- title: Visit us on GitHub
url: https://github.com/picocms/Pico
icon: octocat
- title: Join us on Freenode IRC Webchat
url: https://webchat.freenode.net/?channels=%23picocms
- title: Join us on Libera.Chat
url: https://web.libera.chat/#picocms
icon: chat
- title: Help us by creating/collecting bounties and pledging to fundraisers
url: https://www.bountysource.com/teams/picocms

View file

@ -190,8 +190,7 @@ uses [Twig][] for template rendering. You can select your theme by setting the
productive website, it's rather a starting point for creating your own theme.
If the default theme isn't sufficient for you, and you don't want to create
your own theme, you can use one of the great themes third-party developers and
designers created in the past. As with plugins, you can find themes in
[our Wiki][WikiThemes] and on [our website][OfficialThemes].
designers created in the past. As with plugins, you can find themes on [our website][OfficialThemes].
All themes must include an `index.twig` file to define the HTML structure of
the theme, and a `pico-theme.yml` to set the necessary config parameters. Just
@ -486,24 +485,23 @@ url.rewrite-if-not-file = (
## Documentation
For more help have a look at the Pico documentation at http://picocms.org/docs.
For more help have a look at the Pico documentation at https://picocms.org/docs/.
[Pico]: http://picocms.org/
[Pico]: https://picocms.org/
[PicoTheme]: https://github.com/picocms/pico-theme
[SampleContents]: https://github.com/picocms/Pico/tree/master/content-sample
[Markdown]: http://daringfireball.net/projects/markdown/syntax
[Markdown]: https://daringfireball.net/projects/markdown/syntax
[MarkdownExtra]: https://michelf.ca/projects/php-markdown/extra/
[YAML]: https://en.wikipedia.org/wiki/YAML
[Twig]: http://twig.sensiolabs.org/documentation
[UnixTimestamp]: https://en.wikipedia.org/wiki/Unix_timestamp
[Twig]: https://twig.symfony.com/doc/
[UnixTimestamp]: https://en.wikipedia.org/wiki/Unix_time
[Composer]: https://getcomposer.org/
[FeaturesHttpParams]: http://picocms.org/in-depth/features/http-params/
[FeaturesPageTree]: http://picocms.org/in-depth/features/page-tree/
[FeaturesPagesFunction]: http://picocms.org/in-depth/features/pages-function/
[WikiThemes]: https://github.com/picocms/Pico/wiki/Pico-Themes
[FeaturesHttpParams]: https://picocms.org/in-depth/features/http-params/
[FeaturesPageTree]: https://picocms.org/in-depth/features/page-tree/
[FeaturesPagesFunction]: https://picocms.org/in-depth/features/pages-function/
[WikiPlugins]: https://github.com/picocms/Pico/wiki/Pico-Plugins
[OfficialThemes]: http://picocms.org/themes/
[PluginUpgrade]: http://picocms.org/development/#upgrade
[OfficialThemes]: https://picocms.org/themes/
[PluginUpgrade]: https://picocms.org/development/#migrating-plugins
[ModRewrite]: https://httpd.apache.org/docs/current/mod/mod_rewrite.html
[AllowOverride]: https://httpd.apache.org/docs/current/mod/core.html#allowoverride
[NginxConfig]: http://picocms.org/in-depth/nginx/
[NginxConfig]: https://picocms.org/in-depth/nginx/

View file

@ -49,14 +49,14 @@ class Pico
*
* @var string
*/
const VERSION = '2.1.0';
const VERSION = '2.1.4';
/**
* Pico version ID
*
* @var int
*/
const VERSION_ID = 20100;
const VERSION_ID = 20104;
/**
* Pico API version
@ -455,8 +455,9 @@ class Pico
// load raw file content
$this->triggerEvent('onContentLoading');
$requestedPageId = $this->getPageId($this->requestFile) ?: $this->requestFile;
$hiddenFileRegex = '/(?:^|\/)(?:_|404' . preg_quote($this->getConfig('content_ext'), '/') . '$)/';
if (is_file($this->requestFile) && !preg_match($hiddenFileRegex, $this->requestFile)) {
if (is_file($this->requestFile) && !preg_match($hiddenFileRegex, $requestedPageId)) {
$this->rawContent = $this->loadFileContent($this->requestFile);
} else {
$this->triggerEvent('on404ContentLoading');
@ -935,6 +936,7 @@ class Pico
'rewrite_url' => null,
'debug' => null,
'timezone' => null,
'locale' => null,
'theme' => 'default',
'theme_config' => null,
'theme_meta' => null,
@ -973,6 +975,10 @@ class Pico
}
date_default_timezone_set($this->config['timezone']);
if ($this->config['locale'] !== null) {
setlocale(LC_ALL, $this->config['locale']);
}
if (!$this->config['plugins_url']) {
$this->config['plugins_url'] = $this->getUrlFromPath($this->getPluginsDir());
} else {
@ -1512,8 +1518,17 @@ class Pico
}
if (empty($meta['date_formatted'])) {
$dateFormat = $this->getConfig('date_format');
$meta['date_formatted'] = $meta['time'] ? utf8_encode(strftime($dateFormat, $meta['time'])) : '';
if ($meta['time']) {
$encodingList = mb_detect_order();
if ($encodingList === array('ASCII', 'UTF-8')) {
$encodingList[] = 'Windows-1252';
}
$rawFormattedDate = strftime($this->getConfig('date_format'), $meta['time']);
$meta['date_formatted'] = mb_convert_encoding($rawFormattedDate, 'UTF-8', $encodingList);
} else {
$meta['date_formatted'] = '';
}
}
} else {
// guarantee array key existance
@ -1658,7 +1673,7 @@ class Pico
public function parseFileContent($markdown, $singleLine = false)
{
$markdownParser = $this->getParsedown();
return !$singleLine ? $markdownParser->text($markdown) : $markdownParser->line($markdown);
return !$singleLine ? @$markdownParser->text($markdown) : @$markdownParser->line($markdown);
}
/**
@ -2077,7 +2092,7 @@ class Pico
* {@see PicoTwigExtension} Twig extension.
*
* @see Pico::getTwig()
* @see http://twig.sensiolabs.org/ Twig website
* @see https://twig.symfony.com/ Twig website
* @see https://github.com/twigphp/Twig Twig on GitHub
*
* @return Twig_Environment|null Twig template engine
@ -2330,14 +2345,12 @@ class Pico
{
$contentDir = $this->getConfig('content_dir');
$contentDirLength = strlen($contentDir);
if (substr($path, 0, $contentDirLength) !== $contentDir) {
return null;
}
$contentExt = $this->getConfig('content_ext');
$contentExtLength = strlen($contentExt);
if (substr($path, -$contentExtLength) !== $contentExt) {
return null;
}

View file

@ -28,7 +28,7 @@ class DummyPlugin extends AbstractPicoPlugin
*
* @var int
*/
const API_VERSION = 2;
const API_VERSION = 3;
/**
* This plugin is disabled by default