فهرست منبع

Merge branch 'master' into pico-1.1

Conflicts:
	_build/deploy-phpdoc-branch.sh
	themes/default/index.twig
	themes/default/style.css
Daniel Rudolf 8 سال پیش
والد
کامیت
d6a094216b
10فایلهای تغییر یافته به همراه138 افزوده شده و 37 حذف شده
  1. 7 0
      .gitattributes
  2. 9 6
      .travis.yml
  3. 11 1
      CHANGELOG.md
  4. 2 2
      CONTRIBUTING.md
  5. 14 13
      README.md
  6. 42 0
      _build/create-release-archive.sh
  7. 6 3
      _build/deploy-phpdoc-branch.sh
  8. 8 3
      _build/deploy-phpdoc-release.sh
  9. 29 0
      _build/github-clone.sh
  10. 10 9
      content-sample/index.md

+ 7 - 0
.gitattributes

@@ -0,0 +1,7 @@
+/_build         export-ignore
+/.gitattributes export-ignore
+/.gitignore     export-ignore
+/.phpcs.xml     export-ignore
+/.phpdoc.xml    export-ignore
+/.travis.yml    export-ignore
+/index.php.dist export-ignore

+ 9 - 6
.travis.yml

@@ -4,15 +4,21 @@ php:
   - 5.4
   - 5.5
   - 5.6
-  - 7
-  - hhvm
+  - 7.0
+  - 7.1
   - nightly
+  - hhvm
+  - hhvm-nightly
 
 matrix:
   allow_failures:
     - php: nightly
+    - php: hhvm-nightly
   fast-finish: true
 
+notifications:
+  irc: "chat.freenode.net#picocms"
+
 install:
   - composer install
 
@@ -27,10 +33,7 @@ after_success:
 
 before_deploy:
   - deploy-phpdoc-release.sh
-  - composer install --no-dev --optimize-autoloader
-  - find vendor/ -type d -path 'vendor/*/*/.git' -print0 | xargs -0 rm -rf
-  - mv index.php.dist index.php
-  - tar -czf "pico-release-$TRAVIS_TAG.tar.gz" README.md LICENSE.md CONTRIBUTING.md CHANGELOG.md composer.json composer.lock config content-sample lib plugins themes vendor .htaccess index.php
+  - create-release-archive.sh "$TRAVIS_TAG"
 
 deploy:
   provider: releases

+ 11 - 1
CHANGELOG.md

@@ -1,12 +1,22 @@
 Pico Changelog
 ==============
 
-### Version 1.0.4
+### Version 1.0.5
 Released: -
 
+```
+* [Changed] Improve documentation
+```
+
+### Version 1.0.4
+Released: 2016-10-04
+
 ```
 * [New] Add Pico's social icons to default theme
+* [Changed] Improve documentation
+* [Changed] Add CSS flexbox rules to default theme
 * [Fixed] Fix handling of non-YAML 1-line front matters
+* [Fixed] Fix responsiveness in default theme
 ```
 
 ### Version 1.0.3

+ 2 - 2
CONTRIBUTING.md

@@ -49,7 +49,7 @@ With this command you can specify a file or folder to limit which files it will
 
 Pico accepts the problems of having redundant documentation on different places (concretely Pico's inline user docs, the `README.md` and the website) for the sake of a better user experience. When updating the docs, please make sure to keep them in sync.
 
-If you update the [`README.md`](https://github.com/picocms/Pico/blob/master/README.md) or [`content-sample/index.md`](https://github.com/picocms/Pico/blob/master/content-sample/index.md), please make sure to update the corresponding files in the [`_docs`](https://github.com/picocms/Pico/tree/gh-pages/_docs/) folder of the `gh-pages` branch (i.e. [Pico's website](http://picocms.org/docs/)) and vice versa. Unfortunately this involves three (!) different markdown parsers. If you're experiencing problems, use Pico's [`erusev/parsedown-extra`](https://github.com/erusev/parsedown-extra) as a reference. You can try to make the contents compatible to [Kramdown](http://kramdown.gettalong.org/) (Pico's website) and [Redcarpet](https://github.com/vmg/redcarpet) (`README.md`) by yourself, otherwise please address the issues in your pull request message and we'll take care of it.
+If you update the [`README.md`](https://github.com/picocms/Pico/blob/master/README.md) or [`content-sample/index.md`](https://github.com/picocms/Pico/blob/master/content-sample/index.md), please make sure to update the corresponding files in the [`_docs`](https://github.com/picocms/picocms.github.io/tree/master/_docs/) folder of the `picocms.github.io` repo (i.e. [Pico's website](http://picocms.org/docs/)) and vice versa. Unfortunately this involves three (!) different markdown parsers. If you're experiencing problems, use Pico's [`erusev/parsedown-extra`](https://github.com/erusev/parsedown-extra) as a reference. You can try to make the contents compatible to [Kramdown](http://kramdown.gettalong.org/) (Pico's website) and [Redcarpet](https://github.com/vmg/redcarpet) (`README.md`) by yourself, otherwise please address the issues in your pull request message and we'll take care of it.
 
 Versioning
 ----------
@@ -80,7 +80,7 @@ As soon as development reaches a point where feedback is appreciated, a pull req
 Build & Release process
 -----------------------
 
-We're using [Travis CI](https://travis-ci.com) to automate the build & release process of Pico. It generates and deploys [phpDoc](http://phpdoc.org) class docs for new releases and on every commit to the `master` branch. Travis also prepares new releases by generating Pico's pre-built packages, a version badge and pushing both to our website (the [`gh-pages` branch](https://github.com/picocms/Pico/tree/gh-pages)). 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 [phpDoc](http://phpdoc.org) class docs for new releases and on every commit to the `master` branch. Travis also prepares new releases by generating Pico's pre-built packages, a version badge and pushing both to 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.
 
 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:
 

+ 14 - 13
README.md

@@ -1,13 +1,15 @@
 Pico
 ====
 
-[![License](https://picocms.github.io/Pico/badges/pico-license.svg)](https://github.com/picocms/Pico/blob/master/LICENSE.md)
-[![Version](https://picocms.github.io/Pico/badges/pico-version.svg)](https://github.com/picocms/Pico/releases/latest)
+[![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)](https://travis-ci.org/picocms/Pico)
-[![Freenode IRC Webchat](https://picocms.github.io/Pico/badges/pico-chat.svg)](https://webchat.freenode.net/?channels=%23picocms)
+[![Freenode IRC Webchat](https://picocms.github.io/badges/pico-chat.svg)](https://webchat.freenode.net/?channels=%23picocms)
 [![Tweet Button](https://cloud.githubusercontent.com/assets/640217/11483728/b0842918-976f-11e5-9185-d53261b3125b.png)](https://twitter.com/intent/tweet?text=Pico+is+a+stupidly+simple%2C+blazing+fast%2C+flat+file+CMS.+Visit+http%3A%2F%2Fpicocms.org+and+downlaod+%23picocms+today%21+via+%40gitpicocms&related=gitpicocms)
 
-Pico is a stupidly simple, blazing fast, flat file CMS. See http://picocms.org/ for more info.
+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.
 
 Screenshot
 -------
@@ -16,7 +18,7 @@ Screenshot
 Install
 -------
 
-You can install Pico either using a pre-bundled release or with composer. Pico is also available on [Packagist.org][] and may be included in other projects via `composer require picocms/pico`. Pico requires PHP 5.3+
+You can install Pico either using a pre-bundled release or with composer. Pico is also available on [Packagist.org][] and may be included in other projects via `composer require picocms/pico`. Pico requires PHP 5.3.6+
 
 #### Using a pre-bundled release
 
@@ -80,7 +82,7 @@ Getting Help
 ------------
 
 #### Getting Help as a user
-If you want to get started using Pico, please refer to our [user docs][HelpUserDocs]. Please read the [upgrade notes][HelpUpgrade] if you want to upgrade from Pico 0.8 or 0.9 to Pico 1.0. You can find officially supported plugins and themes on [our website][OfficialPlugins]. A greater choice of third-party plugins and themes can be found in our [Wiki][] on the [plugins][WikiPlugins] or [themes][WikiThemes] pages respectively. If you want to create your own plugin or theme, please refer to the "Getting Help as a developer" section below.
+If you want to get started using Pico, please refer to our [user docs][HelpUserDocs]. Please read the [upgrade notes][HelpUpgrade] if you want to upgrade from Pico 0.8 or 0.9 to Pico 1.0. You can find officially supported [plugins][OfficialPlugins] and [themes][OfficialThemes] on our website. A greater choice of third-party plugins and themes can be found in our [Wiki][] on the [plugins][WikiPlugins] or [themes][WikiThemes] pages respectively. If you want to create your own plugin or theme, please refer to the "Getting Help as a developer" section below.
 
 #### Getting Help as a developer
 If you're a developer, please refer to the "Contributing" section below and our [contribution guidelines][ContributionGuidelines]. To get you started with creating a plugin or theme, please read the [dev docs on our website][HelpDevDocs].
@@ -93,12 +95,9 @@ When the docs can't answer your question, you can get help by joining us on [#pi
 Contributing
 ------------
 
-<!--flippa verify-->
-[![I Love Open Source](http://www.iloveopensource.io/images/logo-lightbg.png)](http://www.iloveopensource.io/projects/524c55dcca7964c617000756)
-
 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 page][WikiThemes]. Doing so, we may select and promote your plugin or theme on [our website][OfficialPlugins] as officially supported!
+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!
 
 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 Pico from https://github.com/picocms/Pico, change the Markdown files and open a [pull request][PullRequests].
 
@@ -112,7 +111,9 @@ You want to contribute to Pico? We really appreciate that! You can help make Pic
 [HelpUpgrade]: http://picocms.org/in-depth/upgrade/
 [HelpUserDocs]: http://picocms.org/docs/
 [HelpDevDocs]: http://picocms.org/development/
-[OfficialPlugins]: http://picocms.org/customization/
+[Submit]: http://picocms.org/in-depth/submission_guidelines
+[OfficialPlugins]: http://picocms.org/plugins/
+[OfficialThemes]: http://picocms.org/themes/
 [Wiki]: https://github.com/picocms/Pico/wiki
 [WikiPlugins]: https://github.com/picocms/Pico/wiki/Pico-Plugins
 [WikiThemes]: https://github.com/picocms/Pico/wiki/Pico-Themes
@@ -121,5 +122,5 @@ You want to contribute to Pico? We really appreciate that! You can help make Pic
 [PullRequests]: https://github.com/picocms/Pico/pulls
 [ContributionGuidelines]: https://github.com/picocms/Pico/blob/master/CONTRIBUTING.md
 [EditInlineDocs]: https://github.com/picocms/Pico/edit/master/content-sample/index.md
-[EditUserDocs]: https://github.com/picocms/Pico/tree/gh-pages/_docs
-[EditDevDocs]: https://github.com/picocms/Pico/tree/gh-pages/_development
+[EditUserDocs]: https://github.com/picocms/picocms.github.io/tree/master/_docs
+[EditDevDocs]: https://github.com/picocms/picocms.github.io/tree/master/_development

+ 42 - 0
_build/create-release-archive.sh

@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+
+RELEASE="$1"
+ARCHIVE="pico-release.tar.gz"
+[ -n "$RELEASE" ] && ARCHIVE="pico-release-$RELEASE.tar.gz"
+
+# install dependencies
+echo "Running \`composer install\`..."
+composer install --no-dev --optimize-autoloader
+[ $? -eq 0 ] || exit 1
+echo
+
+# remove .git dirs
+echo "Removing '.git' directories of dependencies..."
+find vendor/ -type d -path 'vendor/*/*/.git' -print0 | xargs -0 rm -rf
+echo
+
+# create release archive
+echo "Creating release archive '$ARCHIVE'..."
+
+if [ -e "$ARCHIVE" ]; then
+    echo "Unable to create archive: File exists" >&2
+    exit 1
+fi
+
+INDEX_BACKUP="$(mktemp -u)"
+mv index.php "$INDEX_BACKUP"
+mv index.php.dist index.php
+
+tar -czf "$ARCHIVE" \
+    README.md LICENSE.md CONTRIBUTING.md CHANGELOG.md \
+    composer.json composer.lock \
+    config content-sample lib plugins themes vendor \
+    .htaccess index.php
+EXIT=$?
+
+mv index.php index.php.dist
+mv "$INDEX_BACKUP" index.php
+
+echo
+
+[ $EXIT -eq 0 ] || exit 1

+ 6 - 3
_build/deploy-phpdoc-branch.sh

@@ -18,20 +18,22 @@ fi
 DEPLOYMENT_ID="${TRAVIS_BRANCH//\//_}"
 DEPLOYMENT_DIR="$TRAVIS_BUILD_DIR/_build/deploy-$DEPLOYMENT_ID.git"
 
+[ -n "$DEPLOY_REPO_SLUG" ] || export DEPLOY_REPO_SLUG="$TRAVIS_REPO_SLUG"
+[ -n "$DEPLOY_REPO_BRANCH" ] || export DEPLOY_REPO_BRANCH="gh-pages"
+
 # get current Pico milestone
 VERSION="$(php -r 'require_once(__DIR__ . "/lib/Pico.php"); echo Pico::VERSION;')"
 MILESTONE="Pico$([[ "$VERSION" =~ ^([0-9]+\.[0-9]+)\. ]] && echo " ${BASH_REMATCH[1]}")"
 
 # clone repo
-echo "Cloning repo..."
-git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$DEPLOYMENT_DIR"
+github-clone.sh "$DEPLOYMENT_DIR" "https://github.com/$DEPLOY_REPO_SLUG.git" "$DEPLOY_REPO_BRANCH"
 [ $? -eq 0 ] || exit 1
 
 cd "$DEPLOYMENT_DIR"
-echo
 
 # setup repo
 github-setup.sh
+[ $? -eq 0 ] || exit 1
 
 # generate phpDocs
 generate-phpdoc.sh \
@@ -45,6 +47,7 @@ generate-phpdoc.sh \
 update-phpdoc-list.sh \
     "$DEPLOYMENT_DIR/_data/phpDoc.yml" \
     "$TRAVIS_BRANCH" "branch" "<code>$TRAVIS_BRANCH</code> branch" "$(date +%s)"
+[ $? -eq 0 ] || exit 1
 
 # commit phpDocs
 echo "Committing changes..."

+ 8 - 3
_build/deploy-phpdoc-release.sh

@@ -16,16 +16,18 @@ fi
 DEPLOYMENT_ID="${TRAVIS_BRANCH//\//_}"
 DEPLOYMENT_DIR="$TRAVIS_BUILD_DIR/_build/deploy-$DEPLOYMENT_ID.git"
 
+[ -n "$DEPLOY_REPO_SLUG" ] || export DEPLOY_REPO_SLUG="$TRAVIS_REPO_SLUG"
+[ -n "$DEPLOY_REPO_BRANCH" ] || export DEPLOY_REPO_BRANCH="gh-pages"
+
 # clone repo
-echo "Cloning repo..."
-git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$DEPLOYMENT_DIR"
+github-clone.sh "$DEPLOYMENT_DIR" "https://github.com/$DEPLOY_REPO_SLUG.git" "$DEPLOY_REPO_BRANCH"
 [ $? -eq 0 ] || exit 1
 
 cd "$DEPLOYMENT_DIR"
-echo
 
 # setup repo
 github-setup.sh
+[ $? -eq 0 ] || exit 1
 
 # generate phpDocs
 if [ "$DEPLOY_PHPDOC_RELEASES" == "true" ]; then
@@ -44,6 +46,7 @@ if [ "$DEPLOY_PHPDOC_RELEASES" == "true" ]; then
         update-phpdoc-list.sh \
             "$DEPLOYMENT_DIR/_data/phpDoc.yml" \
             "$TRAVIS_TAG" "version" "Pico ${TRAVIS_TAG#v}" "$(date +%s)"
+        [ $? -eq 0 ] || exit 1
 
         # commit phpDocs
         echo "Committing phpDoc changes..."
@@ -61,6 +64,7 @@ if [ "$DEPLOY_VERSION_BADGE" == "true" ]; then
     generate-badge.sh \
         "$DEPLOYMENT_DIR/badges/pico-version.svg" \
         "release" "$TRAVIS_TAG" "blue"
+    [ $? -eq 0 ] || exit 1
 
     # commit version badge
     echo "Committing version badge..."
@@ -77,6 +81,7 @@ if [ "$DEPLOY_VERSION_FILE" == "true" ]; then
     update-version-file.sh \
         "$DEPLOYMENT_DIR/_data/version.yml" \
         "${TRAVIS_TAG#v}"
+    [ $? -eq 0 ] || exit 1
 
     # commit version file
     echo "Committing version file..."

+ 29 - 0
_build/github-clone.sh

@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+##
+# Clones a Git repo
+#
+# @author  Daniel Rudolf
+# @link    http://picocms.org
+# @license http://opensource.org/licenses/MIT
+#
+
+set -e
+
+# parameters
+CLONE_TARGET_DIR="$1"   # target directory
+CLONE_REPO_URL="$2"     # URL of the git repo to clone
+CLONE_REPO_BRANCH="$3"  # optional branch to checkout
+
+# print parameters
+echo "Cloning repo..."
+printf 'CLONE_TARGET_DIR="%s"\n' "$CLONE_TARGET_DIR"
+printf 'CLONE_REPO_URL="%s"\n' "$CLONE_REPO_URL"
+printf 'CLONE_REPO_BRANCH="%s"\n' "$CLONE_REPO_BRANCH"
+echo
+
+# clone repo
+[ -n "$CLONE_REPO_BRANCH" ] || CLONE_REPO_BRANCH="master"
+git clone --branch="$CLONE_REPO_BRANCH" "$CLONE_REPO_URL" "$CLONE_TARGET_DIR"
+
+echo

+ 10 - 9
content-sample/index.md

@@ -227,12 +227,12 @@ Additional to Twigs extensive list of filters, functions and tags, Pico also
 provides some useful additional filters to make theming easier. You can parse
 any Markdown string to HTML using the `markdown` filter. Arrays can be sorted
 by one of its keys or a arbitrary deep sub-key using the `sort_by` filter
-(e.g. `{% for page in pages|sort_by("meta:nav"|split(":")) %}...{% endfor %}`
+(e.g. `{% for page in pages|sort_by([ 'meta', 'nav' ]) %}...{% endfor %}`
 iterates through all pages, ordered by the `nav` meta header; please note the
-`"meta:nav"|split(":")` part of the example, which passes `['meta', 'nav']` to
-the filter describing a key path). You can return all values of a given key or
-key path of an array using the `map` filter (e.g. `{{ pages|map("title") }}`
-returns all page titles).
+`[ 'meta', 'nav' ]` part of the example, it instructs Pico to sort by
+`page.meta.nav`). You can return all values of a given key or key path of an
+array using the `map` filter (e.g. `{{ pages|map("title") }}` returns all
+page titles).
 
 You can use different templates for different content files by specifying the
 `Template` meta header. Simply add e.g. `Template: blog-post` to a content file
@@ -242,15 +242,15 @@ the page.
 You don't have to create your own theme if Pico's default theme isn't
 sufficient for you, 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].
+[our Wiki][WikiThemes] and on [our website][OfficialThemes].
 
 ### Plugins
 
 #### Plugins for users
 
-Officially tested plugins can be found at http://picocms.org/customization/,
-but there are many awesome third-party plugins out there! A good start point
-for discovery is [our Wiki][WikiPlugins].
+Officially tested plugins can be found at http://picocms.org/plugins/, but
+there are many awesome third-party plugins out there! A good start point for
+discovery is [our Wiki][WikiPlugins].
 
 Pico makes it very easy for you to add new features to your website. Simply
 upload the files of the plugin to the `plugins/` directory and you're done.
@@ -323,6 +323,7 @@ For more help have a look at the Pico documentation at http://picocms.org/docs.
 [Twig]: http://twig.sensiolabs.org/documentation
 [WikiThemes]: https://github.com/picocms/Pico/wiki/Pico-Themes
 [WikiPlugins]: https://github.com/picocms/Pico/wiki/Pico-Plugins
+[OfficialThemes]: http://picocms.org/themes/
 [PluginUpgrade]: http://picocms.org/development/#upgrade
 [ModRewrite]: https://httpd.apache.org/docs/current/mod/mod_rewrite.html
 [NginxConfig]: http://picocms.org/in-depth/nginx/