Merge branch 'master' into pico-3.0-alpha
This commit is contained in:
commit
c3c7606d2c
7 changed files with 48 additions and 8 deletions
24
CHANGELOG.md
24
CHANGELOG.md
|
@ -16,6 +16,30 @@ 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 3.0.0-alpha.1
|
||||
Released: 2020-03-29
|
||||
|
||||
|
|
|
@ -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,7 +200,7 @@ 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.
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ Git is a very powerful distributed version-control system - and it can be used t
|
|||
|
||||
### 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*!
|
||||
|
||||
|
@ -198,7 +198,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].
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
},
|
||||
"require": {
|
||||
"php": ">=7.0.8",
|
||||
"ext-mbstring": "*",
|
||||
"twig/twig": "^2.12",
|
||||
"symfony/yaml" : "^3.4",
|
||||
"erusev/parsedown": "1.7.4",
|
||||
|
|
|
@ -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
|
||||
|
|
20
lib/Pico.php
20
lib/Pico.php
|
@ -936,6 +936,7 @@ class Pico
|
|||
'rewrite_url' => null,
|
||||
'debug' => null,
|
||||
'timezone' => null,
|
||||
'locale' => null,
|
||||
'theme' => 'default',
|
||||
'theme_config' => null,
|
||||
'theme_meta' => null,
|
||||
|
@ -974,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 {
|
||||
|
@ -1513,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
|
||||
|
@ -1659,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,7 +28,7 @@ class DummyPlugin extends AbstractPicoPlugin
|
|||
*
|
||||
* @var int
|
||||
*/
|
||||
const API_VERSION = 2;
|
||||
const API_VERSION = 3;
|
||||
|
||||
/**
|
||||
* This plugin is disabled by default
|
||||
|
|
Loading…
Add table
Reference in a new issue