├── .gitignore ├── .htaccess ├── LICENSE ├── README.md ├── assets └── .gitignore ├── composer.json ├── config ├── .gitignore └── config.yml.template ├── content └── .gitignore ├── index.php ├── plugins └── .gitignore └── themes └── .gitignore /.gitignore: -------------------------------------------------------------------------------- 1 | # Linux 2 | *~ 3 | *.swp 4 | 5 | # Windows 6 | Thumbs.db 7 | desktop.ini 8 | 9 | # Mac OS X 10 | .DS_Store 11 | ._* 12 | 13 | # Composer 14 | /composer.phar 15 | /vendor 16 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | # May be required to access sub directories 4 | #RewriteBase / 5 | 6 | # Deny access to internal dirs and files by passing the URL to Pico 7 | RewriteRule ^(config|content|vendor|CHANGELOG\.md|composer\.(json|lock|phar))(/|$) index.php [L] 8 | RewriteRule (^\.|/\.)(?!well-known(/|$)) index.php [L] 9 | 10 | # Enable URL rewriting 11 | RewriteCond %{REQUEST_FILENAME} !-f 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteRule ^ index.php [L] 14 | 15 | 16 | # Let Pico know about available URL rewriting 17 | SetEnv PICO_URL_REWRITING 1 18 | 19 | 20 | 21 | # Prevent file browsing 22 | Options -Indexes -MultiViews 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012 The Pico Community 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Pico 2 | ==== 3 | 4 | [![License](https://picocms.github.io/badges/pico-license.svg)](https://github.com/picocms/pico-composer/blob/master/LICENSE) 5 | [![Version](https://picocms.github.io/badges/pico-version.svg)](https://github.com/picocms/pico-composer#install) 6 | [![Libera.Chat](https://picocms.github.io/badges/pico-chat.svg)](https://web.libera.chat/#picocms) 7 | [![Open Bounties on Bountysource](https://www.bountysource.com/badge/team?team_id=198139&style=bounties_received)](https://www.bountysource.com/teams/picocms) 8 | 9 | Pico is a stupidly simple, blazing fast, flat file CMS. 10 | 11 | Visit us at http://picocms.org/ and see http://picocms.org/about/ for more info. 12 | 13 | This is Pico's [Composer][] starter project. `picocms/pico-composer` is the frame for basically all Pico installations starting with Pico 2.0, but doesn't consist of any considerable code itself. It's main purpose is to simply depend on Pico. Please refer to the ["Install"][MainRepoInstall] and ["Upgrade"][MainRepoUpgrade] sections of our main repository for information about how to install, upgrade and use Pico. 14 | 15 | Screenshot 16 | ---------- 17 | 18 | ![Pico Screenshot](https://picocms.github.io/screenshots/pico-21.png) 19 | 20 | Getting Help 21 | ------------ 22 | 23 | Please refer to the ["Getting Help" section][MainRepoGettingHelp] of our main repository. 24 | 25 | Contributing 26 | ------------ 27 | 28 | Please refer to the ["Contributing" section][MainRepoContributing] of our main repository. 29 | 30 | [Composer]: https://getcomposer.org/ 31 | [MainRepoInstall]: https://github.com/picocms/Pico#install 32 | [MainRepoUpgrade]: https://github.com/picocms/Pico#upgrade 33 | [MainRepoGettingHelp]: https://github.com/picocms/Pico#getting-help 34 | [MainRepoContributing]: https://github.com/picocms/Pico#contributing 35 | -------------------------------------------------------------------------------- /assets/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is meant to be empty 2 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "picocms/pico-composer", 3 | "type": "project", 4 | "description": "Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the \"content\" folder and that becomes a page.", 5 | "keywords": [ "pico", "picocms", "pico-cms", "simple", "flat-file", "cms", "content-management", "website", "markdown-to-html", "php", "markdown", "yaml", "twig", "composer-project" ], 6 | "homepage": "http://picocms.org/", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Daniel Rudolf", 11 | "email": "picocms.org@daniel-rudolf.de", 12 | "role": "Lead Developer" 13 | }, 14 | { 15 | "name": "The Pico Community", 16 | "homepage": "http://picocms.org/" 17 | }, 18 | { 19 | "name": "Contributors", 20 | "homepage": "https://github.com/picocms/pico-composer/graphs/contributors" 21 | } 22 | ], 23 | "support": { 24 | "docs": "http://picocms.org/docs", 25 | "issues": "https://github.com/picocms/Pico/issues", 26 | "source": "https://github.com/picocms/Pico" 27 | }, 28 | "require": { 29 | "picocms/pico": "^2.1", 30 | "picocms/pico-theme": "^2.1", 31 | "picocms/pico-deprecated": "^2.1", 32 | "picocms/composer-installer": "^1.0" 33 | }, 34 | "minimum-stability": "beta", 35 | "prefer-stable": true 36 | } 37 | -------------------------------------------------------------------------------- /config/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is meant to be empty 2 | -------------------------------------------------------------------------------- /config/config.yml.template: -------------------------------------------------------------------------------- 1 | ## 2 | # Basic 3 | # 4 | site_title: Pico # The title of your website 5 | base_url: ~ # Pico will try to guess its base URL, if this fails, override it here; 6 | # Example: https://example.com/pico/ 7 | rewrite_url: ~ # A boolean (true or false) indicating whether URL rewriting is forced 8 | debug: ~ # Set this to true to enable Pico's debug mode 9 | timezone: ~ # Your PHP installation might require you to manually specify a timezone 10 | locale: ~ # Your PHP installation might require you to manually specify a locale to use 11 | 12 | ## 13 | # Theme 14 | # 15 | theme: default # The name of your custom theme 16 | themes_url: ~ # Pico will try to guess the URL to the themes dir of your installation; 17 | # If this fails, override it here. Example: https://example.com/pico/themes/ 18 | theme_config: # Additional theme-specific config 19 | widescreen: false # Default theme: Use more horizontal space (i.e. make the site container wider) 20 | twig_config: # Twig template engine config 21 | autoescape: html # Let Twig escape variables by default 22 | strict_variables: false # If set to true, Twig will bail out when unset variables are being used 23 | charset: utf-8 # The charset used by Twig templates 24 | debug: ~ # Enable Twig's debug mode 25 | cache: false # Enable Twig template caching by specifying a path to a writable directory 26 | auto_reload: ~ # Recompile Twig templates whenever the source code changes 27 | 28 | ## 29 | # Content 30 | # 31 | date_format: %D %T # Pico's default date format; 32 | # See https://php.net/manual/en/function.strftime.php for more info 33 | pages_order_by_meta: author # Sort pages by meta value "author" (set "pages_order_by" to "meta") 34 | pages_order_by: alpha # Change how Pico sorts pages ("alpha" for alphabetical order, "date", or "meta") 35 | pages_order: asc # Sort pages in ascending ("asc") or descending ("desc") order 36 | content_dir: ~ # The path to Pico's content directory 37 | content_ext: .md # The file extension of your Markdown files 38 | content_config: # Parsedown Markdown parser config 39 | extra: true # Use the Parsedown Extra parser to support extended markup; 40 | # See https://michelf.ca/projects/php-markdown/extra/ for more info 41 | breaks: false # A boolean indicating whether breaks in the markup should be reflected in the 42 | # parsed contents of the page 43 | escape: false # Escape HTML markup in your content files; don't confuse this with some sort of 44 | # safe mode, enabling this doesn't allow you to process untrusted user input! 45 | auto_urls: true # Automatically link URLs found in your markup 46 | assets_dir: assets/ # The path to Pico's assets directory 47 | assets_url: ~ # Pico will try to guess the URL to the assets dir of your installation; 48 | # If this fails, override it here. Example: https://example.com/pico/assets/ 49 | 50 | ## 51 | # Plugins 52 | # 53 | plugins_url: ~ # Pico will try to guess the URL to the plugins dir of your installation; 54 | # If this fails, override it here. Example: https://example.com/pico/plugins/ 55 | DummyPlugin.enabled: false # Force the plugin "DummyPlugin" to be disabled 56 | 57 | ## 58 | # Custom 59 | # 60 | my_custom_setting: Hello World! # You can access custom settings in themes using {{ config.my_custom_setting }} 61 | -------------------------------------------------------------------------------- /content/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is meant to be empty 2 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * SPDX-License-Identifier: MIT 10 | * License-Filename: LICENSE 11 | */ 12 | 13 | // load dependencies 14 | // pico-composer MUST be installed as root package 15 | if (is_file(__DIR__ . '/vendor/autoload.php')) { 16 | require_once(__DIR__ . '/vendor/autoload.php'); 17 | } else { 18 | die("Cannot find 'vendor/autoload.php'. Run `composer install`."); 19 | } 20 | 21 | // instance Pico 22 | $pico = new Pico( 23 | __DIR__, // root dir 24 | 'config/', // config dir 25 | 'plugins/', // plugins dir 26 | 'themes/' // themes dir 27 | ); 28 | 29 | // override configuration? 30 | //$pico->setConfig(array()); 31 | 32 | // run application 33 | echo $pico->run(); 34 | -------------------------------------------------------------------------------- /plugins/.gitignore: -------------------------------------------------------------------------------- 1 | # You should add plugins installed by Composer here 2 | /PicoDeprecated 3 | -------------------------------------------------------------------------------- /themes/.gitignore: -------------------------------------------------------------------------------- 1 | # You should add themes installed by Composer here 2 | /default 3 | --------------------------------------------------------------------------------