Various small improvements
This commit is contained in:
parent
b129a4fb12
commit
888190f15a
7 changed files with 22 additions and 13 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -10,7 +10,12 @@ desktop.ini
|
||||||
.DS_Store
|
.DS_Store
|
||||||
._*
|
._*
|
||||||
|
|
||||||
# Composer
|
# composer
|
||||||
/composer.lock
|
/composer.lock
|
||||||
/composer.phar
|
/composer.phar
|
||||||
/vendor
|
/vendor
|
||||||
|
|
||||||
|
# phpDocumentor
|
||||||
|
/.build/phpdoc
|
||||||
|
/.build/phpdoc.cache
|
||||||
|
/phpDocumentor.phar
|
||||||
|
|
|
@ -11,9 +11,10 @@
|
||||||
<file>.</file>
|
<file>.</file>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Exclude _build/ and vendor/ dirs as well as minified JavaScript files
|
Exclude .build/, .github/ and vendor/ dirs as well as minified JavaScript files
|
||||||
-->
|
-->
|
||||||
<exclude-pattern type="relative">^_build/</exclude-pattern>
|
<exclude-pattern type="relative">^.build/</exclude-pattern>
|
||||||
|
<exclude-pattern type="relative">^.github/</exclude-pattern>
|
||||||
<exclude-pattern type="relative">^vendor/</exclude-pattern>
|
<exclude-pattern type="relative">^vendor/</exclude-pattern>
|
||||||
<exclude-pattern>*.min.js</exclude-pattern>
|
<exclude-pattern>*.min.js</exclude-pattern>
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<phpdoc>
|
<phpdoc>
|
||||||
<title><![CDATA[Pico API Documentation]]></title>
|
<title><![CDATA[Pico API Documentation]]></title>
|
||||||
<parser>
|
<parser>
|
||||||
<target>_build/phpdoc.cache</target>
|
<target>.build/phpdoc.cache</target>
|
||||||
</parser>
|
</parser>
|
||||||
<transformer>
|
<transformer>
|
||||||
<target>_build/phpdoc</target>
|
<target>.build/phpdoc</target>
|
||||||
</transformer>
|
</transformer>
|
||||||
<transformations>
|
<transformations>
|
||||||
<template name="clean"/>
|
<template name="clean"/>
|
||||||
|
@ -15,8 +15,9 @@
|
||||||
<file>index.php</file>
|
<file>index.php</file>
|
||||||
<file>index.php.dist</file>
|
<file>index.php.dist</file>
|
||||||
|
|
||||||
<!-- exclude build environment -->
|
<!-- exclude .build and .github directories -->
|
||||||
<ignore>_build/*</ignore>
|
<ignore>.build/*</ignore>
|
||||||
|
<ignore>.github/*</ignore>
|
||||||
|
|
||||||
<!-- exclude user config -->
|
<!-- exclude user config -->
|
||||||
<ignore>config/*</ignore>
|
<ignore>config/*</ignore>
|
||||||
|
|
|
@ -153,7 +153,7 @@ As soon as development reaches a point where feedback is appreciated, a pull req
|
||||||
Build & Release process
|
Build & Release process
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
We're using [Travis CI](https://travis-ci.com) to automate the build & release process of Pico. It generates and deploys a [PHP class documentation](http://picocms.org/phpDoc/) (powered by [phpDoc](http://phpdoc.org)) for new releases and on every commit to the `master` branch. Travis also prepares new releases by generating Pico's pre-built release packages, a version badge, code statistics (powered by [cloc](https://github.com/AlDanial/cloc)) and updates our website (the [`picocms.github.io` repo](https://github.com/picocms/picocms.github.io)). Please refer to our [`.travis.yml`](https://github.com/picocms/Pico/blob/master/.travis.yml) and the [`_build` directory](https://github.com/picocms/Pico/tree/master/_build) for details.
|
We're using [Travis CI](https://travis-ci.com) to automate the build & release process of Pico. It generates and deploys a [PHP class documentation](http://picocms.org/phpDoc/) (powered by [phpDoc](http://phpdoc.org)) for new releases and on every commit to the `master` branch. Travis also prepares new releases by generating Pico's pre-built release packages, a version badge, code statistics (powered by [cloc](https://github.com/AlDanial/cloc)) and updates our website (the [`picocms.github.io` repo](https://github.com/picocms/picocms.github.io)). Please refer to our [`.travis.yml`](https://github.com/picocms/Pico/blob/master/.travis.yml), the [`picocms/ci-tools` repo](https://github.com/picocms/ci-tools) and the [`.build` directory](https://github.com/picocms/Pico/tree/master/.build) for details.
|
||||||
|
|
||||||
As insinuated above, it is important that each commit to `master` is deployable. Once development of a new Pico release is finished, trigger Pico's build & release process by pushing a new Git tag. This tag should reference a (usually empty) commit on `master`, which message should adhere to the following template:
|
As insinuated above, it is important that each commit to `master` is deployable. Once development of a new Pico release is finished, trigger Pico's build & release process by pushing a new Git tag. This tag should reference a (usually empty) commit on `master`, which message should adhere to the following template:
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,8 @@ You want to contribute to Pico? We really appreciate that! You can help make Pic
|
||||||
|
|
||||||
3. Pico's Core: The supreme discipline is to work on Pico's Core. Your contribution should help *every* Pico user to have a better experience with Pico. If this is the case, fork Pico from https://github.com/picocms/Pico and open a [pull request][PullRequests]. We look forward to your contribution!
|
3. Pico's Core: The supreme discipline is to work on Pico's Core. Your contribution should help *every* Pico user to have a better experience with Pico. If this is the case, fork Pico from https://github.com/picocms/Pico and open a [pull request][PullRequests]. We look forward to your contribution!
|
||||||
|
|
||||||
|
By contributing to Pico, you accept and agree to the *Developer Certificate of Origin* for your present and future contributions submitted to Pico. Please refer to the ["Developer Certificate of Origin" section in our `CONTRIBUTING.md`][ContributionGuidelinesDCO].
|
||||||
|
|
||||||
[Packagist.org]: http://packagist.org/packages/picocms/pico
|
[Packagist.org]: http://packagist.org/packages/picocms/pico
|
||||||
[LatestRelease]: https://github.com/picocms/Pico/releases/latest
|
[LatestRelease]: https://github.com/picocms/Pico/releases/latest
|
||||||
[composer]: https://getcomposer.org/
|
[composer]: https://getcomposer.org/
|
||||||
|
@ -133,6 +135,7 @@ You want to contribute to Pico? We really appreciate that! You can help make Pic
|
||||||
[IssuesSearch]: https://github.com/picocms/Pico/search?type=Issues
|
[IssuesSearch]: https://github.com/picocms/Pico/search?type=Issues
|
||||||
[PullRequests]: https://github.com/picocms/Pico/pulls
|
[PullRequests]: https://github.com/picocms/Pico/pulls
|
||||||
[ContributionGuidelines]: https://github.com/picocms/Pico/blob/master/CONTRIBUTING.md
|
[ContributionGuidelines]: https://github.com/picocms/Pico/blob/master/CONTRIBUTING.md
|
||||||
|
[ContributionGuidelinesDCO]: https://github.com/picocms/Pico/blob/master/CONTRIBUTING.md#developer-certificate-of-origin
|
||||||
[EditInlineDocs]: https://github.com/picocms/Pico/edit/master/content-sample/index.md
|
[EditInlineDocs]: https://github.com/picocms/Pico/edit/master/content-sample/index.md
|
||||||
[EditUserDocs]: https://github.com/picocms/picocms.github.io/tree/master/_docs
|
[EditUserDocs]: https://github.com/picocms/picocms.github.io/tree/master/_docs
|
||||||
[EditDevDocs]: https://github.com/picocms/picocms.github.io/tree/master/_development
|
[EditDevDocs]: https://github.com/picocms/picocms.github.io/tree/master/_development
|
||||||
|
|
|
@ -324,7 +324,8 @@ abstract class AbstractPicoPlugin implements PicoPluginInterface
|
||||||
* plugin's API is older than Pico's API. {@see PicoDeprecated} furthermore
|
* plugin's API is older than Pico's API. {@see PicoDeprecated} furthermore
|
||||||
* throws a exception when it can't provide compatibility in such cases.
|
* throws a exception when it can't provide compatibility in such cases.
|
||||||
* However, we still have to decide whether this plugin is compatible to
|
* However, we still have to decide whether this plugin is compatible to
|
||||||
* newer API versions, what defaults to "no" by default.
|
* newer API versions, what requires some special (version specific)
|
||||||
|
* precaution and is therefore usually not the case.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
|
|
|
@ -1425,7 +1425,7 @@ class Pico
|
||||||
*
|
*
|
||||||
* @return string prepared Markdown contents
|
* @return string prepared Markdown contents
|
||||||
*/
|
*/
|
||||||
public function prepareFileContent($rawContent, array $meta)
|
public function prepareFileContent($rawContent, array $meta = array())
|
||||||
{
|
{
|
||||||
// remove meta header
|
// remove meta header
|
||||||
$metaHeaderPattern = "/^(\/(\*)|---)[[:blank:]]*(?:\r)?\n"
|
$metaHeaderPattern = "/^(\/(\*)|---)[[:blank:]]*(?:\r)?\n"
|
||||||
|
@ -1549,9 +1549,7 @@ class Pico
|
||||||
protected function readPages()
|
protected function readPages()
|
||||||
{
|
{
|
||||||
$contentDir = $this->getConfig('content_dir');
|
$contentDir = $this->getConfig('content_dir');
|
||||||
$contentDirLength = strlen($contentDir);
|
|
||||||
$contentExt = $this->getConfig('content_ext');
|
$contentExt = $this->getConfig('content_ext');
|
||||||
$contentExtLength = strlen($contentExt);
|
|
||||||
|
|
||||||
$this->pages = array();
|
$this->pages = array();
|
||||||
$files = $this->getFiles($contentDir, $contentExt, self::SORT_NONE);
|
$files = $this->getFiles($contentDir, $contentExt, self::SORT_NONE);
|
||||||
|
@ -1562,7 +1560,7 @@ class Pico
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = substr($file, $contentDirLength, -$contentExtLength);
|
$id = substr($file, strlen($contentDir), -strlen($contentExt));
|
||||||
|
|
||||||
// trigger onSinglePageLoading event
|
// trigger onSinglePageLoading event
|
||||||
// skip inaccessible pages (e.g. drop "sub.md" if "sub/index.md" exists) by default
|
// skip inaccessible pages (e.g. drop "sub.md" if "sub/index.md" exists) by default
|
||||||
|
|
Loading…
Reference in a new issue