first commit
|
@ -0,0 +1,34 @@
|
|||
git:
|
||||
problems:
|
||||
url: https://github.com/getgrav/grav-plugin-problems
|
||||
path: user/plugins/problems
|
||||
branch: master
|
||||
error:
|
||||
url: https://github.com/getgrav/grav-plugin-error
|
||||
path: user/plugins/error
|
||||
branch: master
|
||||
markdown-notices:
|
||||
url: https://github.com/getgrav/grav-plugin-markdown-notices
|
||||
path: user/plugins/markdown-notices
|
||||
branch: master
|
||||
quark:
|
||||
url: https://github.com/getgrav/grav-theme-quark
|
||||
path: user/themes/quark
|
||||
branch: master
|
||||
links:
|
||||
problems:
|
||||
src: grav-plugin-problems
|
||||
path: user/plugins/problems
|
||||
scm: github
|
||||
error:
|
||||
src: grav-plugin-error
|
||||
path: user/plugins/error
|
||||
scm: github
|
||||
markdown-notices:
|
||||
src: grav-plugin-markdown-notices
|
||||
path: user/plugins/markdown-notices
|
||||
scm: github
|
||||
quark:
|
||||
src: grav-theme-quark
|
||||
path: user/themes/quark
|
||||
scm: github
|
|
@ -0,0 +1,17 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# 2 space indentation
|
||||
[*.{yaml,yml,vue,js,css}]
|
||||
indent_size = 2
|
|
@ -0,0 +1,8 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: grav
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
custom: # Replace with a single custom sponsorship URL
|
|
@ -0,0 +1,79 @@
|
|||
name: Release Builds
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: write # for release creation (svenstaro/upload-release-action)
|
||||
|
||||
if: "!github.event.release.prerelease"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Extract Tag
|
||||
run: echo "PACKAGE_VERSION=${{ github.ref }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.3
|
||||
extensions: opcache, gd
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
env:
|
||||
COMPOSER_TOKEN: ${{ secrets.GLOBAL_TOKEN }}
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get -y update -qq < /dev/null > /dev/null
|
||||
sudo apt-get -y install -qq git zip < /dev/null > /dev/null
|
||||
|
||||
- name: Retrieval of Builder Scripts
|
||||
run: |
|
||||
# Real Grav URL
|
||||
curl --silent -H "Authorization: token ${{ secrets.GLOBAL_TOKEN }}" -H "Accept: application/vnd.github.v3.raw" ${{ secrets.BUILD_SCRIPT_URL }} --output build-grav.sh
|
||||
|
||||
# Development Local URL
|
||||
# curl ${{ secrets.BUILD_SCRIPT_URL }} --output build-grav.sh
|
||||
|
||||
- name: Grav Builder
|
||||
run: |
|
||||
bash ./build-grav.sh
|
||||
|
||||
- name: Upload packages to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ env.PACKAGE_VERSION }}
|
||||
file: ./grav-dist/*.zip
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
|
||||
slack:
|
||||
permissions:
|
||||
actions: read # to list jobs for workflow run (technote-space/workflow-conclusion-action)
|
||||
|
||||
name: Slack
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
steps:
|
||||
- uses: technote-space/workflow-conclusion-action@v2
|
||||
- uses: 8398a7/action-slack@v3
|
||||
with:
|
||||
status: failure
|
||||
fields: repo,message,author,action
|
||||
icon_emoji: ':octocat:'
|
||||
author_name: 'Github Action Build'
|
||||
text: '🚚 Automated Build Failure'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GLOBAL_TOKEN }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
if: env.WORKFLOW_CONCLUSION == 'failure'
|
|
@ -0,0 +1,76 @@
|
|||
name: PHP Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop ]
|
||||
pull_request:
|
||||
branches: [ develop ]
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
|
||||
unit-tests:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: opcache, gd
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
env:
|
||||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# - name: Update composer
|
||||
# run: composer update
|
||||
#
|
||||
# - name: Validate composer.json and composer.lock
|
||||
# run: composer validate
|
||||
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress
|
||||
|
||||
- name: Run test suite
|
||||
run: vendor/bin/codecept run
|
||||
|
||||
# slack:
|
||||
# name: Slack
|
||||
# needs: unit-tests
|
||||
# runs-on: ubuntu-latest
|
||||
# if: always()
|
||||
# steps:
|
||||
# - uses: technote-space/workflow-conclusion-action@v2
|
||||
# - uses: 8398a7/action-slack@v3
|
||||
# with:
|
||||
# status: failure
|
||||
# fields: repo,message,author,action
|
||||
# icon_emoji: ':octocat:'
|
||||
# author_name: 'Github Action Tests'
|
||||
# text: '💥 Automated Test Failure'
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
# if: env.WORKFLOW_CONCLUSION == 'failure'
|
|
@ -0,0 +1,48 @@
|
|||
name: Trigger Skeletons Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Which Grav release to use'
|
||||
required: true
|
||||
default: 'latest'
|
||||
admin:
|
||||
description: 'Create also a package with Admin'
|
||||
required: true
|
||||
default: true
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
WORKFLOW: "build-skeleton.yml"
|
||||
AUTH: ":${{secrets.GLOBAL_TOKEN}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Make it rain ☔️
|
||||
run: |
|
||||
SKELETONS=`curl -s "${{secrets.SKELETONS_JSON_LIST}}"`
|
||||
echo "$SKELETONS" | jq -cr '.[]' | while read SKELETON; do
|
||||
KEY=$(echo "$SKELETON" | jq -cr 'keys[0]')
|
||||
VERSION=$(echo "$SKELETON" | jq -cr '.[]')
|
||||
URL="https://api.github.com/repos/${KEY}/actions/workflows/${WORKFLOW}/dispatches"
|
||||
|
||||
curl -X POST \
|
||||
-u "${AUTH}" \
|
||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-sS \
|
||||
${URL} \
|
||||
--data '{ "ref": "develop",
|
||||
"inputs": {
|
||||
"tag": "'"$VERSION"'",
|
||||
"version": "'"$INPUT_VERSION"'",
|
||||
"admin": "'"$INPUT_ADMIN"'"
|
||||
}
|
||||
}' > /dev/null
|
||||
echo "Dispatched Worfklow for ${KEY}@$VERSION"
|
||||
done
|
|
@ -0,0 +1,50 @@
|
|||
# Composer
|
||||
.composer
|
||||
vendor/*
|
||||
!*/vendor/*
|
||||
|
||||
# Sass
|
||||
.sass-cache
|
||||
|
||||
# Grav Specific
|
||||
backup/*
|
||||
!backup/.*
|
||||
cache/*
|
||||
!cache/.*
|
||||
assets/*
|
||||
!assets/.*
|
||||
logs/*
|
||||
!logs/.*
|
||||
images/*
|
||||
!images/.*
|
||||
user/accounts/*
|
||||
!user/accounts/.*
|
||||
user/data/*
|
||||
!user/data/.*
|
||||
user/plugins/*
|
||||
!user/plugins/.*
|
||||
user/themes/*
|
||||
!user/themes/.*
|
||||
user/**/config/security.yaml
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.gravenv
|
||||
|
||||
# OS Generated
|
||||
.DS_Store*
|
||||
ehthumbs.db
|
||||
Icon?
|
||||
Thumbs.db
|
||||
*.swp
|
||||
|
||||
# phpstorm
|
||||
.idea/*
|
||||
|
||||
# testing stuff
|
||||
tests/_output/*
|
||||
tests/_support/_generated/*
|
||||
tests/cache/*
|
||||
tests/error.log
|
||||
system/templates/testing/*
|
||||
/user/config/versions.yaml
|
|
@ -0,0 +1,78 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
## Begin RewriteBase
|
||||
# If you are getting 500 or 404 errors on subpages, you may have to uncomment the RewriteBase entry
|
||||
# You should change the '/' to your appropriate subfolder. For example if you have
|
||||
# your Grav install at the root of your site '/' should work, else it might be something
|
||||
# along the lines of: RewriteBase /<your_sub_folder>
|
||||
##
|
||||
|
||||
# RewriteBase /
|
||||
|
||||
## End - RewriteBase
|
||||
|
||||
## Begin - X-Forwarded-Proto
|
||||
# In some hosted or load balanced environments, SSL negotiation happens upstream.
|
||||
# In order for Grav to recognize the connection as secure, you need to uncomment
|
||||
# the following lines.
|
||||
#
|
||||
# RewriteCond %{HTTP:X-Forwarded-Proto} https
|
||||
# RewriteRule .* - [E=HTTPS:on]
|
||||
#
|
||||
## End - X-Forwarded-Proto
|
||||
|
||||
## Begin - Exploits
|
||||
# If you experience problems on your site block out the operations listed below
|
||||
# This attempts to block the most common type of exploit `attempts` to Grav
|
||||
#
|
||||
# Block out any script trying to use twig tags in URL.
|
||||
RewriteCond %{REQUEST_URI} ({{|}}|{%|%}) [OR]
|
||||
RewriteCond %{QUERY_STRING} ({{|}}|{%25|%25}) [OR]
|
||||
# Block out any script trying to base64_encode data within the URL.
|
||||
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
|
||||
# Block out any script that includes a <script> tag in URL.
|
||||
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
|
||||
# Block out any script trying to set a PHP GLOBALS variable via URL.
|
||||
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
|
||||
# Block out any script trying to modify a _REQUEST variable via URL.
|
||||
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
|
||||
# Return 403 Forbidden header and show the content of the root homepage
|
||||
RewriteRule .* index.php [F]
|
||||
#
|
||||
## End - Exploits
|
||||
|
||||
## Begin - Index
|
||||
# If the requested path and file is not /index.php and the request
|
||||
# has not already been internally rewritten to the index.php script
|
||||
RewriteCond %{REQUEST_URI} !^/index\.php
|
||||
# and the requested path and file doesn't directly match a physical file
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
# and the requested path and file doesn't directly match a physical folder
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
# internally rewrite the request to the index.php script
|
||||
RewriteRule .* index.php [L]
|
||||
## End - Index
|
||||
|
||||
## Begin - Security
|
||||
# Block all direct access for these folders
|
||||
RewriteRule ^(\.git|cache|bin|logs|backup|webserver-configs|tests)/(.*) error [F]
|
||||
# Block access to specific file types for these system folders
|
||||
RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|json|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
|
||||
# Block access to specific file types for these user folders
|
||||
RewriteRule ^(user)/(.*)\.(txt|md|json|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
|
||||
# Block all direct access to .md files:
|
||||
RewriteRule \.md$ error [F]
|
||||
# Block all direct access to files and folders beginning with a dot
|
||||
RewriteRule (^|/)\.(?!well-known) - [F]
|
||||
# Block access to specific files in the root folder
|
||||
RewriteRule ^(LICENSE\.txt|composer\.lock|composer\.json|\.htaccess)$ error [F]
|
||||
## End - Security
|
||||
|
||||
</IfModule>
|
||||
|
||||
# Begin - Prevent Browsing and Set Default Resources
|
||||
Options -Indexes
|
||||
DirectoryIndex index.php index.html index.htm
|
||||
# End - Prevent Browsing and Set Default Resources
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
return [
|
||||
"target_php_version" => null,
|
||||
'pretend_newer_core_functions_exist' => true,
|
||||
'allow_missing_properties' => false,
|
||||
'null_casts_as_any_type' => false,
|
||||
'null_casts_as_array' => false,
|
||||
'array_casts_as_null' => false,
|
||||
'strict_method_checking' => true,
|
||||
'quick_mode' => false,
|
||||
'simplify_ast' => false,
|
||||
'directory_list' => [
|
||||
'.',
|
||||
],
|
||||
"exclude_analysis_directory_list" => [
|
||||
'vendor/'
|
||||
],
|
||||
'exclude_file_list' => [
|
||||
'system/src/Grav/Common/Errors/Resources/layout.html.php',
|
||||
'tests/_support/AcceptanceTester.php',
|
||||
'tests/_support/FunctionalTester.php',
|
||||
'tests/_support/UnitTester.php',
|
||||
],
|
||||
'autoload_internal_extension_signatures' => [
|
||||
'memcached' => '.phan/internal_stubs/memcached.phan_php',
|
||||
'memcache' => '.phan/internal_stubs/memcache.phan_php',
|
||||
'redis' => '.phan/internal_stubs/Redis.phan_php',
|
||||
],
|
||||
'plugins' => [
|
||||
'AlwaysReturnPlugin',
|
||||
'UnreachableCodePlugin',
|
||||
'DuplicateArrayKeyPlugin',
|
||||
'PregRegexCheckerPlugin',
|
||||
'PrintfCheckerPlugin',
|
||||
],
|
||||
'suppress_issue_types' => [
|
||||
'PhanUnreferencedUseNormal',
|
||||
'PhanTypeObjectUnsetDeclaredProperty',
|
||||
'PhanTraitParentReference',
|
||||
'PhanTypeInvalidThrowsIsInterface',
|
||||
'PhanRequiredTraitNotAdded',
|
||||
'PhanDeprecatedFunction', // Uncomment this to see all the deprecated calls
|
||||
]
|
||||
];
|
|
@ -0,0 +1,460 @@
|
|||
<?php
|
||||
|
||||
// Start of memcache v.3.0.8
|
||||
|
||||
class MemcachePool {
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Open memcached server connection
|
||||
* @link https://php.net/manual/en/memcache.connect.php
|
||||
* @param string $host <p>
|
||||
* Point to the host where memcached is listening for connections. This parameter
|
||||
* may also specify other transports like <em>unix:///path/to/memcached.sock</em>
|
||||
* to use UNIX domain sockets, in this case <b>port</b> must also
|
||||
* be set to <em>0</em>.
|
||||
* </p>
|
||||
* @param int $port [optional] <p>
|
||||
* Point to the port where memcached is listening for connections. Set this
|
||||
* parameter to <em>0</em> when using UNIX domain sockets.
|
||||
* </p>
|
||||
* <p>
|
||||
* Please note: <b>port</b> defaults to
|
||||
* {@link https://php.net/manual/ru/memcache.ini.php#ini.memcache.default-port memcache.default_port}
|
||||
* if not specified. For this reason it is wise to specify the port
|
||||
* explicitly in this method call.
|
||||
* </p>
|
||||
* @param int $timeout [optional] <p>Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.</p>
|
||||
* @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
|
||||
*/
|
||||
public function connect ($host, $port, $timeout = 1) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 2.0.0)<br/>
|
||||
* Add a memcached server to connection pool
|
||||
* @link https://php.net/manual/en/memcache.addserver.php
|
||||
* @param string $host <p>
|
||||
* Point to the host where memcached is listening for connections. This parameter
|
||||
* may also specify other transports like unix:///path/to/memcached.sock
|
||||
* to use UNIX domain sockets, in this case <i>port</i> must also
|
||||
* be set to 0.
|
||||
* </p>
|
||||
* @param int $port [optional] <p>
|
||||
* Point to the port where memcached is listening for connections.
|
||||
* Set this
|
||||
* parameter to 0 when using UNIX domain sockets.
|
||||
* </p>
|
||||
* <p>
|
||||
* Please note: <i>port</i> defaults to
|
||||
* memcache.default_port
|
||||
* if not specified. For this reason it is wise to specify the port
|
||||
* explicitly in this method call.
|
||||
* </p>
|
||||
* @param bool $persistent [optional] <p>
|
||||
* Controls the use of a persistent connection. Default to <b>TRUE</b>.
|
||||
* </p>
|
||||
* @param int $weight [optional] <p>
|
||||
* Number of buckets to create for this server which in turn control its
|
||||
* probability of it being selected. The probability is relative to the
|
||||
* total weight of all servers.
|
||||
* </p>
|
||||
* @param int $timeout [optional] <p>
|
||||
* Value in seconds which will be used for connecting to the daemon. Think
|
||||
* twice before changing the default value of 1 second - you can lose all
|
||||
* the advantages of caching if your connection is too slow.
|
||||
* </p>
|
||||
* @param int $retry_interval [optional] <p>
|
||||
* Controls how often a failed server will be retried, the default value
|
||||
* is 15 seconds. Setting this parameter to -1 disables automatic retry.
|
||||
* Neither this nor the <i>persistent</i> parameter has any
|
||||
* effect when the extension is loaded dynamically via <b>dl</b>.
|
||||
* </p>
|
||||
* <p>
|
||||
* Each failed connection struct has its own timeout and before it has expired
|
||||
* the struct will be skipped when selecting backends to serve a request. Once
|
||||
* expired the connection will be successfully reconnected or marked as failed
|
||||
* for another <i>retry_interval</i> seconds. The typical
|
||||
* effect is that each web server child will retry the connection about every
|
||||
* <i>retry_interval</i> seconds when serving a page.
|
||||
* </p>
|
||||
* @param bool $status [optional] <p>
|
||||
* Controls if the server should be flagged as online. Setting this parameter
|
||||
* to <b>FALSE</b> and <i>retry_interval</i> to -1 allows a failed
|
||||
* server to be kept in the pool so as not to affect the key distribution
|
||||
* algorithm. Requests for this server will then failover or fail immediately
|
||||
* depending on the <i>memcache.allow_failover</i> setting.
|
||||
* Default to <b>TRUE</b>, meaning the server should be considered online.
|
||||
* </p>
|
||||
* @param callable $failure_callback [optional] <p>
|
||||
* Allows the user to specify a callback function to run upon encountering an
|
||||
* error. The callback is run before failover is attempted. The function takes
|
||||
* two parameters, the hostname and port of the failed server.
|
||||
* </p>
|
||||
* @param int $timeoutms [optional] <p>
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function addServer ($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 2.1.0)<br/>
|
||||
* Changes server parameters and status at runtime
|
||||
* @link https://secure.php.net/manual/en/memcache.setserverparams.php
|
||||
* @param string $host <p>Point to the host where memcached is listening for connections.</p.
|
||||
* @param int $port [optional] <p>
|
||||
* Point to the port where memcached is listening for connections.
|
||||
* </p>
|
||||
* @param int $timeout [optional] <p>
|
||||
* Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.
|
||||
* </p>
|
||||
* @param int $retry_interval [optional] <p>
|
||||
* Controls how often a failed server will be retried, the default value
|
||||
* is 15 seconds. Setting this parameter to -1 disables automatic retry.
|
||||
* Neither this nor the <b>persistent</b> parameter has any
|
||||
* effect when the extension is loaded dynamically via {@link https://secure.php.net/manual/en/function.dl.php dl()}.
|
||||
* </p>
|
||||
* @param bool $status [optional] <p>
|
||||
* Controls if the server should be flagged as online. Setting this parameter
|
||||
* to <b>FALSE</b> and <b>retry_interval</b> to -1 allows a failed
|
||||
* server to be kept in the pool so as not to affect the key distribution
|
||||
* algorithm. Requests for this server will then failover or fail immediately
|
||||
* depending on the <b>memcache.allow_failover</b> setting.
|
||||
* Default to <b>TRUE</b>, meaning the server should be considered online.
|
||||
* </p>
|
||||
* @param callable $failure_callback [optional] <p>
|
||||
* Allows the user to specify a callback function to run upon encountering an error. The callback is run before failover is attempted.
|
||||
* The function takes two parameters, the hostname and port of the failed server.
|
||||
* </p>
|
||||
* @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
|
||||
*/
|
||||
public function setServerParams ($host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function setFailureCallback () {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 2.1.0)<br/>
|
||||
* Returns server status
|
||||
* @link https://php.net/manual/en/memcache.getserverstatus.php
|
||||
* @param string $host Point to the host where memcached is listening for connections.
|
||||
* @param int $port Point to the port where memcached is listening for connections.
|
||||
* @return int Returns a the servers status. 0 if server is failed, non-zero otherwise
|
||||
*/
|
||||
public function getServerStatus ($host, $port = 11211) {}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function findServer () {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Return version of the server
|
||||
* @link https://php.net/manual/en/memcache.getversion.php
|
||||
* @return string|false Returns a string of server version number or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function getVersion () {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 2.0.0)<br/>
|
||||
* Add an item to the server. If the key already exists, the value will not be added and <b>FALSE</b> will be returned.
|
||||
* @link https://php.net/manual/en/memcache.add.php
|
||||
* @param string $key The key that will be associated with the item.
|
||||
* @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized.
|
||||
* @param int $flag [optional] <p>
|
||||
* Use <b>MEMCACHE_COMPRESSED</b> to store the item
|
||||
* compressed (uses zlib).
|
||||
* </p>
|
||||
* @param int $expire [optional] <p>Expiration time of the item.
|
||||
* If it's equal to zero, the item will never expire.
|
||||
* You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p>
|
||||
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns <b>FALSE</b> if such key already exist. For the rest Memcache::add() behaves similarly to Memcache::set().
|
||||
*/
|
||||
public function add ($key , $var, $flag = null, $expire = null) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Stores an item var with key on the memcached server. Parameter expire is expiration time in seconds.
|
||||
* If it's 0, the item never expires (but memcached server doesn't guarantee this item to be stored all the time,
|
||||
* it could be deleted from the cache to make place for other items).
|
||||
* You can use MEMCACHE_COMPRESSED constant as flag value if you want to use on-the-fly compression (uses zlib).
|
||||
* @link https://php.net/manual/en/memcache.set.php
|
||||
* @param string $key The key that will be associated with the item.
|
||||
* @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized.
|
||||
* @param int $flag [optional] Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).
|
||||
* @param int $expire [optional] Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).
|
||||
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function set ($key, $var, $flag = null, $expire = null) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Replace value of the existing item
|
||||
* @link https://php.net/manual/en/memcache.replace.php
|
||||
* @param string $key <p>The key that will be associated with the item.</p>
|
||||
* @param mixed $var <p>The variable to store. Strings and integers are stored as is, other types are stored serialized.</p>
|
||||
* @param int $flag [optional] <p>Use <b>MEMCACHE_COMPRESSED</b> to store the item compressed (uses zlib).</p>
|
||||
* @param int $expire [optional] <p>Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p>
|
||||
* @return bool Returns TRUE on success or FALSE on failure.
|
||||
*/
|
||||
public function replace ($key, $var, $flag = null, $expire = null) {}
|
||||
|
||||
public function cas () {}
|
||||
|
||||
public function append () {}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function prepend () {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Retrieve item from the server
|
||||
* @link https://php.net/manual/en/memcache.get.php
|
||||
* @param string|array $key <p>
|
||||
* The key or array of keys to fetch.
|
||||
* </p>
|
||||
* @param int|array $flags [optional] <p>
|
||||
* If present, flags fetched along with the values will be written to this parameter. These
|
||||
* flags are the same as the ones given to for example {@link https://php.net/manual/en/memcache.set.php Memcache::set()}.
|
||||
* The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate
|
||||
* compression and serialization status).
|
||||
* </p>
|
||||
* @return string|array|false <p>
|
||||
* Returns the string associated with the <b>key</b> or
|
||||
* an array of found key-value pairs when <b>key</b> is an {@link https://php.net/manual/en/language.types.array.php array}.
|
||||
* Returns <b>FALSE</b> on failure, <b>key</b> is not found or
|
||||
* <b>key</b> is an empty {@link https://php.net/manual/en/language.types.array.php array}.
|
||||
* </p>
|
||||
*/
|
||||
public function get ($key, &$flags = null) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Delete item from the server
|
||||
* https://secure.php.net/manual/ru/memcache.delete.php
|
||||
* @param $key string The key associated with the item to delete.
|
||||
* @param $timeout int [optional] This deprecated parameter is not supported, and defaults to 0 seconds. Do not use this parameter.
|
||||
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function delete ($key, $timeout = 0 ) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Get statistics of the server
|
||||
* @link https://php.net/manual/ru/memcache.getstats.php
|
||||
* @param string $type [optional] <p>
|
||||
* The type of statistics to fetch.
|
||||
* Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}.
|
||||
* According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p>
|
||||
* @param int $slabid [optional] <p>
|
||||
* Used in conjunction with <b>type</b> set to
|
||||
* cachedump to identify the slab to dump from. The cachedump
|
||||
* command ties up the server and is strictly to be used for
|
||||
* debugging purposes.
|
||||
* </p>
|
||||
* @param int $limit [optional] <p>
|
||||
* Used in conjunction with <b>type</b> set to cachedump to limit the number of entries to dump.
|
||||
* </p>
|
||||
* @return array|false Returns an associative array of server statistics or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function getStats ($type = null, $slabid = null, $limit = 100) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 2.0.0)<br/>
|
||||
* Get statistics from all servers in pool
|
||||
* @link https://php.net/manual/en/memcache.getextendedstats.php
|
||||
* @param string $type [optional] <p>The type of statistics to fetch. Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}. According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p>
|
||||
* @param int $slabid [optional] <p>
|
||||
* Used in conjunction with <b>type</b> set to
|
||||
* cachedump to identify the slab to dump from. The cachedump
|
||||
* command ties up the server and is strictly to be used for
|
||||
* debugging purposes.
|
||||
* </p>
|
||||
* @param int $limit Used in conjunction with type set to cachedump to limit the number of entries to dump.
|
||||
* @return array|false Returns a two-dimensional associative array of server statistics or <b>FALSE</b>
|
||||
* Returns a two-dimensional associative array of server statistics or <b>FALSE</b>
|
||||
* on failure.
|
||||
*/
|
||||
public function getExtendedStats ($type = null, $slabid = null, $limit = 100) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 2.0.0)<br/>
|
||||
* Enable automatic compression of large values
|
||||
* @link https://php.net/manual/en/memcache.setcompressthreshold.php
|
||||
* @param int $thresold <p>Controls the minimum value length before attempting to compress automatically.</p>
|
||||
* @param float $min_saving [optional] <p>Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.</p>
|
||||
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function setCompressThreshold ($thresold, $min_saving = 0.2) {}
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Increment item's value
|
||||
* @link https://php.net/manual/en/memcache.increment.php
|
||||
* @param $key string Key of the item to increment.
|
||||
* @param $value int [optional] increment the item by <b>value</b>
|
||||
* @return int|false Returns new items value on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function increment ($key, $value = 1) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Decrement item's value
|
||||
* @link https://php.net/manual/en/memcache.decrement.php
|
||||
* @param $key string Key of the item do decrement.
|
||||
* @param $value int Decrement the item by <b>value</b>.
|
||||
* @return int|false Returns item's new value on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function decrement ($key, $value = 1) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.4.0)<br/>
|
||||
* Close memcached server connection
|
||||
* @link https://php.net/manual/en/memcache.close.php
|
||||
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function close () {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 1.0.0)<br/>
|
||||
* Flush all existing items at the server
|
||||
* @link https://php.net/manual/en/memcache.flush.php
|
||||
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function flush () {}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a connection to a set of memcache servers.
|
||||
* @link https://php.net/manual/en/class.memcache.php
|
||||
*/
|
||||
class Memcache extends MemcachePool {
|
||||
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.4.0)<br/>
|
||||
* Open memcached server persistent connection
|
||||
* @link https://php.net/manual/en/memcache.pconnect.php
|
||||
* @param string $host <p>
|
||||
* Point to the host where memcached is listening for connections. This parameter
|
||||
* may also specify other transports like unix:///path/to/memcached.sock
|
||||
* to use UNIX domain sockets, in this case <i>port</i> must also
|
||||
* be set to 0.
|
||||
* </p>
|
||||
* @param int $port [optional] <p>
|
||||
* Point to the port where memcached is listening for connections. Set this
|
||||
* parameter to 0 when using UNIX domain sockets.
|
||||
* </p>
|
||||
* @param int $timeout [optional] <p>
|
||||
* Value in seconds which will be used for connecting to the daemon. Think
|
||||
* twice before changing the default value of 1 second - you can lose all
|
||||
* the advantages of caching if your connection is too slow.
|
||||
* </p>
|
||||
* @return mixed a Memcache object or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function pconnect ($host, $port, $timeout = 1) {}
|
||||
}
|
||||
|
||||
// string $host [, int $port [, int $timeout ]]
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)</br>
|
||||
* Memcache::connect — Open memcached server connection
|
||||
* @link https://php.net/manual/en/memcache.connect.php
|
||||
* @param string $host <p>
|
||||
* Point to the host where memcached is listening for connections.
|
||||
* This parameter may also specify other transports like
|
||||
* unix:///path/to/memcached.sock to use UNIX domain sockets,
|
||||
* in this case port must also be set to 0.
|
||||
* </p>
|
||||
* @param int $port [optional] <p>
|
||||
* Point to the port where memcached is listening for connections.
|
||||
* Set this parameter to 0 when using UNIX domain sockets.
|
||||
* Note: port defaults to memcache.default_port if not specified.
|
||||
* For this reason it is wise to specify the port explicitly in this method call.
|
||||
* </p>
|
||||
* @param int $timeout [optional] <p>
|
||||
* Value in seconds which will be used for connecting to the daemon.
|
||||
* </p>
|
||||
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function memcache_connect ($host, $port, $timeout = 1) {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.4.0)
|
||||
* Memcache::pconnect — Open memcached server persistent connection
|
||||
*
|
||||
* @link https://php.net/manual/en/memcache.pconnect.php#example-5242
|
||||
* @param $host
|
||||
* @param null $port
|
||||
* @param int $timeout
|
||||
* @return Memcache
|
||||
*/
|
||||
function memcache_pconnect ($host, $port=null, $timeout=1) {}
|
||||
|
||||
function memcache_add_server () {}
|
||||
|
||||
function memcache_set_server_params () {}
|
||||
|
||||
function memcache_set_failure_callback () {}
|
||||
|
||||
function memcache_get_server_status () {}
|
||||
|
||||
function memcache_get_version () {}
|
||||
|
||||
function memcache_add () {}
|
||||
|
||||
function memcache_set () {}
|
||||
|
||||
function memcache_replace () {}
|
||||
|
||||
function memcache_cas () {}
|
||||
|
||||
function memcache_append () {}
|
||||
|
||||
function memcache_prepend () {}
|
||||
|
||||
function memcache_get () {}
|
||||
|
||||
function memcache_delete () {}
|
||||
|
||||
/**
|
||||
* (PECL memcache >= 0.2.0)<br/>
|
||||
* Turn debug output on/off
|
||||
* @link https://php.net/manual/en/function.memcache-debug.php
|
||||
* @param bool $on_off <p>
|
||||
* Turns debug output on if equals to <b>TRUE</b>.
|
||||
* Turns debug output off if equals to <b>FALSE</b>.
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b> if PHP was built with --enable-debug option, otherwise
|
||||
* returns <b>FALSE</b>.
|
||||
*/
|
||||
function memcache_debug ($on_off) {}
|
||||
|
||||
function memcache_get_stats () {}
|
||||
|
||||
function memcache_get_extended_stats () {}
|
||||
|
||||
function memcache_set_compress_threshold () {}
|
||||
|
||||
function memcache_increment () {}
|
||||
|
||||
function memcache_decrement () {}
|
||||
|
||||
function memcache_close () {}
|
||||
|
||||
function memcache_flush () {}
|
||||
|
||||
define ('MEMCACHE_COMPRESSED', 2);
|
||||
define ('MEMCACHE_USER1', 65536);
|
||||
define ('MEMCACHE_USER2', 131072);
|
||||
define ('MEMCACHE_USER3', 262144);
|
||||
define ('MEMCACHE_USER4', 524288);
|
||||
define ('MEMCACHE_HAVE_SESSION', 1);
|
||||
|
||||
// End of memcache v.3.0.8
|
||||
?>
|
|
@ -0,0 +1,96 @@
|
|||
language: php
|
||||
php:
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
branches:
|
||||
only:
|
||||
- build_test
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: always
|
||||
slack:
|
||||
secure: dowksPsxxCxGKT6nis5hUgkp6+ZDAhoqzQHF9rJnx4hx0iEygPhVBs7pKl9yL2jubYJoLs+EXwE7z1dYgDAEJh4BnfrCokCMLpFGcxVxQC/HeAUdSQ2/RtdBYR5PRT75ScaFpqM/SfXXZVtnwVXAw9Z+JC6BjQ9vmn23m51Jw4k=
|
||||
env:
|
||||
global:
|
||||
# Colors!
|
||||
- TEXTRESET=$(tput sgr0) # reset the foreground colour
|
||||
- RED=$(tput setaf 1)
|
||||
- GREEN=$(tput setaf 2)
|
||||
- YELLOW=$(tput setaf 3)
|
||||
- BLUE=$(tput setaf 4)
|
||||
- BOLD=$(tput bold)
|
||||
# User
|
||||
- GH_USER="getgrav"
|
||||
# Paths
|
||||
- RT_DEVTOOLS=$HOME/devtools
|
||||
- GOPATH="$HOME/go"
|
||||
- PATH="$GOPATH/bin:$PATH"
|
||||
# GH_TOKEN [API Key]
|
||||
- secure: "NR9pV7YteY9OoPmjDTQG0fDfocVu+tCeiDH1F2GFhXCu71UOIvqWXpOxp0RHkG5GIXdCFHx59yu+ZO275lbaHkbF8+4lVSVrV4RcGn+pIncvxr6iZCVW05dbAxV3H8alK+xYJRGmbyfQl5wIM49WvmuGHZjcmIloS4t/omQ3N+I="
|
||||
# BB_TOKEN value => "user:pass@"
|
||||
- secure: "einUtSEkUWy2IrqLXyVjwUU+mwaaoiOXRRVdLBpA3Zye6bZx8cm5h/5AplkPWhM/NmCJoW/MwNZHHkFhlr3mDRov5iOxVmTTYfnXB+I5lxYTSgduOLLErS7mU8hfADpVDU8bHNU44fNGD3UEiG1PD4qQBX4DMlqIFmR20mjs81k="
|
||||
# GH_API_USER [for curl]
|
||||
- secure: "AQGcX1B2NrI8ajflY4AimZDNcK2kBA3F6mbtEFQ78NkDoWhMipsQHayWXiSTzRc0YJKvQl2Y16MTwQF4VHzjTAiiZFATgA8J88vQUjIPabi/kKjqSmcLFoaAOAxStQbW6e0z2GiQ6KBMcNF1y5iUuI63xVrBvtKrYX/w5y+ako8="
|
||||
|
||||
before_install:
|
||||
- export TZ=Pacific/Honolulu
|
||||
- echo $TRAVIS_PHP_VERSION
|
||||
- echo $TRAVIS_BRANCH
|
||||
- echo $TRAVIS_PULL_REQUEST
|
||||
- composer self-update
|
||||
- if [ $TRAVIS_BRANCH == 'develop' ] || [ $TRAVIS_PULL_REQUEST != 'false' ]; then
|
||||
composer install --dev --prefer-dist;
|
||||
fi
|
||||
- |
|
||||
if [ $TRAVIS_BRANCH != 'develop' ] && [ $TRAVIS_PHP_VERSION == "7.1" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then
|
||||
export TRAVIS_TAG=$(curl -H "Authorization: token ${GH_TOKEN}" --fail -s https://api.github.com/repos/getgrav/grav/releases/latest | grep tag_name | head -n 1 | cut -d '"' -f 4);
|
||||
eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.13 bash)";
|
||||
go get github.com/github-release/github-release;
|
||||
git clone --quiet --depth=50 --branch=master https://${BB_TOKEN}bitbucket.org/rockettheme/grav-devtools.git $RT_DEVTOOLS &>/dev/null;
|
||||
if [ ! -z "$TRAVIS_TAG" ]; then
|
||||
cd ${RT_DEVTOOLS};
|
||||
./build-grav.sh skeletons.txt;
|
||||
fi;
|
||||
fi
|
||||
before_script:
|
||||
- phpenv config-rm xdebug.ini
|
||||
script:
|
||||
- if [ $TRAVIS_BRANCH == 'develop' ] || [ $TRAVIS_PULL_REQUEST != 'false' ]; then
|
||||
vendor/bin/codecept run;
|
||||
fi
|
||||
- echo "Latest Release Tag - ${TRAVIS_TAG}"
|
||||
- if [ ! -z "$TRAVIS_TAG" ] && [ $TRAVIS_BRANCH != 'develop' ] && [ $TRAVIS_PHP_VERSION == "7.1" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then
|
||||
FILES="$RT_DEVTOOLS/grav-dist/*.zip";
|
||||
for file in ${FILES[@]}; do
|
||||
NAME=${file##*/};
|
||||
if [[ "$NAME" == *"-rc"* ]]; then
|
||||
REPO="$(echo ${NAME} | rev | cut -f 3- -d "-" | rev)";
|
||||
else
|
||||
REPO="$(echo ${NAME} | rev | cut -f 2- -d "-" | rev)";
|
||||
fi;
|
||||
if [[ $REPO == 'grav' || $REPO == 'grav-admin' || $REPO == 'grav-update' ]]; then
|
||||
REPO="grav";
|
||||
fi;
|
||||
API="$(curl --fail --user "${GH_API_USER}" -s https://api.github.com/repos/${GH_USER}/${REPO}/releases/latest)";
|
||||
ASSETS="$(echo "${API}" | node gh-assets.js)";
|
||||
TAG="$(echo "${API}" | grep tag_name | head -n 1 | cut -d '"' -f 4)";
|
||||
if [ $REPO == "grav" ]; then
|
||||
TAG="$TRAVIS_TAG";
|
||||
fi;
|
||||
if [ ! -z "$ASSETS" ]; then
|
||||
for asset in ${ASSETS[@]}; do
|
||||
asset_id=$(echo ${asset} | cut -d ':' -f 1);
|
||||
asset_name=$(echo ${asset} | cut -d ':' -f 2);
|
||||
if [ "${NAME}" == "${asset_name}" ]; then
|
||||
echo -e "\nAsset ${BOLD}${BLUE}${NAME}${TEXTRESET} already exists in ${YELLOW}${REPO}${TEXTRESET}@${BOLD}${YELLOW}${TAG}${TEXTRESET}... deleting id ${BOLD}${RED}${asset_id}${TEXTRESET}...";
|
||||
curl -X DELETE --fail --user "${GH_API_USER}" "https://api.github.com/repos/${GH_USER}/${REPO}/releases/assets/${asset_id}";
|
||||
fi;
|
||||
done;
|
||||
fi;
|
||||
echo "Uploading package ${BOLD}${BLUE}${NAME}${TEXTRESET} to ${YELLOW}${REPO}${TEXTRESET}@${YELLOW}${TAG}${TEXTRESET}";
|
||||
github-release upload --security-token $GH_TOKEN --user ${GH_USER} --repo $REPO --tag "$TAG" --name "$NAME" --file "$file";
|
||||
done;
|
||||
fi
|
|
@ -0,0 +1,133 @@
|
|||
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
[INSERT CONTACT METHOD].
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
||||
at [https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
|
@ -0,0 +1,138 @@
|
|||
# Contributing to Grav
|
||||
|
||||
:+1::tada: First, thanks for getting involved with Grav! :tada::+1:
|
||||
|
||||
Please take a moment to review this document in order to make the contribution
|
||||
process easy and effective for everyone involved.
|
||||
|
||||
Following these guidelines helps to communicate that you respect the time of
|
||||
the developers managing and developing this open source project. In return,
|
||||
they should reciprocate that respect in addressing your issue or assessing
|
||||
patches and features.
|
||||
|
||||
## Grav, Plugins, Themes and Skeletons
|
||||
|
||||
Grav is a large open source project — it's made up of over 100 repositories. When you initially consider contributing to Grav, you might be unsure about which of those 200 repositories implements the functionality you want to change or report a bug for.
|
||||
|
||||
[https://github.com/getgrav/grav](https://github.com/getgrav/grav) is the main Grav repository. The core of Grav is provided by this repo.
|
||||
|
||||
[https://github.com/getgrav/grav-plugin-admin](https://github.com/getgrav/grav-plugin-admin) is the Admin Plugin repository.
|
||||
|
||||
Every Plugin and Theme has its own repository. If you have a problem you think is specific to a Theme or Plugin, please report it in its corresponding repository. Please read the Plugin or Theme documentation to ensure the problem is not addressed there already.
|
||||
|
||||
Every Skeleton also has its own repository, so if an issue is not specific to a theme or plugin but rather to its usage in the skeleton, report it in the skeleton repository.
|
||||
|
||||
## Using the issue tracker
|
||||
|
||||
The issue tracker is the preferred channel for [bug reports](#bugs),
|
||||
[features requests](#features) and [submitting pull
|
||||
requests](#pull-requests), but please respect the following restrictions:
|
||||
|
||||
* Please **do not** use the issue tracker for support requests. Use
|
||||
[the Forum](http://getgrav.org/forum) or [the Chat](https://chat.getgrav.org/).
|
||||
|
||||
|
||||
<a name="bugs"></a>
|
||||
## Bug reports
|
||||
|
||||
A bug is a _demonstrable problem_ that is caused by the code in the repository.
|
||||
Good bug reports are extremely helpful - thank you!
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
1. **Check you satisfy the Grav requirements** — [http://learn.getgrav.org/basics/requirements](http://learn.getgrav.org/basics/requirements)
|
||||
|
||||
2. **Check this happens on a clean Grav install** — check if the issue happens on any Grav site, or just with a specific configuration of plugins / theme
|
||||
|
||||
3. **Use the GitHub issue search** — check if the issue has already been
|
||||
reported.
|
||||
|
||||
4. **Check if the issue is already being solved in a PR** — check the open Pull Requests to see if one already solves the problem you're having
|
||||
|
||||
5. **Check if the issue has been fixed** — try to reproduce it using the
|
||||
latest `develop` branch in the repository.
|
||||
|
||||
6. **Isolate the problem** — create a [reduced test
|
||||
case](http://css-tricks.com/reduced-test-cases/) and provide a step-by-step instruction set on how to recreate the problem. Include code samples, page snippets or yaml configurations if needed.
|
||||
|
||||
7. **Check the problem on Grav 1.1** — if you're using Grav 1.0, latest stable release, please also check if you can replicate the issue on Grav 1.1 RC as many bugs are already solved in the next Grav release.
|
||||
|
||||
A good bug report shouldn't leave others needing to chase you up for more
|
||||
information. Please try to be as detailed as possible in your report.
|
||||
|
||||
- What is your environment? Is it localhost, OSX, Linux, on a remote server? Same happening locally and or the server, or just locally or just on Linux?
|
||||
|
||||
- What steps will reproduce the issue? What browser(s) and OS experience the problem?
|
||||
|
||||
- What would you expect to be the outcome?
|
||||
|
||||
- Did the problem start happening recently (e.g. after updating to a new version of Grav) or was this always a problem?
|
||||
|
||||
- If the problem started happening recently, can you reproduce the problem in an older version of Grav? What's the most recent version in which the problem doesn't happen? You can download older versions of Grav from the releases page on Github.
|
||||
|
||||
- Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
|
||||
|
||||
|
||||
All these details will help contributors to fix any potential bugs.
|
||||
|
||||
Important: [include Code Samples in triple backticks](https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks) so that Github will provide a proper indentation. [Add the language name after the backticks](https://help.github.com/articles/github-flavored-markdown/#syntax-highlighting) to add syntax highlighting to the code snippets.
|
||||
|
||||
Example:
|
||||
|
||||
> Short and descriptive example bug report title
|
||||
>
|
||||
> A summary of the issue and the browser/OS environment in which it occurs. If
|
||||
> suitable, include the steps required to reproduce the bug.
|
||||
>
|
||||
> 1. This is the first step
|
||||
> 2. This is the second step
|
||||
> 3. Further steps, etc.
|
||||
>>
|
||||
> Any other information you want to share that is relevant to the issue being
|
||||
> reported. This might include the lines of code that you have identified as
|
||||
> causing the bug, and potential solutions (and your opinions on their
|
||||
> merits).
|
||||
|
||||
|
||||
<a name="features"></a>
|
||||
## Feature requests
|
||||
|
||||
Feature requests are welcome. But take a moment to find out whether your idea
|
||||
fits with the scope and aims of the project. It's up to *you* to make a strong
|
||||
case to convince the project's developers of the merits of this feature. Please
|
||||
provide as much detail and context as possible.
|
||||
|
||||
|
||||
<a name="pull-requests"></a>
|
||||
## Pull requests
|
||||
|
||||
Good pull requests - patches, improvements, new features - are a fantastic
|
||||
help. They should remain focused in scope and avoid containing unrelated
|
||||
commits.
|
||||
|
||||
**Please ask first** in [the Forum](http://getgrav.org/forum) or [the Chat](https://chat.getgrav.org/)
|
||||
before embarking on any significant pull request (e.g.
|
||||
implementing features, refactoring code..),
|
||||
otherwise you risk spending a lot of time working on something that the
|
||||
project's developers might not want to merge into the project.
|
||||
|
||||
Please adhere to the coding conventions used throughout the project (indentation,
|
||||
accurate comments, etc.) and any other requirements.
|
||||
|
||||
See [Using Pull Request](https://help.github.com/articles/using-pull-requests/) and [Fork a Repo](https://help.github.com/articles/fork-a-repo/) if you're not familiar with Pull Requests.
|
||||
|
||||
Any pull request should be based on the `develop` branch. We will not consider pull requests made to master.
|
||||
|
||||
**IMPORTANT**: By submitting a patch, you agree to allow the project owner to
|
||||
license your work under the same license as that used by the project.
|
||||
|
||||
<a name="translations"></a>
|
||||
### Translations
|
||||
Translations for Grav core and the Admin plugin are managed through Crowdin:
|
||||
|
||||
- Admin: https://crowdin.com/project/grav-admin
|
||||
- Core: https://crowdin.com/project/grav-core
|
||||
|
||||
Please do not post translations PRs for core or admin translations on GitHub, with the exception of fixes for the english language.
|
||||
|
||||
All other plugins and themes translations are handled directly in their GitHub repository, and the string are usually found in the `languages.yaml` file at the root of each project.
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Grav
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,156 @@
|
|||
# ![](https://avatars1.githubusercontent.com/u/8237355?v=2&s=50) Grav
|
||||
|
||||
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)
|
||||
[![Discord](https://img.shields.io/discord/501836936584101899.svg?logo=discord&colorB=728ADA&label=Discord%20Chat)](https://chat.getgrav.org)
|
||||
[![PHP Tests](https://github.com/getgrav/grav/workflows/PHP%20Tests/badge.svg?branch=develop)](https://github.com/getgrav/grav/actions?query=workflow%3A%22PHP+Tests%22) [![OpenCollective](https://opencollective.com/grav/tiers/backers/badge.svg?label=Backers&color=brightgreen)](#backers) [![OpenCollective](https://opencollective.com/grav/tiers/supporters/badge.svg?label=Supporters&color=brightgreen)](#supporters) [![OpenCollective](https://opencollective.com/grav/tiers/sponsors/badge.svg?label=Sponsors&color=brightgreen)](#sponsors)
|
||||
|
||||
Grav is a **Fast**, **Simple**, and **Flexible**, file-based Web-platform. There is **Zero** installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principles to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful **Package Management System** to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself.
|
||||
|
||||
The underlying architecture of Grav is designed to use well-established and _best-in-class_ technologies to ensure that Grav is simple to use and easy to extend. Some of these key technologies include:
|
||||
|
||||
* [Twig Templating](https://twig.symfony.com/): for powerful control of the user interface
|
||||
* [Markdown](https://en.wikipedia.org/wiki/Markdown): for easy content creation
|
||||
* [YAML](https://yaml.org): for simple configuration
|
||||
* [Parsedown](https://parsedown.org/): for fast Markdown and Markdown Extra support
|
||||
* [Doctrine Cache](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html): layer for performance
|
||||
* [Pimple Dependency Injection Container](https://github.com/silexphp/Pimple): for extensibility and maintainability
|
||||
* [Symfony Event Dispatcher](https://symfony.com/doc/current/components/event_dispatcher/introduction.html): for plugin event handling
|
||||
* [Symfony Console](https://symfony.com/doc/current/components/console/introduction.html): for CLI interface
|
||||
* [Gregwar Image Library](https://github.com/Gregwar/Image): for dynamic image manipulation
|
||||
|
||||
# Requirements
|
||||
|
||||
- PHP 7.3.6 or higher. Check the [required modules list](https://learn.getgrav.org/basics/requirements#php-requirements)
|
||||
- Check the [Apache](https://learn.getgrav.org/basics/requirements#apache-requirements) or [IIS](https://learn.getgrav.org/basics/requirements#iis-requirements) requirements
|
||||
|
||||
# Documentation
|
||||
|
||||
The full documentation can be found from [learn.getgrav.org](https://learn.getgrav.org).
|
||||
|
||||
# QuickStart
|
||||
|
||||
These are the options to get Grav:
|
||||
|
||||
### Downloading a Grav Package
|
||||
|
||||
You can download a **ready-built** package from the [Downloads page on https://getgrav.org](https://getgrav.org/downloads)
|
||||
|
||||
### With Composer
|
||||
|
||||
You can create a new project with the latest **stable** Grav release with the following command:
|
||||
|
||||
```
|
||||
$ composer create-project getgrav/grav ~/webroot/grav
|
||||
```
|
||||
|
||||
### From GitHub
|
||||
|
||||
1. Clone the Grav repository from [https://github.com/getgrav/grav]() to a folder in the webroot of your server, e.g. `~/webroot/grav`. Launch a **terminal** or **console** and navigate to the webroot folder:
|
||||
```
|
||||
$ cd ~/webroot
|
||||
$ git clone https://github.com/getgrav/grav.git
|
||||
```
|
||||
|
||||
2. Install the **plugin** and **theme dependencies** by using the [Grav CLI application](https://learn.getgrav.org/advanced/grav-cli) `bin/grav`:
|
||||
```
|
||||
$ cd ~/webroot/grav
|
||||
$ bin/grav install
|
||||
```
|
||||
|
||||
Check out the [install procedures](https://learn.getgrav.org/basics/installation) for more information.
|
||||
|
||||
# Adding Functionality
|
||||
|
||||
You can download [plugins](https://getgrav.org/downloads/plugins) or [themes](https://getgrav.org/downloads/themes) manually from the appropriate tab on the [Downloads page on https://getgrav.org](https://getgrav.org/downloads), but the preferred solution is to use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`:
|
||||
|
||||
```
|
||||
$ bin/gpm index
|
||||
```
|
||||
|
||||
This will display all the available plugins and then you can install one or more with:
|
||||
|
||||
```
|
||||
$ bin/gpm install <plugin/theme>
|
||||
```
|
||||
|
||||
# Updating
|
||||
|
||||
To update Grav you should use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`:
|
||||
|
||||
```
|
||||
$ bin/gpm selfupgrade
|
||||
```
|
||||
|
||||
To update plugins and themes:
|
||||
|
||||
```
|
||||
$ bin/gpm update
|
||||
```
|
||||
|
||||
## Upgrading from older version
|
||||
|
||||
* [Upgrading to Grav 1.7](https://learn.getgrav.org/16/advanced/grav-development/grav-17-upgrade-guide)
|
||||
* [Upgrading to Grav 1.6](https://learn.getgrav.org/16/advanced/grav-development/grav-16-upgrade-guide)
|
||||
* [Upgrading from Grav <1.6](https://learn.getgrav.org/16/advanced/grav-development/grav-15-upgrade-guide)
|
||||
|
||||
# Contributing
|
||||
We appreciate any contribution to Grav, whether it is related to bugs, grammar, or simply a suggestion or improvement! Please refer to the [Contributing guide](CONTRIBUTING.md) for more guidance on this topic.
|
||||
|
||||
## Security issues
|
||||
If you discover a possible security issue related to Grav or one of its plugins, please email the core team at contact@getgrav.org and we'll address it as soon as possible.
|
||||
|
||||
# Getting Started
|
||||
|
||||
* [What is Grav?](https://learn.getgrav.org/basics/what-is-grav)
|
||||
* [Install](https://learn.getgrav.org/basics/installation) Grav in few seconds
|
||||
* Understand the [Configuration](https://learn.getgrav.org/basics/grav-configuration)
|
||||
* Take a peek at our available free [Skeletons](https://getgrav.org/downloads/skeletons)
|
||||
* If you have questions, jump on our [Discord Chat Server](https://chat.getgrav.org)!
|
||||
* Have fun!
|
||||
|
||||
# Exploring More
|
||||
|
||||
* Have a look at our [Basic Tutorial](https://learn.getgrav.org/basics/basic-tutorial)
|
||||
* Dive into more [advanced](https://learn.getgrav.org/advanced) functions
|
||||
* Learn about the [Grav CLI](https://learn.getgrav.org/cli-console/grav-cli)
|
||||
* Review examples in the [Grav Cookbook](https://learn.getgrav.org/cookbook)
|
||||
* More [Awesome Grav Stuff](https://github.com/getgrav/awesome-grav)
|
||||
|
||||
# Backers
|
||||
Support Grav with a monthly donation to help us continue development. [[Become a backer](https://opencollective.com/grav/contribute)]
|
||||
|
||||
<img src="https://opencollective.com/grav/tiers/backers.svg?avatarHeight=36&width=600" />
|
||||
|
||||
|
||||
# Supporters
|
||||
Support Grav with a monthly donation to help us continue development. [[Become a supporter](https://opencollective.com/grav/contribute)]
|
||||
|
||||
<img src="https://opencollective.com/grav/tiers/supporters.svg?avatarHeight=36&width=600" />
|
||||
|
||||
|
||||
# Sponsors
|
||||
Support Grav with a yearly donation to help us continue development. [[Become a sponsor](https://opencollective.com/grav/contribute)]
|
||||
|
||||
<img src="https://opencollective.com/grav/tiers/sponsors.svg?avatarHeight=36&width=600" />
|
||||
|
||||
# License
|
||||
|
||||
See [LICENSE](LICENSE.txt)
|
||||
|
||||
|
||||
[gitflow-model]: http://nvie.com/posts/a-successful-git-branching-model/
|
||||
[gitflow-extensions]: https://github.com/nvie/gitflow
|
||||
|
||||
# Running Tests
|
||||
|
||||
First install the dev dependencies by running `composer install` from the Grav root.
|
||||
|
||||
Then `composer test` will run the Unit Tests, which should be always executed successfully on any site.
|
||||
Windows users should use the `composer test-windows` command.
|
||||
You can also run a single unit test file, e.g. `composer test tests/unit/Grav/Common/AssetsTest.php`
|
||||
|
||||
To run phpstan tests, you should run:
|
||||
|
||||
* `composer phpstan` for global tests
|
||||
* `composer phpstan-framework` for more strict tests
|
||||
* `composer phpstan-plugins` to test all installed plugins
|
|
@ -0,0 +1,29 @@
|
|||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
We are focusing our security updates on the following versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 1.7.x | :white_check_mark: |
|
||||
| 1.6.x | :warning: |
|
||||
| < 1.6 | :x: |
|
||||
|
||||
## :warning: Versions
|
||||
|
||||
Versions with :warning: will be supported for security issues, however you won't be able to update to them, you will need to manually update through the [`direct-install` command](https://learn.getgrav.org/17/admin-panel/tools).
|
||||
|
||||
If you cannot update to the latest stable version available because, for example, your server does not meet the minimum PHP requirements, you can manually install a previous version by downloading the package from our Releases directory (https://github.com/getgrav/grav/releases).
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please contact security@getgrav.org with a detailed explanation of the security issue found. If it appears to be a legitimate issues, please submit an **advisory via GitHub Security**: https://github.com/getgrav/grav/security/advisories
|
||||
|
||||
>> NOTE: Please do not use 3rd party security issue reporting services, we like to keep everything in the GitHub ecosystem for easier manageability.
|
||||
|
||||
## Bug Bounties
|
||||
|
||||
We do greatly appreciate your efforts to improve Grav, but unfortunately because we are a small open source project, we **do not have the resources to offer bounties** for security issues found.
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
/* @copyright Copyright (c) 2015 - 2023 Trilby Media, LLC. All rights reserved. */
|
|
@ -0,0 +1 @@
|
|||
/* @copyright Copyright (c) 2015 - 2023 Trilby Media, LLC. All rights reserved. */
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
use Grav\Common\Composer;
|
||||
use Grav\Common\Grav;
|
||||
use Grav\Console\Application\GpmApplication;
|
||||
|
||||
\define('GRAV_CLI', true);
|
||||
\define('GRAV_REQUEST_TIME', microtime(true));
|
||||
|
||||
if (!file_exists(__DIR__ . '/../vendor/autoload.php')){
|
||||
// Before we can even start, we need to run composer first
|
||||
require_once __DIR__ . '/../system/src/Grav/Common/Composer.php';
|
||||
|
||||
$composer = Composer::getComposerExecutor();
|
||||
echo "Preparing to install vendor dependencies...\n\n";
|
||||
echo system($composer.' --working-dir="'.__DIR__.'/../" --no-interaction --no-dev --prefer-dist -o install');
|
||||
echo "\n\n";
|
||||
}
|
||||
|
||||
$autoload = require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
// Set timezone to default, falls back to system if php.ini not set
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
|
||||
// Set internal encoding.
|
||||
@ini_set('default_charset', 'UTF-8');
|
||||
mb_internal_encoding('UTF-8');
|
||||
|
||||
if (!file_exists(GRAV_ROOT . '/index.php')) {
|
||||
exit('FATAL: Must be run from ROOT directory of Grav!');
|
||||
}
|
||||
|
||||
if (!function_exists('curl_version')) {
|
||||
exit('FATAL: GPM requires PHP Curl module to be installed');
|
||||
}
|
||||
|
||||
$grav = Grav::instance(array('loader' => $autoload));
|
||||
|
||||
$app = new GpmApplication('Grav Package Manager', GRAV_VERSION);
|
||||
$app->run();
|
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
use Grav\Common\Composer;
|
||||
use Grav\Common\Grav;
|
||||
use Grav\Console\Application\GravApplication;
|
||||
|
||||
\define('GRAV_CLI', true);
|
||||
\define('GRAV_REQUEST_TIME', microtime(true));
|
||||
|
||||
if (!file_exists(__DIR__ . '/../vendor/autoload.php')){
|
||||
// Before we can even start, we need to run composer first
|
||||
require_once __DIR__ . '/../system/src/Grav/Common/Composer.php';
|
||||
|
||||
$composer = Composer::getComposerExecutor();
|
||||
echo "Preparing to install vendor dependencies...\n\n";
|
||||
echo system($composer.' --working-dir="'.__DIR__.'/../" --no-interaction --no-dev --prefer-dist -o install');
|
||||
echo "\n\n";
|
||||
}
|
||||
|
||||
$autoload = require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
// Set timezone to default, falls back to system if php.ini not set
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
|
||||
// Set internal encoding.
|
||||
@ini_set('default_charset', 'UTF-8');
|
||||
mb_internal_encoding('UTF-8');
|
||||
|
||||
$grav = Grav::instance(array('loader' => $autoload));
|
||||
|
||||
if (!file_exists(GRAV_ROOT . '/index.php')) {
|
||||
exit('FATAL: Must be run from ROOT directory of Grav!');
|
||||
}
|
||||
|
||||
$app = new GravApplication('Grav CLI Application', GRAV_VERSION);
|
||||
$app->run();
|
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
use Grav\Common\Composer;
|
||||
use Grav\Common\Grav;
|
||||
use Grav\Console\Application\PluginApplication;
|
||||
|
||||
\define('GRAV_CLI', true);
|
||||
\define('GRAV_REQUEST_TIME', microtime(true));
|
||||
|
||||
if (!file_exists(__DIR__ . '/../vendor/autoload.php')){
|
||||
// Before we can even start, we need to run composer first
|
||||
require_once __DIR__ . '/../system/src/Grav/Common/Composer.php';
|
||||
|
||||
$composer = Composer::getComposerExecutor();
|
||||
echo "Preparing to install vendor dependencies...\n\n";
|
||||
echo system($composer.' --working-dir="'.__DIR__.'/../" --no-interaction --no-dev --prefer-dist -o install');
|
||||
echo "\n\n";
|
||||
}
|
||||
|
||||
$autoload = require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
// Set timezone to default, falls back to system if php.ini not set
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
|
||||
// Set internal encoding.
|
||||
@ini_set('default_charset', 'UTF-8');
|
||||
mb_internal_encoding('UTF-8');
|
||||
|
||||
if (!file_exists(GRAV_ROOT . '/index.php')) {
|
||||
exit('FATAL: Must be run from ROOT directory of Grav!');
|
||||
}
|
||||
|
||||
// Bootstrap Grav container.
|
||||
$grav = Grav::instance(array('loader' => $autoload));
|
||||
|
||||
$app = new PluginApplication('Grav Plugins Commands', GRAV_VERSION);
|
||||
$app->run();
|
|
@ -0,0 +1 @@
|
|||
/* @copyright Copyright (c) 2015 - 2023 Trilby Media, LLC. All rights reserved. */
|
|
@ -0,0 +1,16 @@
|
|||
actor: Tester
|
||||
bootstrap: _bootstrap.php
|
||||
paths:
|
||||
tests: tests
|
||||
log: tests/_output
|
||||
data: tests/_data
|
||||
support: tests/_support
|
||||
envs: tests/_envs
|
||||
settings:
|
||||
colors: true
|
||||
memory_limit: 1024M
|
||||
extensions:
|
||||
enabled:
|
||||
- Codeception\Extension\RunFailed
|
||||
modules:
|
||||
config:
|
|
@ -0,0 +1,131 @@
|
|||
{
|
||||
"name": "getgrav/grav",
|
||||
"type": "project",
|
||||
"description": "Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS",
|
||||
"keywords": [
|
||||
"cms",
|
||||
"flat-file cms",
|
||||
"flat cms",
|
||||
"flatfile cms",
|
||||
"php"
|
||||
],
|
||||
"homepage": "https://getgrav.org",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^7.3.6 || ^8.0",
|
||||
"ext-json": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-curl": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-dom": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-gd": "*",
|
||||
"symfony/polyfill-mbstring": "~1.23",
|
||||
"symfony/polyfill-iconv": "^1.23",
|
||||
"symfony/polyfill-php74": "^1.23",
|
||||
"symfony/polyfill-php80": "^1.23",
|
||||
"symfony/polyfill-php81": "^1.23",
|
||||
"psr/simple-cache": "^1.0",
|
||||
"psr/http-message": "^1.0",
|
||||
"psr/http-server-middleware": "^1.0",
|
||||
"psr/container": "~1.1.0",
|
||||
"nyholm/psr7-server": "^1.0",
|
||||
"nyholm/psr7": "^1.3",
|
||||
"twig/twig": "~v1.44",
|
||||
"erusev/parsedown": "^1.7",
|
||||
"erusev/parsedown-extra": "~0.8",
|
||||
"symfony/contracts": "~1.1",
|
||||
"symfony/yaml": "~4.4",
|
||||
"symfony/console": "~4.4",
|
||||
"symfony/event-dispatcher": "~4.4",
|
||||
"symfony/var-dumper": "~4.4",
|
||||
"symfony/process": "~4.4",
|
||||
"doctrine/cache": "^1.10",
|
||||
"doctrine/collections": "^1.6",
|
||||
"guzzlehttp/psr7": "^1.7",
|
||||
"filp/whoops": "~2.9",
|
||||
"matthiasmullie/minify": "^1.3",
|
||||
"monolog/monolog": "~1.25",
|
||||
"getgrav/image": "^3.0",
|
||||
"getgrav/cache": "^2.0",
|
||||
"donatj/phpuseragentparser": "~1.1",
|
||||
"pimple/pimple": "~3.5.0",
|
||||
"rockettheme/toolbox": "~1.5",
|
||||
"maximebf/debugbar": "~1.16",
|
||||
"league/climate": "^3.6",
|
||||
"miljar/php-exif": "^0.6",
|
||||
"composer/ca-bundle": "^1.2",
|
||||
"dragonmantank/cron-expression": "^1.2",
|
||||
"willdurand/negotiation": "^3.0",
|
||||
"itsgoingd/clockwork": "^5.0",
|
||||
"symfony/http-client": "^4.4",
|
||||
"composer/semver": "^1.4",
|
||||
"rhukster/dom-sanitizer": "^1.0",
|
||||
"multiavatar/multiavatar-php": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeception/codeception": "^4.1",
|
||||
"phpstan/phpstan": "^1.8",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.0",
|
||||
"phpunit/php-code-coverage": "~9.2",
|
||||
"getgrav/markdowndocs": "^2.0",
|
||||
"codeception/module-asserts": "^1.3",
|
||||
"codeception/module-phpbrowser": "^1.0",
|
||||
"symfony/service-contracts": "*"
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-php72": "*",
|
||||
"symfony/polyfill-php73": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "Recommended for better performance",
|
||||
"ext-iconv": "Recommended for better performance",
|
||||
"ext-zend-opcache": "Recommended for better performance",
|
||||
"ext-intl": "Recommended for multi-language sites",
|
||||
"ext-memcache": "Needed to support Memcache servers",
|
||||
"ext-memcached": "Needed to support Memcached servers",
|
||||
"ext-redis": "Needed to support Redis servers",
|
||||
"ext-exif": "Needed to use exif data from images."
|
||||
},
|
||||
"config": {
|
||||
"apcu-autoloader": true,
|
||||
"platform": {
|
||||
"php": "7.3.6"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Grav\\": "system/src/Grav",
|
||||
"Twig\\": "system/src/Twig"
|
||||
},
|
||||
"files": [
|
||||
"system/defines.php",
|
||||
"system/src/DOMLettersIterator.php",
|
||||
"system/src/DOMWordsIterator.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"PHPStan\\": "tests/phpstan/classes"
|
||||
}
|
||||
},
|
||||
"archive": {
|
||||
"exclude": [
|
||||
"VERSION"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"api-17": "vendor/bin/phpdoc-md generate system/src > user/pages/14.api/default.17.md",
|
||||
"post-create-project-cmd": "bin/grav install",
|
||||
"phpstan": "vendor/bin/phpstan analyse -l 2 -c ./tests/phpstan/phpstan.neon --memory-limit=720M system/src",
|
||||
"phpstan-framework": "vendor/bin/phpstan analyse -l 5 -c ./tests/phpstan/phpstan.neon --memory-limit=480M system/src/Grav/Framework system/src/Grav/Events system/src/Grav/Installer",
|
||||
"phpstan-plugins": "vendor/bin/phpstan analyse -l 1 -c ./tests/phpstan/plugins.neon --memory-limit=400M user/plugins",
|
||||
"test": "vendor/bin/codecept run unit",
|
||||
"test-windows": "vendor\\bin\\codecept run unit"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-develop": "1.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/* @copyright Copyright (c) 2015 - 2023 Trilby Media, LLC. All rights reserved. */
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @package Grav.Core
|
||||
*
|
||||
* @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace Grav;
|
||||
|
||||
\define('GRAV_REQUEST_TIME', microtime(true));
|
||||
\define('GRAV_PHP_MIN', '7.3.6');
|
||||
|
||||
if (PHP_SAPI === 'cli-server') {
|
||||
$symfony_server = stripos(getenv('_'), 'symfony') !== false || stripos($_SERVER['SERVER_SOFTWARE'] ?? '', 'symfony') !== false || stripos($_ENV['SERVER_SOFTWARE'] ?? '', 'symfony') !== false;
|
||||
|
||||
if (!isset($_SERVER['PHP_CLI_ROUTER']) && !$symfony_server) {
|
||||
die("PHP webserver requires a router to run Grav, please use: <pre>php -S {$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']} system/router.php</pre>");
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure vendor libraries exist
|
||||
$autoload = __DIR__ . '/vendor/autoload.php';
|
||||
if (!is_file($autoload)) {
|
||||
die('Please run: <i>bin/grav install</i>');
|
||||
}
|
||||
|
||||
// Register the auto-loader.
|
||||
$loader = require $autoload;
|
||||
|
||||
// Set timezone to default, falls back to system if php.ini not set
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
|
||||
// Set internal encoding.
|
||||
@ini_set('default_charset', 'UTF-8');
|
||||
mb_internal_encoding('UTF-8');
|
||||
|
||||
use Grav\Common\Grav;
|
||||
use RocketTheme\Toolbox\Event\Event;
|
||||
|
||||
// Get the Grav instance
|
||||
$grav = Grav::instance(array('loader' => $loader));
|
||||
|
||||
// Process the page
|
||||
try {
|
||||
$grav->process();
|
||||
} catch (\Error|\Exception $e) {
|
||||
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
|
||||
throw $e;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/* @copyright Copyright (c) 2015 - 2023 Trilby Media, LLC. All rights reserved. */
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 2,
|
||||
"builds": [{ "src": "*.php", "use": "@now/php" }]
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
User-agent: *
|
||||
Disallow: /.github/
|
||||
Disallow: /.phan/
|
||||
Disallow: /assets/
|
||||
Disallow: /backup/
|
||||
Disallow: /bin/
|
||||
Disallow: /cache/
|
||||
Disallow: /logs/
|
||||
Disallow: /system/
|
||||
Disallow: /tests/
|
||||
Disallow: /tmp/
|
||||
Disallow: /user/
|
||||
Disallow: /vendor/
|
||||
Disallow: /webserver-configs/
|
||||
Allow: /user/pages/
|
||||
Allow: /user/themes/
|
||||
Allow: /user/images/
|
||||
Allow: /
|
||||
Allow: *.css$
|
||||
Allow: *.js$
|
||||
Allow: /system/*.js$
|
|
@ -0,0 +1,2 @@
|
|||
/** Clockwork Debugger CSS **/
|
||||
.clockwork-badge{position:fixed;z-index:10;bottom:0;left:0;padding:2px 4px;background-color:#eee;border:1px solid #ccc;border-bottom:0;border-left:0;display:flex;align-items:center}.clockwork-badge:hover{width:auto}.clockwork-badge:hover:after{content:'Grav Clockwork debugger enabled. Install Clockwork Browser extension (Chrome or Firefox), open your Developer tools and then select the Clockwork tab.'}.clockwork-badge:after{margin-left:10px;font-family:Monaco,Consolas,"Lucida Console",monospace;font-size:12px;line-height:1.5;color:#666}.clockwork-badge i{display:block;float:left;height:22px;width:22px;min-width:22px;background-size:contain;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA/1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeHh4AAAD///8EBAT7+/sLCwv29vYVFRUvLy/t7e3m5ubCwsKxsbE/Pz+mpqZMTEwcHBzy8vLp6emfn5+AgIA2Njbi4uLf39+rq6tzc3NWVlYhISHa2trW1tbS0tLMzMy7u7uZmZmUlJSMjIxvb29kZGRHR0c7Ozt5eXkqKiq1tbWQkJBqampbW1tSUlLHx8eHh4ckJCRDQ0M3wD42AAAAI3RSTlMA/PibTbQ0x76TVAlw4LhZLOuEYCAN9Hjx0a2ppGZEGYw97djhXHwAAATZSURBVFjDlVcHW+MwDO1eFCjj2McNOzvdpXTTXVbL/P+/5SQ7QSSX5Di1X1onfi/Sk+Q4sTDbKqWK+YuznZ2zi3wxVdqK/Zf92M1nT9gnO8rmd398GX6Z3xaoOFoiAQcx3E5efgmeSuN8F6Xg1x3G06l/wjNpMR1B0uif4EhnIuFb+0diIoFXk3IVfokisR+h52GO4JKgyjmfaMhAFNlSaPR7DpwI+lzn/E4QKIqmKIJirxCMP4izBPPZPXhgXwMBYgULw0nfg/BF5scDbslb7QeJ08yqqTEmGYoB95d4H8ETL8+n9wBqrLu6ao3bBsMwAnxISf/9BHcqxNB8Y7cWl3Zz7TAUfPrvAT6AoNEFFXvsjutL01yOuMrtBxnFXsmT/1wQHmdWAFNnI3uI48Yj0FUcHbKf62GfUfr8eeQt7Uk3mQZpZNoVRPEui5vtEz5zFEpgWnyqVBZMc6oaGNriH2hGVZ0OxEvInPeMaZWJBA7vmPbCr5jjws5HBnAUxvDMH40aCIf4G5BjRQSs8E8HFFYf8bGxgDvD55bzGhwWkoBcuIyHR/AMdaCagxXDhtL6tSqoWpd4BMnlIR+Or+rYTK/a3EAGcc6e4AWHISnWv20iCCojsHoVlQdjrMexFF2C7UMg2A2WEGWbQhXN6l3eXC6XGp4b9qxbuEB2EBGBwtocrK90cVG5mbRXm6vmx/0phq1sIAGKDgLOBiN1MrO5a9aDl+D0W6x0Ar9BCTRuIIANa90Y7LrLVRXzwVtDInCqMRWcf2bUOEAsa4wJqFowQALL9EiAtVRk8QC4OW+1pOM9jIaVASwYagyNXDj+W0NcfuZNzjtXOiL0Zzg30Llj+ptfxQs4+vBPNiL5PawFCBkgXpUaVtqGl+A8dgZHL34BcBUQrwPptToW+o37Ku+UH9eYByJIx3YkAeFnMFuGO7S5gEp7YhXxa5OOAM39RXDPXb0qmpROsswZe+twXdU55oUIZAiEv3bD1UFwIYKkmGqytPCDCwKFQCKK0yL7qtSAPX54UAbtsLuBHkb9zyLmPQSNjsSgmQwKUOIfEY8F8t4B34DvndJY9BA8tNBJq1Nev9axmaStFcQLhgYoCTo0salkIaW8OUDdWjMTR2sHPhrAFZqx6cqcKE4pl2BJJ4K6hfwvqNgAnXfKX/HU6X3Zrhnu0k7tLNZtTBRv1hkwTDBY1NzFU6doDYjJbWdQkQhWwuU7/LvhTh3SDoco4ECL4i5dwURbc8NdDZz2IwKicE8d0KIqWetLE3+lL4hvUuGSeRfVWNLfj/gpOw4smBJBkKQHCzlHGwvAj4woB1gq5NGGLSXtORBPnUQPV5/MPVkDMxbpwG7w4x0xL6Ltxka0A/4NBvV09UVk4DoSn/jl2+JQS9q9KYawisAD4CfhsZ4TH3htylsdEHARIQBusqCKyUpymycgbbkkXEXjT3z7/oKQFTFVuZD2FMJHZIDsO5x2d4aAr2jR+GLwZhtAb028/0yJ9J8dE87jQyKObcjtTXT8dH+fDuKF4/eiPwzH44wTf/yUi6wrpRIOZ9lM1EtXAifFI+CJn9+iX/t2xMQwOMth/UZbASi8btAwR9FHWSpJr75g9Oqbin3VDg+SpwlP6k6TB4ex/7JvmcJx8jydy6XPk8eFTKhyfwCgX71MSvaBHgAAAABJRU5ErkJggg==)}
|
|
@ -0,0 +1,3 @@
|
|||
/** Clockwork Debugger JS **/
|
||||
document.addEventListener("DOMContentLoaded",function () {
|
||||
var e=document.createElement("div");e.appendChild(document.createElement("i")),e.className="clockwork-badge",document.body.appendChild(e)});
|
|
@ -0,0 +1,67 @@
|
|||
div.phpdebugbar {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.phpdebugbar pre {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.phpdebugbar div.phpdebugbar-header > div > * {
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.phpdebugbar div.phpdebugbar-header > div.phpdebugbar-header-right > * {
|
||||
padding: 5px 8px;
|
||||
}
|
||||
|
||||
.phpdebugbar a.phpdebugbar-restore-btn {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA/1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeHh4AAAD///8EBAT7+/sLCwv29vYVFRUvLy/t7e3m5ubCwsKxsbE/Pz+mpqZMTEwcHBzy8vLp6emfn5+AgIA2Njbi4uLf39+rq6tzc3NWVlYhISHa2trW1tbS0tLMzMy7u7uZmZmUlJSMjIxvb29kZGRHR0c7Ozt5eXkqKiq1tbWQkJBqampbW1tSUlLHx8eHh4ckJCRDQ0M3wD42AAAAI3RSTlMA/PibTbQ0x76TVAlw4LhZLOuEYCAN9Hjx0a2ppGZEGYw97djhXHwAAATZSURBVFjDlVcHW+MwDO1eFCjj2McNOzvdpXTTXVbL/P+/5SQ7QSSX5Di1X1onfi/Sk+Q4sTDbKqWK+YuznZ2zi3wxVdqK/Zf92M1nT9gnO8rmd398GX6Z3xaoOFoiAQcx3E5efgmeSuN8F6Xg1x3G06l/wjNpMR1B0uif4EhnIuFb+0diIoFXk3IVfokisR+h52GO4JKgyjmfaMhAFNlSaPR7DpwI+lzn/E4QKIqmKIJirxCMP4izBPPZPXhgXwMBYgULw0nfg/BF5scDbslb7QeJ08yqqTEmGYoB95d4H8ETL8+n9wBqrLu6ao3bBsMwAnxISf/9BHcqxNB8Y7cWl3Zz7TAUfPrvAT6AoNEFFXvsjutL01yOuMrtBxnFXsmT/1wQHmdWAFNnI3uI48Yj0FUcHbKf62GfUfr8eeQt7Uk3mQZpZNoVRPEui5vtEz5zFEpgWnyqVBZMc6oaGNriH2hGVZ0OxEvInPeMaZWJBA7vmPbCr5jjws5HBnAUxvDMH40aCIf4G5BjRQSs8E8HFFYf8bGxgDvD55bzGhwWkoBcuIyHR/AMdaCagxXDhtL6tSqoWpd4BMnlIR+Or+rYTK/a3EAGcc6e4AWHISnWv20iCCojsHoVlQdjrMexFF2C7UMg2A2WEGWbQhXN6l3eXC6XGp4b9qxbuEB2EBGBwtocrK90cVG5mbRXm6vmx/0phq1sIAGKDgLOBiN1MrO5a9aDl+D0W6x0Ar9BCTRuIIANa90Y7LrLVRXzwVtDInCqMRWcf2bUOEAsa4wJqFowQALL9EiAtVRk8QC4OW+1pOM9jIaVASwYagyNXDj+W0NcfuZNzjtXOiL0Zzg30Llj+ptfxQs4+vBPNiL5PawFCBkgXpUaVtqGl+A8dgZHL34BcBUQrwPptToW+o37Ku+UH9eYByJIx3YkAeFnMFuGO7S5gEp7YhXxa5OOAM39RXDPXb0qmpROsswZe+twXdU55oUIZAiEv3bD1UFwIYKkmGqytPCDCwKFQCKK0yL7qtSAPX54UAbtsLuBHkb9zyLmPQSNjsSgmQwKUOIfEY8F8t4B34DvndJY9BA8tNBJq1Nev9axmaStFcQLhgYoCTo0salkIaW8OUDdWjMTR2sHPhrAFZqx6cqcKE4pl2BJJ4K6hfwvqNgAnXfKX/HU6X3Zrhnu0k7tLNZtTBRv1hkwTDBY1NzFU6doDYjJbWdQkQhWwuU7/LvhTh3SDoco4ECL4i5dwURbc8NdDZz2IwKicE8d0KIqWetLE3+lL4hvUuGSeRfVWNLfj/gpOw4smBJBkKQHCzlHGwvAj4woB1gq5NGGLSXtORBPnUQPV5/MPVkDMxbpwG7w4x0xL6Ltxka0A/4NBvV09UVk4DoSn/jl2+JQS9q9KYawisAD4CfhsZ4TH3htylsdEHARIQBusqCKyUpymycgbbkkXEXjT3z7/oKQFTFVuZD2FMJHZIDsO5x2d4aAr2jR+GLwZhtAb028/0yJ9J8dE87jQyKObcjtTXT8dH+fDuKF4/eiPwzH44wTf/yUi6wrpRIOZ9lM1EtXAifFI+CJn9+iX/t2xMQwOMth/UZbASi8btAwR9FHWSpJr75g9Oqbin3VDg+SpwlP6k6TB4ex/7JvmcJx8jydy6XPk8eFTKhyfwCgX71MSvaBHgAAAABJRU5ErkJggg==);
|
||||
width: 13px;
|
||||
}
|
||||
|
||||
.phpdebugbar a.phpdebugbar-tab.phpdebugbar-active {
|
||||
background: #3DB9EC;
|
||||
color: #fff;
|
||||
margin-top: -1px;
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.phpdebugbar .phpdebugbar-widgets-toolbar {
|
||||
border-top: 1px solid #ddd;
|
||||
padding-left: 5px;
|
||||
padding-right: 2px;
|
||||
padding-top: 2px;
|
||||
background-color: #fafafa !important;
|
||||
width: auto !important;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.phpdebugbar .phpdebugbar-widgets-toolbar input {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.phpdebugbar .phpdebugbar-widgets-toolbar .phpdebugbar-widgets-filter {
|
||||
|
||||
}
|
||||
|
||||
|
||||
.phpdebugbar input[type=text] {
|
||||
padding: 0;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.phpdebugbar dl.phpdebugbar-widgets-varlist, ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-label {
|
||||
font-family: "DejaVu Sans Mono", Menlo, Monaco, Consolas, Courier, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-label {
|
||||
text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.phpdebugbar pre, .phpdebugbar code {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 5.1 KiB |
|
@ -0,0 +1,19 @@
|
|||
body header {
|
||||
background: #3085EE;
|
||||
}
|
||||
|
||||
body .left-panel {
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
body .exc-title-primary {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
body .exc-title {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
body .frame:not(.active):hover {
|
||||
background: #e6e6e6;
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
title: PLUGIN_ADMIN.BACKUPS
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
|
||||
fields:
|
||||
history_title:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.BACKUPS_HISTORY
|
||||
underline: true
|
||||
|
||||
history:
|
||||
type: backupshistory
|
||||
|
||||
config_title:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.BACKUPS_PURGE_CONFIG
|
||||
underline: true
|
||||
|
||||
purge.trigger:
|
||||
type: select
|
||||
label: PLUGIN_ADMIN.BACKUPS_STORAGE_PURGE_TRIGGER
|
||||
size: medium
|
||||
default: space
|
||||
options:
|
||||
space: Maximum Backup Space
|
||||
number: Maximum Number of Backups
|
||||
time: maximum Retention Time
|
||||
validate:
|
||||
required: true
|
||||
|
||||
purge.max_backups_count:
|
||||
type: number
|
||||
label: PLUGIN_ADMIN.BACKUPS_MAX_COUNT
|
||||
default: 25
|
||||
size: x-small
|
||||
help: PLUGIN_ADMIN.BACKUPS_MAX_COUNT
|
||||
validate:
|
||||
min: 0
|
||||
type: number
|
||||
required: true
|
||||
message: Must be a number 0 or greater
|
||||
|
||||
purge.max_backups_space:
|
||||
type: number
|
||||
label: PLUGIN_ADMIN.BACKUPS_MAX_SPACE
|
||||
append: in GB
|
||||
size: x-small
|
||||
default: 5
|
||||
validate:
|
||||
min: 1
|
||||
type: number
|
||||
required: true
|
||||
message: Space must be 1GB or greater
|
||||
|
||||
purge.max_backups_time:
|
||||
type: number
|
||||
label: PLUGIN_ADMIN.BACKUPS_MAX_RETENTION_TIME
|
||||
append: PLUGIN_ADMIN.BACKUPS_MAX_RETENTION_TIME_APPEND
|
||||
size: x-small
|
||||
default: 365
|
||||
validate:
|
||||
min: 7
|
||||
type: number
|
||||
required: true
|
||||
message: Rentenion days must be 7 or greater
|
||||
|
||||
profiles_title:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.BACKUPS_PROFILES
|
||||
underline: true
|
||||
|
||||
profiles:
|
||||
type: list
|
||||
style: vertical
|
||||
label:
|
||||
classes: backups-list compact
|
||||
sort: false
|
||||
|
||||
fields:
|
||||
.name:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.NAME
|
||||
placeholder: PLUGIN_ADMIN.BACKUPS_PROFILE_NAME
|
||||
validate:
|
||||
max: 20
|
||||
message: 'Name must be less than 20 characters'
|
||||
required: true
|
||||
.root:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.BACKUPS_PROFILE_ROOT_FOLDER
|
||||
help: PLUGIN_ADMIN.BACKUPS_PROFILE_ROOT_FOLDER_HELP
|
||||
placeholder: '/'
|
||||
default: '/'
|
||||
validate:
|
||||
required: true
|
||||
.exclude_paths:
|
||||
type: textarea
|
||||
label: PLUGIN_ADMIN.BACKUPS_PROFILE_EXCLUDE_PATHS
|
||||
rows: 5
|
||||
placeholder: "/backup\r/cache\r/images\r/logs\r/tmp"
|
||||
help: PLUGIN_ADMIN.BACKUPS_PROFILE_EXCLUDE_PATHS_HELP
|
||||
.exclude_files:
|
||||
type: textarea
|
||||
label: PLUGIN_ADMIN.BACKUPS_PROFILE_EXCLUDE_FILES
|
||||
rows: 5
|
||||
placeholder: ".DS_Store\r.git\r.svn\r.hg\r.idea\r.vscode\rnode_modules"
|
||||
help: PLUGIN_ADMIN.BACKUPS_PROFILE_EXCLUDE_FILES_HELP
|
||||
.schedule:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.BACKUPS_PROFILE_SCHEDULE
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
.schedule_at:
|
||||
type: cron
|
||||
label: PLUGIN_ADMIN.BACKUPS_PROFILE_SCHEDULE_AT
|
||||
default: '* 3 * * *'
|
||||
validate:
|
||||
required: true
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
title: PLUGIN_ADMIN.MEDIA
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
fields:
|
|
@ -0,0 +1,78 @@
|
|||
title: PLUGIN_ADMIN.SCHEDULER
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
|
||||
fields:
|
||||
|
||||
status_title:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.SCHEDULER_STATUS
|
||||
underline: true
|
||||
|
||||
status:
|
||||
type: cronstatus
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
jobs_title:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.SCHEDULER_JOBS
|
||||
underline: true
|
||||
|
||||
custom_jobs:
|
||||
type: list
|
||||
style: vertical
|
||||
label:
|
||||
classes: cron-job-list compact
|
||||
key: id
|
||||
fields:
|
||||
.id:
|
||||
type: key
|
||||
label: ID
|
||||
placeholder: 'process-name'
|
||||
validate:
|
||||
required: true
|
||||
pattern: '[a-zа-я0-9_\-]+'
|
||||
max: 20
|
||||
message: 'ID must be lowercase with dashes/underscores only and less than 20 characters'
|
||||
.command:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.COMMAND
|
||||
placeholder: 'ls'
|
||||
validate:
|
||||
required: true
|
||||
.args:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.EXTRA_ARGUMENTS
|
||||
placeholder: '-lah'
|
||||
.at:
|
||||
type: text
|
||||
wrapper_classes: cron-selector
|
||||
label: PLUGIN_ADMIN.SCHEDULER_RUNAT
|
||||
help: PLUGIN_ADMIN.SCHEDULER_RUNAT_HELP
|
||||
placeholder: '* * * * *'
|
||||
validate:
|
||||
required: true
|
||||
.output:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.SCHEDULER_OUTPUT
|
||||
help: PLUGIN_ADMIN.SCHEDULER_OUTPUT_HELP
|
||||
placeholder: 'logs/ls-cron.out'
|
||||
.output_mode:
|
||||
type: select
|
||||
label: PLUGIN_ADMIN.SCHEDULER_OUTPUT_TYPE
|
||||
help: PLUGIN_ADMIN.SCHEDULER_OUTPUT_TYPE_HELP
|
||||
default: append
|
||||
options:
|
||||
append: Append
|
||||
overwrite: Overwrite
|
||||
.email:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.SCHEDULER_EMAIL
|
||||
help: PLUGIN_ADMIN.SCHEDULER_EMAIL_HELP
|
||||
placeholder: 'notifications@yoursite.com'
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
title: PLUGIN_ADMIN.SECURITY
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
fields:
|
||||
|
||||
xss_section:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.XSS_SECURITY
|
||||
underline: true
|
||||
|
||||
xss_whitelist:
|
||||
type: selectize
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.XSS_WHITELIST_PERMISSIONS
|
||||
help: PLUGIN_ADMIN.XSS_WHITELIST_PERMISSIONS_HELP
|
||||
placeholder: 'admin.super'
|
||||
classes: fancy
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
xss_enabled.on_events:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.XSS_ON_EVENTS
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
default: true
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
xss_enabled.invalid_protocols:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.XSS_INVALID_PROTOCOLS
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
default: true
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
xss_invalid_protocols:
|
||||
type: selectize
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.XSS_INVALID_PROTOCOLS_LIST
|
||||
classes: fancy
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
xss_enabled.moz_binding:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.XSS_MOZ_BINDINGS
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
default: true
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
xss_enabled.html_inline_styles:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.XSS_HTML_INLINE_STYLES
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
default: true
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
xss_enabled.dangerous_tags:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.XSS_DANGEROUS_TAGS
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
default: true
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
xss_dangerous_tags:
|
||||
type: selectize
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.XSS_DANGEROUS_TAGS_LIST
|
||||
classes: fancy
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
uploads_section:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.UPLOADS_SECURITY
|
||||
underline: true
|
||||
|
||||
|
||||
uploads_dangerous_extensions:
|
||||
type: selectize
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.UPLOADS_DANGEROUS_EXTENSIONS
|
||||
help: PLUGIN_ADMIN.UPLOADS_DANGEROUS_EXTENSIONS_HELP
|
||||
classes: fancy
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
|
||||
sanitize_svg:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.SANITIZE_SVG
|
||||
help: PLUGIN_ADMIN.SANITIZE_SVG_HELP
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
default: true
|
||||
validate:
|
||||
type: bool
|
|
@ -0,0 +1,124 @@
|
|||
title: PLUGIN_ADMIN.SITE
|
||||
form:
|
||||
validation: loose
|
||||
fields:
|
||||
|
||||
content:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.DEFAULTS
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
title:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.SITE_TITLE
|
||||
size: large
|
||||
placeholder: PLUGIN_ADMIN.SITE_TITLE_PLACEHOLDER
|
||||
help: PLUGIN_ADMIN.SITE_TITLE_HELP
|
||||
|
||||
default_lang:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.SITE_DEFAULT_LANG
|
||||
size: x-small
|
||||
placeholder: PLUGIN_ADMIN.SITE_DEFAULT_LANG_PLACEHOLDER
|
||||
help: PLUGIN_ADMIN.SITE_DEFAULT_LANG_HELP
|
||||
|
||||
author.name:
|
||||
type: text
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.DEFAULT_AUTHOR
|
||||
help: PLUGIN_ADMIN.DEFAULT_AUTHOR_HELP
|
||||
|
||||
author.email:
|
||||
type: text
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.DEFAULT_EMAIL
|
||||
help: PLUGIN_ADMIN.DEFAULT_EMAIL_HELP
|
||||
validate:
|
||||
type: email
|
||||
|
||||
taxonomies:
|
||||
type: selectize
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.TAXONOMY_TYPES
|
||||
classes: fancy
|
||||
help: PLUGIN_ADMIN.TAXONOMY_TYPES_HELP
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
summary:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.PAGE_SUMMARY
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
summary.enabled:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.ENABLED
|
||||
highlight: 1
|
||||
help: PLUGIN_ADMIN.ENABLED_HELP
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
summary.size:
|
||||
type: text
|
||||
size: small
|
||||
append: PLUGIN_ADMIN.CHARACTERS
|
||||
label: PLUGIN_ADMIN.SUMMARY_SIZE
|
||||
help: PLUGIN_ADMIN.SUMMARY_SIZE_HELP
|
||||
validate:
|
||||
type: int
|
||||
min: 0
|
||||
max: 65536
|
||||
|
||||
summary.format:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.FORMAT
|
||||
classes: fancy
|
||||
help: PLUGIN_ADMIN.FORMAT_HELP
|
||||
highlight: short
|
||||
options:
|
||||
'short': PLUGIN_ADMIN.SHORT
|
||||
'long': PLUGIN_ADMIN.LONG
|
||||
|
||||
summary.delimiter:
|
||||
type: text
|
||||
size: x-small
|
||||
label: PLUGIN_ADMIN.DELIMITER
|
||||
help: PLUGIN_ADMIN.DELIMITER_HELP
|
||||
|
||||
metadata:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.METADATA
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
metadata:
|
||||
type: array
|
||||
label: PLUGIN_ADMIN.METADATA
|
||||
help: PLUGIN_ADMIN.METADATA_HELP
|
||||
placeholder_key: PLUGIN_ADMIN.METADATA_KEY
|
||||
placeholder_value: PLUGIN_ADMIN.METADATA_VALUE
|
||||
|
||||
routes:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.REDIRECTS_AND_ROUTES
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
redirects:
|
||||
type: array
|
||||
label: PLUGIN_ADMIN.CUSTOM_REDIRECTS
|
||||
help: PLUGIN_ADMIN.CUSTOM_REDIRECTS_HELP
|
||||
placeholder_key: PLUGIN_ADMIN.CUSTOM_REDIRECTS_PLACEHOLDER_KEY
|
||||
placeholder_value: PLUGIN_ADMIN.CUSTOM_REDIRECTS_PLACEHOLDER_VALUE
|
||||
|
||||
routes:
|
||||
type: array
|
||||
label: PLUGIN_ADMIN.CUSTOM_ROUTES
|
||||
help: PLUGIN_ADMIN.CUSTOM_ROUTES_HELP
|
||||
placeholder_key: PLUGIN_ADMIN.CUSTOM_ROUTES_PLACEHOLDER_KEY
|
||||
placeholder_value: PLUGIN_ADMIN.CUSTOM_ROUTES_PLACEHOLDER_VALUE
|
|
@ -0,0 +1,8 @@
|
|||
title: PLUGIN_ADMIN.FILE_STREAMS
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
hidden: true
|
||||
fields:
|
||||
schemes.xxx:
|
||||
type: array
|
|
@ -0,0 +1,8 @@
|
|||
title: Flex User Accounts
|
||||
description: Manage your User Accounts in Flex.
|
||||
type: flex-objects
|
||||
|
||||
# Deprecated in Grav 1.7.0-rc.4: file was renamed to user-accounts.yaml
|
||||
extends@:
|
||||
type: user-accounts
|
||||
context: blueprints://flex
|
|
@ -0,0 +1,17 @@
|
|||
form:
|
||||
compatibility:
|
||||
type: tab
|
||||
title: Compatibility
|
||||
fields:
|
||||
object.compat.events:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: Admin event compatibility
|
||||
help: Enables onAdminSave and onAdminAfterSave events for plugins
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
|
@ -0,0 +1,212 @@
|
|||
title: Pages
|
||||
description: Manage your Grav Pages in Flex.
|
||||
type: flex-objects
|
||||
|
||||
# Extends a page (blueprint gets overridden inside the object)
|
||||
extends@:
|
||||
type: default
|
||||
context: blueprints://pages
|
||||
|
||||
#
|
||||
# HIGHLY SPECIALIZED FLEX TYPE, AVOID USING PAGES AS BASE FOR YOUR OWN TYPE.
|
||||
#
|
||||
|
||||
# Flex configuration
|
||||
config:
|
||||
# Administration Configuration (needs Flex Objects plugin)
|
||||
admin:
|
||||
# Admin router
|
||||
router:
|
||||
path: '/pages'
|
||||
|
||||
# Permissions
|
||||
permissions:
|
||||
# Primary permissions
|
||||
admin.pages:
|
||||
type: crudl
|
||||
label: Pages
|
||||
admin.configuration.pages:
|
||||
type: default
|
||||
label: Pages Configuration
|
||||
|
||||
# Admin menu
|
||||
menu:
|
||||
list:
|
||||
route: '/pages'
|
||||
title: PLUGIN_ADMIN.PAGES
|
||||
icon: fa-file-text
|
||||
authorize: ['admin.pages.list', 'admin.super']
|
||||
priority: 5
|
||||
|
||||
# Admin template type (folder)
|
||||
template: pages
|
||||
|
||||
# Allowed admin actions
|
||||
actions:
|
||||
list: true
|
||||
create: true
|
||||
read: true
|
||||
update: true
|
||||
delete: true
|
||||
|
||||
# List view
|
||||
list:
|
||||
# Fields shown in the list view
|
||||
fields:
|
||||
published:
|
||||
width: 8
|
||||
alias: header.published
|
||||
visible:
|
||||
width: 8
|
||||
field:
|
||||
label: Visible
|
||||
type: toggle
|
||||
menu:
|
||||
link: edit
|
||||
alias: header.menu
|
||||
full_route:
|
||||
field:
|
||||
label: Route
|
||||
type: text
|
||||
link: edit
|
||||
sort:
|
||||
field: key
|
||||
name:
|
||||
width: 8
|
||||
field:
|
||||
label: Type
|
||||
type: text
|
||||
translations:
|
||||
width: 8
|
||||
field:
|
||||
label: Translations
|
||||
type: text
|
||||
# updated_date:
|
||||
# alias: header.update_date
|
||||
|
||||
# Extra options
|
||||
options:
|
||||
# Default number of records for pagination
|
||||
per_page: 20
|
||||
# Default ordering
|
||||
order:
|
||||
by: key
|
||||
dir: asc
|
||||
|
||||
# TODO: not used yet
|
||||
buttons:
|
||||
back:
|
||||
icon: reply
|
||||
title: PLUGIN_ADMIN.BACK
|
||||
add:
|
||||
icon: plus
|
||||
label: PLUGIN_ADMIN.ADD
|
||||
|
||||
edit:
|
||||
title:
|
||||
template: "{% if object.root %}Root <small>( <root> )</small>{% else %}{{ (form.value('header.title') ?? form.value('folder'))|e }} <small>( {{ (object.getRoute().toString(false) ?: '/')|e }} )</small>{% endif %}"
|
||||
|
||||
# TODO: not used yet
|
||||
buttons:
|
||||
back:
|
||||
icon: reply
|
||||
title: PLUGIN_ADMIN.BACK
|
||||
preview:
|
||||
icon: eye
|
||||
title: PLUGIN_ADMIN.PREVIEW
|
||||
add:
|
||||
icon: plus
|
||||
label: PLUGIN_ADMIN.ADD
|
||||
copy:
|
||||
icon: copy
|
||||
label: PLUGIN_ADMIN.COPY
|
||||
move:
|
||||
icon: arrows
|
||||
label: PLUGIN_ADMIN.MOVE
|
||||
delete:
|
||||
icon: close
|
||||
label: PLUGIN_ADMIN.DELETE
|
||||
save:
|
||||
icon: check
|
||||
label: PLUGIN_ADMIN.SAVE
|
||||
|
||||
# Preview View
|
||||
preview:
|
||||
enabled: true
|
||||
|
||||
# Configure view
|
||||
configure:
|
||||
authorize: 'admin.configuration.pages'
|
||||
|
||||
# Site Configuration
|
||||
site:
|
||||
# Hide from flex types
|
||||
hidden: true
|
||||
templates:
|
||||
collection:
|
||||
# Lookup for the template layout files for collections of objects
|
||||
paths:
|
||||
- 'flex/{TYPE}/collection/{LAYOUT}{EXT}'
|
||||
object:
|
||||
# Lookup for the template layout files for objects
|
||||
paths:
|
||||
- 'flex/{TYPE}/object/{LAYOUT}{EXT}'
|
||||
defaults:
|
||||
# Default template {TYPE}; overridden by filename of this blueprint if template folder exists
|
||||
type: pages
|
||||
# Default template {LAYOUT}; can be overridden in render calls (usually Twig in templates)
|
||||
layout: default
|
||||
|
||||
# Default filters for frontend.
|
||||
filter:
|
||||
- withPublished
|
||||
|
||||
# Data Configuration
|
||||
data:
|
||||
object: 'Grav\Common\Flex\Types\Pages\PageObject'
|
||||
collection: 'Grav\Common\Flex\Types\Pages\PageCollection'
|
||||
index: 'Grav\Common\Flex\Types\Pages\PageIndex'
|
||||
storage:
|
||||
class: 'Grav\Common\Flex\Types\Pages\Storage\PageStorage'
|
||||
options:
|
||||
formatter:
|
||||
class: 'Grav\Framework\File\Formatter\MarkdownFormatter'
|
||||
folder: 'page://'
|
||||
# Keep index file in filesystem to speed up lookups
|
||||
indexed: true
|
||||
# Set default ordering of the pages
|
||||
ordering:
|
||||
storage_key: ASC
|
||||
search:
|
||||
# Search options
|
||||
options:
|
||||
contains: 1
|
||||
# Fields to be searched
|
||||
fields:
|
||||
- key
|
||||
- slug
|
||||
- menu
|
||||
- title
|
||||
|
||||
blueprints:
|
||||
configure:
|
||||
fields:
|
||||
import@:
|
||||
type: configure/compat
|
||||
context: blueprints://flex
|
||||
|
||||
# Regular form definition
|
||||
form:
|
||||
fields:
|
||||
lang:
|
||||
type: hidden
|
||||
value: ''
|
||||
|
||||
tabs:
|
||||
fields:
|
||||
security:
|
||||
type: tab
|
||||
title: PLUGIN_ADMIN.SECURITY
|
||||
import@:
|
||||
type: partials/security
|
||||
context: blueprints://pages
|
|
@ -0,0 +1,70 @@
|
|||
form:
|
||||
validation: loose
|
||||
|
||||
fields:
|
||||
tabs:
|
||||
type: tabs
|
||||
fields:
|
||||
cache:
|
||||
type: tab
|
||||
title: Caching
|
||||
fields:
|
||||
object.cache.index.enabled:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.FLEX_INDEX_CACHE_ENABLED
|
||||
highlight: 1
|
||||
config-default@: system.flex.cache.index.enabled
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
object.cache.index.lifetime:
|
||||
type: text
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.FLEX_INDEX_CACHE_LIFETIME
|
||||
config-default@: system.flex.cache.index.lifetime
|
||||
validate:
|
||||
type: int
|
||||
|
||||
object.cache.object.enabled:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.FLEX_OBJECT_CACHE_ENABLED
|
||||
highlight: 1
|
||||
config-default@: system.flex.cache.object.enabled
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
object.cache.object.lifetime:
|
||||
type: text
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.FLEX_OBJECT_CACHE_LIFETIME
|
||||
config-default@: system.flex.cache.object.lifetime
|
||||
validate:
|
||||
type: int
|
||||
|
||||
object.cache.render.enabled:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.FLEX_RENDER_CACHE_ENABLED
|
||||
highlight: 1
|
||||
config-default@: system.flex.cache.render.enabled
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
object.cache.render.lifetime:
|
||||
type: text
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.FLEX_RENDER_CACHE_LIFETIME
|
||||
config-default@: system.flex.cache.render.lifetime
|
||||
validate:
|
||||
type: int
|
|
@ -0,0 +1,155 @@
|
|||
title: User Accounts
|
||||
description: Manage your User Accounts in Flex.
|
||||
type: flex-objects
|
||||
|
||||
# Extends user account
|
||||
extends@:
|
||||
type: account
|
||||
context: blueprints://user
|
||||
|
||||
#
|
||||
# HIGHLY SPECIALIZED FLEX TYPE, AVOID USING USER ACCOUNTS AS BASE FOR YOUR OWN TYPE.
|
||||
#
|
||||
|
||||
# Flex configuration
|
||||
config:
|
||||
# Administration Configuration (needs Flex Objects plugin)
|
||||
admin:
|
||||
# Admin router
|
||||
router:
|
||||
path: '/accounts/users'
|
||||
actions:
|
||||
configure:
|
||||
path: '/accounts/configure'
|
||||
redirects:
|
||||
'/user': '/accounts/users'
|
||||
'/accounts': '/accounts/users'
|
||||
|
||||
# Permissions
|
||||
permissions:
|
||||
# Primary permissions
|
||||
admin.users:
|
||||
type: crudl
|
||||
label: User Accounts
|
||||
admin.configuration.users:
|
||||
type: default
|
||||
label: Accounts Configuration
|
||||
|
||||
# Admin menu
|
||||
menu:
|
||||
base:
|
||||
location: '/accounts'
|
||||
route: '/accounts/users'
|
||||
index: 0
|
||||
title: PLUGIN_ADMIN.ACCOUNTS
|
||||
icon: fa-users
|
||||
authorize: ['admin.users.list', 'admin.super']
|
||||
priority: 6
|
||||
|
||||
# Admin template type (folder)
|
||||
template: user-accounts
|
||||
|
||||
# List view
|
||||
list:
|
||||
# Fields shown in the list view
|
||||
fields:
|
||||
username:
|
||||
link: edit
|
||||
search: true
|
||||
field:
|
||||
label: PLUGIN_ADMIN.USERNAME
|
||||
email:
|
||||
search: true
|
||||
fullname:
|
||||
search: true
|
||||
# Extra options
|
||||
options:
|
||||
per_page: 20
|
||||
order:
|
||||
by: username
|
||||
dir: asc
|
||||
|
||||
# Edit view
|
||||
edit:
|
||||
title:
|
||||
template: "{{ form.value('fullname') ?? form.value('username') }} <{{ form.value('email') }}>"
|
||||
|
||||
# Configure view
|
||||
configure:
|
||||
hidden: true
|
||||
authorize: 'admin.configuration.users'
|
||||
form: 'accounts'
|
||||
title:
|
||||
template: "{{ 'PLUGIN_ADMIN.ACCOUNTS'|tu }} {{ 'PLUGIN_ADMIN.CONFIGURATION'|tu }}"
|
||||
|
||||
# Site Configuration
|
||||
site:
|
||||
# Hide from flex types
|
||||
hidden: true
|
||||
templates:
|
||||
collection:
|
||||
# Lookup for the template layout files for collections of objects
|
||||
paths:
|
||||
- 'flex/{TYPE}/collection/{LAYOUT}{EXT}'
|
||||
object:
|
||||
# Lookup for the template layout files for objects
|
||||
paths:
|
||||
- 'flex/{TYPE}/object/{LAYOUT}{EXT}'
|
||||
defaults:
|
||||
# Default template {TYPE}; overridden by filename of this blueprint if template folder exists
|
||||
type: user-accounts
|
||||
# Default template {LAYOUT}; can be overridden in render calls (usually Twig in templates)
|
||||
layout: default
|
||||
|
||||
# Data Configuration
|
||||
data:
|
||||
object: 'Grav\Common\Flex\Types\Users\UserObject'
|
||||
collection: 'Grav\Common\Flex\Types\Users\UserCollection'
|
||||
index: 'Grav\Common\Flex\Types\Users\UserIndex'
|
||||
storage:
|
||||
class: 'Grav\Common\Flex\Types\Users\Storage\UserFileStorage'
|
||||
options:
|
||||
formatter:
|
||||
class: 'Grav\Framework\File\Formatter\YamlFormatter'
|
||||
folder: 'account://'
|
||||
pattern: '{FOLDER}/{KEY}{EXT}'
|
||||
indexed: true
|
||||
key: username
|
||||
case_sensitive: false
|
||||
search:
|
||||
options:
|
||||
contains: 1
|
||||
fields:
|
||||
- key
|
||||
- email
|
||||
- username
|
||||
- fullname
|
||||
|
||||
relationships:
|
||||
media:
|
||||
type: media
|
||||
cardinality: to-many
|
||||
avatar:
|
||||
type: media
|
||||
cardinality: to-one
|
||||
# roles:
|
||||
# type: user-groups
|
||||
# cardinality: to-many
|
||||
|
||||
blueprints:
|
||||
configure:
|
||||
fields:
|
||||
import@:
|
||||
type: configure/compat
|
||||
context: blueprints://flex
|
||||
|
||||
# Regular form definition
|
||||
form:
|
||||
fields:
|
||||
username:
|
||||
flex-disabled@: exists
|
||||
disabled: false
|
||||
flex-readonly@: exists
|
||||
readonly: false
|
||||
validate:
|
||||
required: true
|
|
@ -0,0 +1,124 @@
|
|||
title: User Groups
|
||||
description: Manage your User Groups in Flex.
|
||||
type: flex-objects
|
||||
|
||||
# Extends user group
|
||||
extends@:
|
||||
type: group
|
||||
context: blueprints://user
|
||||
|
||||
# Flex configuration
|
||||
config:
|
||||
# Administration Configuration (needs Flex Objects plugin)
|
||||
admin:
|
||||
# Admin router
|
||||
router:
|
||||
path: '/accounts/groups'
|
||||
actions:
|
||||
configure:
|
||||
path: '/accounts/configure'
|
||||
redirects:
|
||||
'/groups': '/accounts/groups'
|
||||
'/accounts': '/accounts/groups'
|
||||
|
||||
# Permissions
|
||||
permissions:
|
||||
# Primary permissions
|
||||
admin.users:
|
||||
type: crudl
|
||||
label: User Accounts
|
||||
admin.configuration.users:
|
||||
type: default
|
||||
label: Accounts Configuration
|
||||
|
||||
# Admin menu
|
||||
menu:
|
||||
base:
|
||||
location: '/accounts'
|
||||
route: '/accounts/groups'
|
||||
index: 1
|
||||
title: PLUGIN_ADMIN.ACCOUNTS
|
||||
icon: fa-users
|
||||
authorize: ['admin.users.list', 'admin.super']
|
||||
priority: 6
|
||||
|
||||
# Admin template type (folder)
|
||||
template: user-groups
|
||||
|
||||
# List view
|
||||
list:
|
||||
# Fields shown in the list view
|
||||
fields:
|
||||
groupname:
|
||||
link: edit
|
||||
search: true
|
||||
readableName:
|
||||
search: true
|
||||
description:
|
||||
search: true
|
||||
# Extra options
|
||||
options:
|
||||
per_page: 20
|
||||
order:
|
||||
by: groupname
|
||||
dir: asc
|
||||
|
||||
# Edit view
|
||||
edit:
|
||||
title:
|
||||
template: "{{ form.value('readableName') ?? form.value('groupname') }}"
|
||||
|
||||
# Configure view
|
||||
configure:
|
||||
hidden: true
|
||||
authorize: 'admin.configuration.users'
|
||||
form: 'accounts'
|
||||
title:
|
||||
template: "{{ 'PLUGIN_ADMIN.ACCOUNTS'|tu }} {{ 'PLUGIN_ADMIN.CONFIGURATION'|tu }}"
|
||||
|
||||
# Site Configuration
|
||||
site:
|
||||
# Hide from flex types
|
||||
hidden: true
|
||||
templates:
|
||||
collection:
|
||||
# Lookup for the template layout files for collections of objects
|
||||
paths:
|
||||
- 'flex/{TYPE}/collection/{LAYOUT}{EXT}'
|
||||
object:
|
||||
# Lookup for the template layout files for objects
|
||||
paths:
|
||||
- 'flex/{TYPE}/object/{LAYOUT}{EXT}'
|
||||
defaults:
|
||||
# Default template {TYPE}; overridden by filename of this blueprint if template folder exists
|
||||
type: user-groups
|
||||
# Default template {LAYOUT}; can be overridden in render calls (usually Twig in templates)
|
||||
layout: default
|
||||
|
||||
# Data Configuration
|
||||
data:
|
||||
object: 'Grav\Common\Flex\Types\UserGroups\UserGroupObject'
|
||||
collection: 'Grav\Common\Flex\Types\UserGroups\UserGroupCollection'
|
||||
index: 'Grav\Common\Flex\Types\UserGroups\UserGroupIndex'
|
||||
storage:
|
||||
class: 'Grav\Framework\Flex\Storage\SimpleStorage'
|
||||
options:
|
||||
formatter:
|
||||
class: 'Grav\Framework\File\Formatter\YamlFormatter'
|
||||
folder: 'user://config/groups.yaml'
|
||||
key: groupname
|
||||
search:
|
||||
options:
|
||||
contains: 1
|
||||
fields:
|
||||
- key
|
||||
- groupname
|
||||
- readableName
|
||||
- description
|
||||
|
||||
blueprints:
|
||||
configure:
|
||||
fields:
|
||||
import@:
|
||||
type: configure/compat
|
||||
context: blueprints://flex
|
|
@ -0,0 +1,381 @@
|
|||
title: PLUGIN_ADMIN.DEFAULT
|
||||
|
||||
rules:
|
||||
slug:
|
||||
pattern: '[a-zA-Zа-яA-Я0-9_\-]+'
|
||||
min: 1
|
||||
max: 200
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
|
||||
fields:
|
||||
|
||||
tabs:
|
||||
type: tabs
|
||||
active: 1
|
||||
|
||||
fields:
|
||||
content:
|
||||
type: tab
|
||||
title: PLUGIN_ADMIN.CONTENT
|
||||
|
||||
fields:
|
||||
xss_check:
|
||||
type: xss
|
||||
|
||||
header.title:
|
||||
type: text
|
||||
autofocus: true
|
||||
style: vertical
|
||||
label: PLUGIN_ADMIN.TITLE
|
||||
|
||||
content:
|
||||
type: markdown
|
||||
validate:
|
||||
type: textarea
|
||||
|
||||
header.media_order:
|
||||
type: pagemedia
|
||||
label: PLUGIN_ADMIN.PAGE_MEDIA
|
||||
|
||||
options:
|
||||
type: tab
|
||||
title: PLUGIN_ADMIN.OPTIONS
|
||||
|
||||
fields:
|
||||
|
||||
publishing:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.PUBLISHING
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
header.published:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.PUBLISHED
|
||||
help: PLUGIN_ADMIN.PUBLISHED_HELP
|
||||
highlight: 1
|
||||
size: medium
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.date:
|
||||
type: datetime
|
||||
label: PLUGIN_ADMIN.DATE
|
||||
toggleable: true
|
||||
help: PLUGIN_ADMIN.DATE_HELP
|
||||
|
||||
header.publish_date:
|
||||
type: datetime
|
||||
label: PLUGIN_ADMIN.PUBLISHED_DATE
|
||||
toggleable: true
|
||||
help: PLUGIN_ADMIN.PUBLISHED_DATE_HELP
|
||||
|
||||
header.unpublish_date:
|
||||
type: datetime
|
||||
label: PLUGIN_ADMIN.UNPUBLISHED_DATE
|
||||
toggleable: true
|
||||
help: PLUGIN_ADMIN.UNPUBLISHED_DATE_HELP
|
||||
|
||||
header.metadata:
|
||||
toggleable: true
|
||||
type: array
|
||||
label: PLUGIN_ADMIN.METADATA
|
||||
help: PLUGIN_ADMIN.METADATA_HELP
|
||||
placeholder_key: PLUGIN_ADMIN.METADATA_KEY
|
||||
placeholder_value: PLUGIN_ADMIN.METADATA_VALUE
|
||||
|
||||
taxonomies:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.TAXONOMIES
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
header.taxonomy:
|
||||
type: taxonomy
|
||||
label: PLUGIN_ADMIN.TAXONOMY
|
||||
multiple: true
|
||||
validate:
|
||||
type: array
|
||||
|
||||
advanced:
|
||||
type: tab
|
||||
title: PLUGIN_ADMIN.ADVANCED
|
||||
|
||||
fields:
|
||||
columns:
|
||||
type: columns
|
||||
fields:
|
||||
column1:
|
||||
type: column
|
||||
fields:
|
||||
|
||||
settings:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.SETTINGS
|
||||
underline: true
|
||||
|
||||
folder:
|
||||
type: folder-slug
|
||||
label: PLUGIN_ADMIN.FOLDER_NAME
|
||||
validate:
|
||||
rule: slug
|
||||
|
||||
route:
|
||||
type: parents
|
||||
label: PLUGIN_ADMIN.PARENT
|
||||
classes: fancy
|
||||
|
||||
name:
|
||||
type: select
|
||||
classes: fancy
|
||||
label: PLUGIN_ADMIN.PAGE_FILE
|
||||
help: PLUGIN_ADMIN.PAGE_FILE_HELP
|
||||
default: default
|
||||
data-options@: '\Grav\Common\Page\Pages::pageTypes'
|
||||
|
||||
header.body_classes:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.BODY_CLASSES
|
||||
|
||||
|
||||
column2:
|
||||
type: column
|
||||
|
||||
fields:
|
||||
order_title:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.ORDERING
|
||||
underline: true
|
||||
|
||||
ordering:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.FOLDER_NUMERIC_PREFIX
|
||||
help: PLUGIN_ADMIN.FOLDER_NUMERIC_PREFIX_HELP
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
order:
|
||||
type: order
|
||||
label: PLUGIN_ADMIN.SORTABLE_PAGES
|
||||
sitemap:
|
||||
|
||||
overrides:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.OVERRIDES
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
|
||||
header.dateformat:
|
||||
toggleable: true
|
||||
type: select
|
||||
size: medium
|
||||
selectize:
|
||||
create: true
|
||||
label: PLUGIN_ADMIN.DEFAULT_DATE_FORMAT
|
||||
help: PLUGIN_ADMIN.DEFAULT_DATE_FORMAT_HELP
|
||||
placeholder: PLUGIN_ADMIN.DEFAULT_DATE_FORMAT_PLACEHOLDER
|
||||
data-options@: '\Grav\Common\Utils::dateFormats'
|
||||
validate:
|
||||
type: string
|
||||
|
||||
header.menu:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.MENU
|
||||
toggleable: true
|
||||
help: PLUGIN_ADMIN.MENU_HELP
|
||||
|
||||
header.slug:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.SLUG
|
||||
toggleable: true
|
||||
help: PLUGIN_ADMIN.SLUG_HELP
|
||||
validate:
|
||||
message: PLUGIN_ADMIN.SLUG_VALIDATE_MESSAGE
|
||||
rule: slug
|
||||
|
||||
header.redirect:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.REDIRECT
|
||||
toggleable: true
|
||||
help: PLUGIN_ADMIN.REDIRECT_HELP
|
||||
|
||||
header.process:
|
||||
type: checkboxes
|
||||
label: PLUGIN_ADMIN.PROCESS
|
||||
toggleable: true
|
||||
config-default@: system.pages.process
|
||||
default:
|
||||
markdown: true
|
||||
twig: false
|
||||
options:
|
||||
markdown: Markdown
|
||||
twig: Twig
|
||||
use: keys
|
||||
|
||||
header.twig_first:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.TWIG_FIRST
|
||||
help: PLUGIN_ADMIN.TWIG_FIRST_HELP
|
||||
highlight: 0
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.never_cache_twig:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.NEVER_CACHE_TWIG
|
||||
help: PLUGIN_ADMIN.NEVER_CACHE_TWIG_HELP
|
||||
highlight: 0
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.child_type:
|
||||
type: select
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.DEFAULT_CHILD_TYPE
|
||||
default: default
|
||||
placeholder: PLUGIN_ADMIN.USE_GLOBAL
|
||||
data-options@: '\Grav\Common\Page\Pages::types'
|
||||
|
||||
header.routable:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.ROUTABLE
|
||||
help: PLUGIN_ADMIN.ROUTABLE_HELP
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.cache_enable:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.CACHING
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.visible:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.VISIBLE
|
||||
help: PLUGIN_ADMIN.VISIBLE_HELP
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.debugger:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.DEBUGGER
|
||||
help: PLUGIN_ADMIN.DEBUGGER_HELP
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.template:
|
||||
type: text
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.DISPLAY_TEMPLATE
|
||||
|
||||
header.append_url_extension:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.APPEND_URL_EXT
|
||||
toggleable: true
|
||||
help: PLUGIN_ADMIN.APPEND_URL_EXT_HELP
|
||||
|
||||
routes_only:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.ROUTE_OVERRIDES
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
|
||||
header.redirect_default_route:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.REDIRECT_DEFAULT_ROUTE
|
||||
help: PLUGIN_ADMIN.REDIRECT_DEFAULT_ROUTE_HELP
|
||||
config-highlight@: system.pages.redirect_default_route
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.routes.default:
|
||||
type: text
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.ROUTE_DEFAULT
|
||||
|
||||
header.routes.canonical:
|
||||
type: text
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.ROUTE_CANONICAL
|
||||
|
||||
header.routes.aliases:
|
||||
type: array
|
||||
toggleable: true
|
||||
value_only: true
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.ROUTE_ALIASES
|
||||
|
||||
|
||||
admin_only:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.ADMIN_SPECIFIC_OVERRIDES
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
|
||||
header.admin.children_display_order:
|
||||
type: select
|
||||
label: PLUGIN_ADMIN.ADMIN_CHILDREN_DISPLAY_ORDER
|
||||
help: PLUGIN_ADMIN.ADMIN_CHILDREN_DISPLAY_ORDER_HELP
|
||||
toggleable: true
|
||||
classes: fancy
|
||||
default: 'collection'
|
||||
options:
|
||||
'default': 'Ordered by Folder name (default)'
|
||||
'collection': 'Ordered by Collection definition'
|
||||
|
||||
|
||||
header.order_by:
|
||||
type: hidden
|
||||
|
||||
header.order_manual:
|
||||
type: hidden
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
blueprint:
|
||||
type: blueprint
|
|
@ -0,0 +1,52 @@
|
|||
title: PLUGIN_ADMIN.EXTERNAL
|
||||
extends@:
|
||||
type: default
|
||||
context: blueprints://pages
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
fields:
|
||||
|
||||
tabs:
|
||||
type: tabs
|
||||
active: 1
|
||||
|
||||
fields:
|
||||
|
||||
content:
|
||||
fields:
|
||||
|
||||
header.title:
|
||||
type: text
|
||||
autofocus: true
|
||||
style: horizontal
|
||||
label: PLUGIN_ADMIN.TITLE
|
||||
|
||||
content:
|
||||
unset@: true
|
||||
|
||||
header.media_order:
|
||||
unset@: true
|
||||
|
||||
header.external_url:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.EXTERNAL_URL
|
||||
placeholder: https://getgrav.org
|
||||
validate:
|
||||
required: true
|
||||
|
||||
options:
|
||||
fields:
|
||||
|
||||
publishing:
|
||||
fields:
|
||||
|
||||
header.date:
|
||||
unset@: true
|
||||
|
||||
header.metadata:
|
||||
unset@: true
|
||||
|
||||
taxonomies:
|
||||
unset@: true
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
title: PLUGIN_ADMIN.MODULE
|
||||
extends@: default
|
||||
|
||||
form:
|
||||
fields:
|
||||
tabs:
|
||||
type: tabs
|
||||
active: 1
|
||||
|
||||
fields:
|
||||
content:
|
||||
fields:
|
||||
|
||||
modular_title:
|
||||
type: spacer
|
||||
title: PLUGIN_ADMIN.MODULE_SETUP
|
||||
|
||||
header.content.items:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.ITEMS
|
||||
default: '@self.modular'
|
||||
size: medium
|
||||
|
||||
header.content.order.by:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.ORDER_BY
|
||||
placeholder: date
|
||||
help:
|
||||
size: small
|
||||
|
||||
header.content.order.dir:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.ORDER
|
||||
help: '"desc" or "asc" are valid values'
|
||||
placeholder: desc
|
||||
size: small
|
|
@ -0,0 +1,67 @@
|
|||
form:
|
||||
fields:
|
||||
_site:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.PAGE_ACCESS
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
|
||||
header.login.visibility_requires_access:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.PAGE_VISIBILITY_REQUIRES_ACCESS
|
||||
help: PLUGIN_ADMIN.PAGE_VISIBILITY_REQUIRES_ACCESS_HELP
|
||||
highlight: 0
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
|
||||
header.access:
|
||||
type: acl_picker
|
||||
label: PLUGIN_ADMIN.PAGE_ACCESS
|
||||
help: PLUGIN_ADMIN.PAGE_ACCESS_HELP
|
||||
ignore_empty: true
|
||||
data_type: access
|
||||
validate:
|
||||
type: array
|
||||
value_type: bool
|
||||
|
||||
_admin:
|
||||
security@: {or: [admin.super, admin.configuration.pages]}
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.PAGE PERMISSIONS
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
|
||||
header.permissions.inherit:
|
||||
type: toggle
|
||||
toggleable: true
|
||||
label: PLUGIN_ADMIN.PAGE_INHERIT_PERMISSIONS
|
||||
help: PLUGIN_ADMIN.PAGE_INHERIT_PERMISSIONS_HELP
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.permissions.authors:
|
||||
type: array
|
||||
toggleable: true
|
||||
value_only: true
|
||||
placeholder_value: PLUGIN_ADMIN.USERNAME
|
||||
label: PLUGIN_ADMIN.PAGE_AUTHORS
|
||||
help: PLUGIN_ADMIN.PAGE_AUTHORS_HELP
|
||||
|
||||
header.permissions.groups:
|
||||
ignore@: true
|
||||
type: acl_picker
|
||||
label: PLUGIN_ADMIN.PAGE_GROUPS
|
||||
help: PLUGIN_ADMIN.PAGE_GROUPS_HELP
|
||||
ignore_empty: true
|
||||
data_type: permissions
|
|
@ -0,0 +1,16 @@
|
|||
title: PLUGIN_ADMIN.ROOT
|
||||
|
||||
rules:
|
||||
slug:
|
||||
pattern: '[a-zA-Zа-яA-Я0-9_\-]+'
|
||||
min: 1
|
||||
max: 200
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
|
||||
fields:
|
||||
|
||||
tabs:
|
||||
type: tabs
|
||||
active: 1
|
|
@ -0,0 +1,157 @@
|
|||
title: Account
|
||||
form:
|
||||
validation: loose
|
||||
|
||||
fields:
|
||||
|
||||
info:
|
||||
type: userinfo
|
||||
size: large
|
||||
|
||||
avatar:
|
||||
type: file
|
||||
size: large
|
||||
destination: 'account://avatars'
|
||||
multiple: false
|
||||
random_name: true
|
||||
|
||||
multiavatar_only:
|
||||
type: conditional
|
||||
condition: config.system.accounts.avatar == 'multiavatar'
|
||||
fields:
|
||||
avatar_hash:
|
||||
type: text
|
||||
label: ''
|
||||
placeholder: 'e.g. dceaadcfda491f4e45'
|
||||
description: PLUGIN_ADMIN.AVATAR_HASH
|
||||
size: large
|
||||
|
||||
content:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.ACCOUNT
|
||||
underline: true
|
||||
|
||||
username:
|
||||
type: text
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.USERNAME
|
||||
disabled: true
|
||||
readonly: true
|
||||
|
||||
email:
|
||||
type: email
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.EMAIL
|
||||
validate:
|
||||
type: email
|
||||
message: PLUGIN_ADMIN.EMAIL_VALIDATION_MESSAGE
|
||||
required: true
|
||||
|
||||
password:
|
||||
type: password
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.PASSWORD
|
||||
autocomplete: new-password
|
||||
validate:
|
||||
required: false
|
||||
message: PLUGIN_ADMIN.PASSWORD_VALIDATION_MESSAGE
|
||||
config-pattern@: system.pwd_regex
|
||||
|
||||
fullname:
|
||||
type: text
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.FULL_NAME
|
||||
validate:
|
||||
required: true
|
||||
|
||||
title:
|
||||
type: text
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.TITLE
|
||||
|
||||
language:
|
||||
type: select
|
||||
label: PLUGIN_ADMIN.LANGUAGE
|
||||
size: medium
|
||||
classes: fancy
|
||||
data-options@: '\Grav\Plugin\Admin\Admin::adminLanguages'
|
||||
default: 'en'
|
||||
help: PLUGIN_ADMIN.LANGUAGE_HELP
|
||||
|
||||
content_editor:
|
||||
type: select
|
||||
label: PLUGIN_ADMIN.CONTENT_EDITOR
|
||||
size: medium
|
||||
classes: fancy
|
||||
data-options@: 'Grav\Plugin\Admin\Admin::contentEditor'
|
||||
default: 'default'
|
||||
help: PLUGIN_ADMIN.CONTENT_EDITOR_HELP
|
||||
|
||||
twofa_check:
|
||||
type: conditional
|
||||
condition: config.plugins.admin.twofa_enabled
|
||||
|
||||
fields:
|
||||
|
||||
twofa:
|
||||
title: PLUGIN_ADMIN.2FA_TITLE
|
||||
type: section
|
||||
underline: true
|
||||
|
||||
twofa_enabled:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.2FA_ENABLED
|
||||
classes: twofa-toggle
|
||||
highlight: 1
|
||||
default: 0
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
|
||||
twofa_secret:
|
||||
type: 2fa_secret
|
||||
outerclasses: 'twofa-secret'
|
||||
markdown: true
|
||||
label: PLUGIN_ADMIN.2FA_SECRET
|
||||
sublabel: PLUGIN_ADMIN.2FA_SECRET_HELP
|
||||
|
||||
yubikey_id:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.YUBIKEY_ID
|
||||
description: PLUGIN_ADMIN.YUBIKEY_HELP
|
||||
size: small
|
||||
maxlength: 12
|
||||
|
||||
|
||||
|
||||
security:
|
||||
security@: admin.super
|
||||
title: PLUGIN_ADMIN.ACCESS_LEVELS
|
||||
type: section
|
||||
underline: true
|
||||
|
||||
fields:
|
||||
groups:
|
||||
security@: admin.super
|
||||
type: select
|
||||
multiple: true
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.GROUPS
|
||||
data-options@: '\Grav\Common\User\Group::groupNames'
|
||||
classes: fancy
|
||||
help: PLUGIN_ADMIN.GROUPS_HELP
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
access:
|
||||
security@: admin.super
|
||||
type: permissions
|
||||
check_authorize: true
|
||||
label: PLUGIN_ADMIN.PERMISSIONS
|
||||
ignore_empty: true
|
||||
validate:
|
||||
type: array
|
||||
value_type: bool
|
|
@ -0,0 +1,18 @@
|
|||
title: PLUGIN_ADMIN.ADD_ACCOUNT
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
fields:
|
||||
|
||||
content:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN.ADD_ACCOUNT
|
||||
|
||||
username:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.USERNAME
|
||||
help: PLUGIN_ADMIN.USERNAME_HELP
|
||||
unset-disabled@: true
|
||||
unset-readonly@: true
|
||||
validate:
|
||||
required: true
|
|
@ -0,0 +1,55 @@
|
|||
title: Group
|
||||
rules:
|
||||
slug:
|
||||
pattern: '[a-zA-Zа-яA-Я0-9_\-]+'
|
||||
min: 1
|
||||
max: 200
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
|
||||
fields:
|
||||
groupname:
|
||||
type: text
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.GROUP_NAME
|
||||
flex-disabled@: exists
|
||||
flex-readonly@: exists
|
||||
validate:
|
||||
required: true
|
||||
rule: slug
|
||||
|
||||
readableName:
|
||||
type: text
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.DISPLAY_NAME
|
||||
|
||||
description:
|
||||
type: text
|
||||
size: large
|
||||
label: PLUGIN_ADMIN.DESCRIPTION
|
||||
|
||||
icon:
|
||||
type: text
|
||||
size: small
|
||||
label: PLUGIN_ADMIN.ICON
|
||||
|
||||
enabled:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.ENABLED
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
access:
|
||||
type: permissions
|
||||
check_authorize: false
|
||||
label: PLUGIN_ADMIN.PERMISSIONS
|
||||
ignore_empty: true
|
||||
validate:
|
||||
type: array
|
||||
value_type: bool
|
|
@ -0,0 +1,23 @@
|
|||
title: PLUGIN_ADMIN_PRO.ADD_GROUP
|
||||
|
||||
rules:
|
||||
slug:
|
||||
pattern: '[a-zA-Zа-яA-Я0-9_\-]+'
|
||||
min: 1
|
||||
max: 200
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
fields:
|
||||
|
||||
content:
|
||||
type: section
|
||||
title: PLUGIN_ADMIN_PRO.ADD_GROUP
|
||||
|
||||
groupname:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN_PRO.GROUP_NAME
|
||||
help: PLUGIN_ADMIN_PRO.GROUP_NAME_HELP
|
||||
validate:
|
||||
required: true
|
||||
rule: slug
|
|
@ -0,0 +1,15 @@
|
|||
purge:
|
||||
trigger: space
|
||||
max_backups_count: 25
|
||||
max_backups_space: 5
|
||||
max_backups_time: 365
|
||||
|
||||
profiles:
|
||||
-
|
||||
name: 'Default Site Backup'
|
||||
root: '/'
|
||||
schedule: false
|
||||
schedule_at: '0 3 * * *'
|
||||
exclude_paths: "/backup\r\n/cache\r\n/images\r\n/logs\r\n/tmp"
|
||||
exclude_files: ".DS_Store\r\n.git\r\n.svn\r\n.hg\r\n.idea\r\n.vscode\r\nnode_modules"
|
||||
|
|
@ -0,0 +1,223 @@
|
|||
types:
|
||||
defaults:
|
||||
type: file
|
||||
thumb: media/thumb.png
|
||||
mime: application/octet-stream
|
||||
image:
|
||||
filters:
|
||||
default:
|
||||
- enableProgressive
|
||||
|
||||
jpg:
|
||||
type: image
|
||||
thumb: media/thumb-jpg.png
|
||||
mime: image/jpeg
|
||||
jpe:
|
||||
type: image
|
||||
thumb: media/thumb-jpg.png
|
||||
mime: image/jpeg
|
||||
jpeg:
|
||||
type: image
|
||||
thumb: media/thumb-jpg.png
|
||||
mime: image/jpeg
|
||||
png:
|
||||
type: image
|
||||
thumb: media/thumb-png.png
|
||||
mime: image/png
|
||||
webp:
|
||||
type: image
|
||||
thumb: media/thumb-webp.png
|
||||
mime: image/webp
|
||||
avif:
|
||||
type: image
|
||||
thumb: media/thumb.png
|
||||
mime: image/avif
|
||||
gif:
|
||||
type: animated
|
||||
thumb: media/thumb-gif.png
|
||||
mime: image/gif
|
||||
svg:
|
||||
type: vector
|
||||
thumb: media/thumb-svg.png
|
||||
mime: image/svg+xml
|
||||
mp4:
|
||||
type: video
|
||||
thumb: media/thumb-mp4.png
|
||||
mime: video/mp4
|
||||
mov:
|
||||
type: video
|
||||
thumb: media/thumb-mov.png
|
||||
mime: video/quicktime
|
||||
m4v:
|
||||
type: video
|
||||
thumb: media/thumb-m4v.png
|
||||
mime: video/x-m4v
|
||||
swf:
|
||||
type: video
|
||||
thumb: media/thumb-swf.png
|
||||
mime: video/x-flv
|
||||
flv:
|
||||
type: video
|
||||
thumb: media/thumb-flv.png
|
||||
mime: video/x-flv
|
||||
webm:
|
||||
type: video
|
||||
thumb: media/thumb-webm.png
|
||||
mime: video/webm
|
||||
ogv:
|
||||
type: video
|
||||
thumb: media/thumb-ogg.png
|
||||
mime: video/ogg
|
||||
mp3:
|
||||
type: audio
|
||||
thumb: media/thumb-mp3.png
|
||||
mime: audio/mp3
|
||||
ogg:
|
||||
type: audio
|
||||
thumb: media/thumb-ogg.png
|
||||
mime: audio/ogg
|
||||
wma:
|
||||
type: audio
|
||||
thumb: media/thumb-wma.png
|
||||
mime: audio/wma
|
||||
m4a:
|
||||
type: audio
|
||||
thumb: media/thumb-m4a.png
|
||||
mime: audio/m4a
|
||||
wav:
|
||||
type: audio
|
||||
thumb: media/thumb-wav.png
|
||||
mime: audio/wav
|
||||
aiff:
|
||||
type: audio
|
||||
thumb: media/thumb-aif.png
|
||||
mime: audio/aiff
|
||||
aif:
|
||||
type: audio
|
||||
thumb: media/thumb-aif.png
|
||||
mime: audio/aiff
|
||||
txt:
|
||||
type: file
|
||||
thumb: media/thumb-txt.png
|
||||
mime: text/plain
|
||||
xml:
|
||||
type: file
|
||||
thumb: media/thumb-xml.png
|
||||
mime: application/xml
|
||||
doc:
|
||||
type: file
|
||||
thumb: media/thumb-doc.png
|
||||
mime: application/msword
|
||||
docx:
|
||||
type: file
|
||||
thumb: media/thumb-docx.png
|
||||
mime: application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
xls:
|
||||
type: file
|
||||
thumb: media/thumb-xls.png
|
||||
mime: application/vnd.ms-excel
|
||||
xlsx:
|
||||
type: file
|
||||
thumb: media/thumb-xlsx.png
|
||||
mime: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
ppt:
|
||||
type: file
|
||||
thumb: media/thumb-ppt.png
|
||||
mime: application/vnd.ms-powerpoint
|
||||
pptx:
|
||||
type: file
|
||||
thumb: media/thumb-pptx.png
|
||||
mime: application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
pps:
|
||||
type: file
|
||||
thumb: media/thumb-pps.png
|
||||
mime: application/vnd.ms-powerpoint
|
||||
rtf:
|
||||
type: file
|
||||
thumb: media/thumb-rtf.png
|
||||
mime: application/rtf
|
||||
bmp:
|
||||
type: file
|
||||
thumb: media/thumb-bmp.png
|
||||
mime: image/bmp
|
||||
tiff:
|
||||
type: file
|
||||
thumb: media/thumb-tiff.png
|
||||
mime: image/tiff
|
||||
mpeg:
|
||||
type: file
|
||||
thumb: media/thumb-mpg.png
|
||||
mime: video/mpeg
|
||||
mpg:
|
||||
type: file
|
||||
thumb: media/thumb-mpg.png
|
||||
mime: video/mpeg
|
||||
mpe:
|
||||
type: file
|
||||
thumb: media/thumb-mpe.png
|
||||
mime: video/mpeg
|
||||
avi:
|
||||
type: file
|
||||
thumb: media/thumb-avi.png
|
||||
mime: video/msvideo
|
||||
wmv:
|
||||
type: file
|
||||
thumb: media/thumb-wmv.png
|
||||
mime: video/x-ms-wmv
|
||||
html:
|
||||
type: file
|
||||
thumb: media/thumb-html.png
|
||||
mime: text/html
|
||||
htm:
|
||||
type: file
|
||||
thumb: media/thumb-html.png
|
||||
mime: text/html
|
||||
ics:
|
||||
type: iCal
|
||||
thumb: media/thumb-ics.png
|
||||
mime: text/calendar
|
||||
pdf:
|
||||
type: file
|
||||
thumb: media/thumb-pdf.png
|
||||
mime: application/pdf
|
||||
ai:
|
||||
type: file
|
||||
thumb: media/thumb-ai.png
|
||||
mime: image/ai
|
||||
psd:
|
||||
type: file
|
||||
thumb: media/thumb-psd.png
|
||||
mime: image/psd
|
||||
zip:
|
||||
type: file
|
||||
thumb: media/thumb-zip.png
|
||||
mime: application/zip
|
||||
7z:
|
||||
type: file
|
||||
thumb: media/thumb-7z.png
|
||||
mime: application/x-7z-compressed
|
||||
gz:
|
||||
type: file
|
||||
thumb: media/thumb-gz.png
|
||||
mime: application/x-gzip
|
||||
tar:
|
||||
type: file
|
||||
thumb: media/thumb-tar.png
|
||||
mime: application/x-tar
|
||||
css:
|
||||
type: file
|
||||
thumb: media/thumb-css.png
|
||||
mime: text/css
|
||||
js:
|
||||
type: file
|
||||
thumb: media/thumb-js.png
|
||||
mime: text/javascript
|
||||
json:
|
||||
type: file
|
||||
thumb: media/thumb-json.png
|
||||
mime: application/json
|
||||
vcf:
|
||||
type: file
|
||||
thumb: media/thumb-vcf.png
|
||||
mime: text/x-vcard
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
actions:
|
||||
site:
|
||||
type: access
|
||||
label: Site
|
||||
admin:
|
||||
type: access
|
||||
label: Admin
|
||||
admin.pages:
|
||||
type: access
|
||||
label: Pages
|
||||
admin.users:
|
||||
type: access
|
||||
label: User Accounts
|
||||
|
||||
types:
|
||||
default:
|
||||
type: access
|
||||
|
||||
crud:
|
||||
type: compact
|
||||
letters:
|
||||
c:
|
||||
action: create
|
||||
label: PLUGIN_ADMIN.CREATE
|
||||
r:
|
||||
action: read
|
||||
label: PLUGIN_ADMIN.READ
|
||||
u:
|
||||
action: update
|
||||
label: PLUGIN_ADMIN.UPDATE
|
||||
d:
|
||||
action: delete
|
||||
label: PLUGIN_ADMIN.DELETE
|
||||
|
||||
crudp:
|
||||
type: crud
|
||||
letters:
|
||||
p:
|
||||
action: publish
|
||||
label: PLUGIN_ADMIN.PUBLISH
|
||||
|
||||
crudl:
|
||||
type: crud
|
||||
letters:
|
||||
l:
|
||||
action: list
|
||||
label: PLUGIN_ADMIN.LIST
|
||||
|
||||
crudpl:
|
||||
type: crud
|
||||
use:
|
||||
- crudp
|
||||
- crudl
|
|
@ -0,0 +1,47 @@
|
|||
xss_whitelist: [admin.super] # Whitelist of user access that should 'skip' XSS checking
|
||||
xss_enabled:
|
||||
on_events: true
|
||||
invalid_protocols: true
|
||||
moz_binding: true
|
||||
html_inline_styles: true
|
||||
dangerous_tags: true
|
||||
xss_invalid_protocols:
|
||||
- javascript
|
||||
- livescript
|
||||
- vbscript
|
||||
- mocha
|
||||
- feed
|
||||
- data
|
||||
xss_dangerous_tags:
|
||||
- applet
|
||||
- meta
|
||||
- xml
|
||||
- blink
|
||||
- link
|
||||
- style
|
||||
- script
|
||||
- embed
|
||||
- object
|
||||
- iframe
|
||||
- frame
|
||||
- frameset
|
||||
- ilayer
|
||||
- layer
|
||||
- bgsound
|
||||
- title
|
||||
- base
|
||||
uploads_dangerous_extensions:
|
||||
- php
|
||||
- php2
|
||||
- php3
|
||||
- php4
|
||||
- php5
|
||||
- phar
|
||||
- phtml
|
||||
- html
|
||||
- htm
|
||||
- shtml
|
||||
- shtm
|
||||
- js
|
||||
- exe
|
||||
sanitize_svg: true
|
|
@ -0,0 +1,35 @@
|
|||
title: Grav # Name of the site
|
||||
default_lang: en # Default language for site (potentially used by theme)
|
||||
|
||||
author:
|
||||
name: John Appleseed # Default author name
|
||||
email: 'john@example.com' # Default author email
|
||||
|
||||
taxonomies: [category,tag] # Arbitrary list of taxonomy types
|
||||
|
||||
metadata:
|
||||
description: 'My Grav Site' # Site description
|
||||
|
||||
summary:
|
||||
enabled: true # enable or disable summary of page
|
||||
format: short # long = summary delimiter will be ignored; short = use the first occurrence of delimiter or size
|
||||
size: 300 # Maximum length of summary (characters)
|
||||
delimiter: === # The summary delimiter
|
||||
|
||||
redirects:
|
||||
# '/redirect-test': '/' # Redirect test goes to home page
|
||||
# '/old/(.*)': '/new/$1' # Would redirect /old/my-page to /new/my-page
|
||||
|
||||
routes:
|
||||
# '/something/else': '/blog/sample-3' # Alias for /blog/sample-3
|
||||
# '/new/(.*)': '/blog/$1' # Regex any /new/my-page URL to /blog/my-page Route
|
||||
|
||||
blog:
|
||||
route: '/blog' # Custom value added (accessible via site.blog.route)
|
||||
|
||||
#menu: # Menu Example
|
||||
# - text: Source
|
||||
# icon: github
|
||||
# url: https://github.com/getgrav/grav
|
||||
# - icon: twitter
|
||||
# url: http://twitter.com/getgrav
|
|
@ -0,0 +1,231 @@
|
|||
absolute_urls: false # Absolute or relative URLs for `base_url`
|
||||
timezone: '' # Valid values: http://php.net/manual/en/timezones.php
|
||||
default_locale: # Default locale (defaults to system)
|
||||
param_sep: ':' # Parameter separator, use ';' for Apache on windows
|
||||
wrapped_site: false # For themes/plugins to know if Grav is wrapped by another platform
|
||||
reverse_proxy_setup: false # Running in a reverse proxy scenario with different webserver ports than proxy
|
||||
force_ssl: false # If enabled, Grav forces to be accessed via HTTPS (NOTE: Not an ideal solution)
|
||||
force_lowercase_urls: true # If you want to support mixed cased URLs set this to false
|
||||
custom_base_url: '' # Set the base_url manually, e.g. http://yoursite.com/yourpath
|
||||
username_regex: '^[a-z0-9_-]{3,16}$' # Only lowercase chars, digits, dashes, underscores. 3 - 16 chars
|
||||
pwd_regex: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}' # At least one number, one uppercase and lowercase letter, and be at least 8+ chars
|
||||
intl_enabled: true # Special logic for PHP International Extension (mod_intl)
|
||||
http_x_forwarded: # Configuration options for the various HTTP_X_FORWARD headers
|
||||
protocol: true
|
||||
host: false
|
||||
port: true
|
||||
ip: true
|
||||
|
||||
languages:
|
||||
supported: [] # List of languages supported. eg: [en, fr, de]
|
||||
default_lang: # Default is the first supported language. Must be one of the supported languages
|
||||
include_default_lang: true # Include the default lang prefix in all URLs
|
||||
include_default_lang_file_extension: true # If true, include language code for the default language in file extension: default.en.md
|
||||
translations: true # If false, translation keys are used instead of translated strings
|
||||
translations_fallback: true # Fallback through supported translations if active lang doesn't exist
|
||||
session_store_active: false # Store active language in session
|
||||
http_accept_language: false # Attempt to set the language based on http_accept_language header in the browser
|
||||
override_locale: false # Override the default or system locale with language specific one
|
||||
content_fallback: {} # Custom language fallbacks. eg: {fr: ['fr', 'en']}
|
||||
pages_fallback_only: false # DEPRECATED: Use `content_fallback` instead
|
||||
debug: false # Debug language detection
|
||||
|
||||
home:
|
||||
alias: '/home' # Default path for home, ie /
|
||||
hide_in_urls: false # Hide the home route in URLs
|
||||
|
||||
pages:
|
||||
type: regular # EXPERIMENTAL: Page type: regular or flex
|
||||
dirs: ['page://'] # Advanced functionality, allows for multiple page paths
|
||||
theme: quark # Default theme (defaults to "quark" theme)
|
||||
order:
|
||||
by: default # Order pages by "default", "alpha" or "date"
|
||||
dir: asc # Default ordering direction, "asc" or "desc"
|
||||
list:
|
||||
count: 20 # Default item count per page
|
||||
dateformat:
|
||||
default: # The default date format Grav expects in the `date: ` field
|
||||
short: 'jS M Y' # Short date format
|
||||
long: 'F jS \a\t g:ia' # Long date format
|
||||
publish_dates: true # automatically publish/unpublish based on dates
|
||||
process:
|
||||
markdown: true # Process Markdown
|
||||
twig: false # Process Twig
|
||||
twig_first: false # Process Twig before markdown when processing both on a page
|
||||
never_cache_twig: false # Only cache content, never cache twig processed in content (incompatible with `twig_first: true`)
|
||||
events:
|
||||
page: true # Enable page level events
|
||||
twig: true # Enable Twig level events
|
||||
markdown:
|
||||
extra: false # Enable support for Markdown Extra support (GFM by default)
|
||||
auto_line_breaks: false # Enable automatic line breaks
|
||||
auto_url_links: false # Enable automatic HTML links
|
||||
escape_markup: false # Escape markup tags into entities
|
||||
special_chars: # List of special characters to automatically convert to entities
|
||||
'>': 'gt'
|
||||
'<': 'lt'
|
||||
valid_link_attributes: # Valid attributes to pass through via markdown links
|
||||
- rel
|
||||
- target
|
||||
- id
|
||||
- class
|
||||
- classes
|
||||
types: [html,htm,xml,txt,json,rss,atom] # list of valid page types
|
||||
append_url_extension: '' # Append page's extension in Page urls (e.g. '.html' results in /path/page.html)
|
||||
expires: 604800 # Page expires time in seconds (604800 seconds = 7 days)
|
||||
cache_control: # Can be blank for no setting, or a valid `cache-control` text value
|
||||
last_modified: false # Set the last modified date header based on file modification timestamp
|
||||
etag: true # Set the etag header tag
|
||||
vary_accept_encoding: false # Add `Vary: Accept-Encoding` header
|
||||
redirect_default_code: 302 # Default code to use for redirects: 301|302|303
|
||||
redirect_trailing_slash: 1 # Always redirect trailing slash with redirect code 0|1|301|302 (0: no redirect, 1: use default code)
|
||||
redirect_default_route: 0 # Always redirect to page's default route using code 0|1|301|302, also removes .htm and .html extensions
|
||||
ignore_files: [.DS_Store] # Files to ignore in Pages
|
||||
ignore_folders: [.git, .idea] # Folders to ignore in Pages
|
||||
ignore_hidden: true # Ignore all Hidden files and folders
|
||||
hide_empty_folders: false # If folder has no .md file, should it be hidden
|
||||
url_taxonomy_filters: true # Enable auto-magic URL-based taxonomy filters for page collections
|
||||
frontmatter:
|
||||
process_twig: false # Should the frontmatter be processed to replace Twig variables?
|
||||
ignore_fields: ['form','forms'] # Fields that might contain Twig variables and should not be processed
|
||||
|
||||
cache:
|
||||
enabled: true # Set to true to enable caching
|
||||
check:
|
||||
method: file # Method to check for updates in pages: file|folder|hash|none
|
||||
driver: auto # One of: auto|file|apcu|memcache|wincache
|
||||
prefix: 'g' # Cache prefix string (prevents cache conflicts)
|
||||
purge_at: '0 4 * * *' # How often to purge old file cache (using new scheduler)
|
||||
clear_at: '0 3 * * *' # How often to clear cache (using new scheduler)
|
||||
clear_job_type: 'standard' # Type to clear when processing the scheduled clear job `standard`|`all`
|
||||
clear_images_by_default: false # By default grav does not include processed images in cache clear, this can be enabled
|
||||
cli_compatibility: false # Ensures only non-volatile drivers are used (file, redis, memcache, etc.)
|
||||
lifetime: 604800 # Lifetime of cached data in seconds (0 = infinite)
|
||||
gzip: false # GZip compress the page output
|
||||
allow_webserver_gzip: false # If true, `content-encoding: identity` but connection isn't closed before `onShutDown()` event
|
||||
redis:
|
||||
socket: false # Path to redis unix socket (e.g. /var/run/redis/redis.sock), false = use server and port to connect
|
||||
password: # Optional password
|
||||
database: # Optional database ID
|
||||
|
||||
twig:
|
||||
cache: true # Set to true to enable Twig caching
|
||||
debug: true # Enable Twig debug
|
||||
auto_reload: true # Refresh cache on changes
|
||||
autoescape: true # Autoescape Twig vars (DEPRECATED, always enabled in strict mode)
|
||||
undefined_functions: true # Allow undefined functions
|
||||
undefined_filters: true # Allow undefined filters
|
||||
safe_functions: [] # List of PHP functions which are allowed to be used as Twig functions
|
||||
safe_filters: [] # List of PHP functions which are allowed to be used as Twig filters
|
||||
umask_fix: false # By default Twig creates cached files as 755, fix switches this to 775
|
||||
|
||||
assets: # Configuration for Assets Manager (JS, CSS)
|
||||
css_pipeline: false # The CSS pipeline is the unification of multiple CSS resources into one file
|
||||
css_pipeline_include_externals: true # Include external URLs in the pipeline by default
|
||||
css_pipeline_before_excludes: true # Render the pipeline before any excluded files
|
||||
css_minify: true # Minify the CSS during pipelining
|
||||
css_minify_windows: false # Minify Override for Windows platforms. False by default due to ThreadStackSize
|
||||
css_rewrite: true # Rewrite any CSS relative URLs during pipelining
|
||||
js_pipeline: false # The JS pipeline is the unification of multiple JS resources into one file
|
||||
js_pipeline_include_externals: true # Include external URLs in the pipeline by default
|
||||
js_pipeline_before_excludes: true # Render the pipeline before any excluded files
|
||||
js_module_pipeline: false # The JS Module pipeline is the unification of multiple JS Module resources into one file
|
||||
js_module_pipeline_include_externals: true # Include external URLs in the pipeline by default
|
||||
js_module_pipeline_before_excludes: true # Render the pipeline before any excluded files
|
||||
js_minify: true # Minify the JS during pipelining
|
||||
enable_asset_timestamp: false # Enable asset timestamps
|
||||
enable_asset_sri: false # Enable asset SRI
|
||||
collections:
|
||||
jquery: system://assets/jquery/jquery-3.x.min.js
|
||||
|
||||
errors:
|
||||
display: 0 # Display either (1) Full backtrace | (0) Simple Error | (-1) System Error
|
||||
log: true # Log errors to /logs folder
|
||||
|
||||
log:
|
||||
handler: file # Log handler. Currently supported: file | syslog
|
||||
syslog:
|
||||
facility: local6 # Syslog facilities output
|
||||
tag: grav # Syslog tag. Default: "grav".
|
||||
|
||||
debugger:
|
||||
enabled: false # Enable Grav debugger and following settings
|
||||
provider: clockwork # Debugger provider: debugbar | clockwork
|
||||
censored: false # Censor potentially sensitive information (POST parameters, cookies, files, configuration and most array/object data in log messages)
|
||||
shutdown:
|
||||
close_connection: true # Close the connection before calling onShutdown(). false for debugging
|
||||
|
||||
images:
|
||||
default_image_quality: 85 # Default image quality to use when resampling images (85%)
|
||||
cache_all: false # Cache all image by default
|
||||
cache_perms: '0755' # MUST BE IN QUOTES!! Default cache folder perms. Usually '0755' or '0775'
|
||||
debug: false # Show an overlay over images indicating the pixel depth of the image when working with retina for example
|
||||
auto_fix_orientation: true # Automatically fix the image orientation based on the Exif data
|
||||
seofriendly: false # SEO-friendly processed image names
|
||||
cls: # Cumulative Layout Shift: See https://web.dev/optimize-cls/
|
||||
auto_sizes: false # Automatically add height/width to image
|
||||
aspect_ratio: false # Reserve space with aspect ratio style
|
||||
retina_scale: 1 # scale to adjust auto-sizes for better handling of HiDPI resolutions
|
||||
defaults:
|
||||
loading: auto # Let browser pick [auto|lazy|eager]
|
||||
watermark:
|
||||
image: 'system://images/watermark.png' # Path to a watermark image
|
||||
position_y: 'center' # top|center|bottom
|
||||
position_x: 'center' # left|center|right
|
||||
scale: 33 # percentage of watermark scale
|
||||
watermark_all: false # automatically watermark all images
|
||||
|
||||
media:
|
||||
enable_media_timestamp: false # Enable media timestamps
|
||||
unsupported_inline_types: [] # Array of supported media types to try to display inline
|
||||
allowed_fallback_types: [] # Array of allowed media types of files found if accessed via Page route
|
||||
auto_metadata_exif: false # Automatically create metadata files from Exif data where possible
|
||||
|
||||
session:
|
||||
enabled: true # Enable Session support
|
||||
initialize: true # Initialize session from Grav (if false, plugin needs to start the session)
|
||||
timeout: 1800 # Timeout in seconds
|
||||
name: grav-site # Name prefix of the session cookie. Use alphanumeric, dashes or underscores only. Do not use dots in the session name
|
||||
uniqueness: path # Should sessions be `path` based or `security.salt` based
|
||||
secure: false # Set session secure. If true, indicates that communication for this cookie must be over an encrypted transmission. Enable this only on sites that run exclusively on HTTPS
|
||||
secure_https: true # Set session secure on HTTPS but not on HTTP. Has no effect if you have `session.secure: true`. Set to false if your site jumps between HTTP and HTTPS.
|
||||
httponly: true # Set session HTTP only. If true, indicates that cookies should be used only over HTTP, and JavaScript modification is not allowed.
|
||||
samesite: Lax # Set session SameSite. Possible values are Lax, Strict and None. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
||||
split: true # Sessions should be independent between site and plugins (such as admin)
|
||||
domain: # Domain used by sessions.
|
||||
path: # Path used by sessions.
|
||||
|
||||
gpm:
|
||||
releases: stable # Set to either 'stable' or 'testing'
|
||||
official_gpm_only: true # By default GPM direct-install will only allow URLs via the official GPM proxy to ensure security
|
||||
|
||||
http:
|
||||
method: auto # Either 'curl', 'fopen' or 'auto'. 'auto' will try fopen first and if not available cURL
|
||||
enable_proxy: true # Enable proxy server configuration
|
||||
proxy_url: # Configure a manual proxy URL for GPM (eg 127.0.0.1:3128)
|
||||
proxy_cert_path: # Local path to proxy certificate folder containing pem files
|
||||
concurrent_connections: 5 # Concurrent HTTP connections when multiplexing
|
||||
verify_peer: true # Enable/Disable SSL verification of peer certificates
|
||||
verify_host: true # Enable/Disable SSL verification of host certificates
|
||||
|
||||
accounts:
|
||||
type: regular # EXPERIMENTAL: Account type: regular or flex
|
||||
storage: file # EXPERIMENTAL: Flex storage type: file or folder
|
||||
avatar: gravatar # Avatar generator [multiavatar|gravatar]
|
||||
|
||||
flex:
|
||||
cache:
|
||||
index:
|
||||
enabled: true # Set to true to enable Flex index caching. Is used to cache timestamps in files
|
||||
lifetime: 60 # Lifetime of cached index in seconds (0 = infinite)
|
||||
object:
|
||||
enabled: true # Set to true to enable Flex object caching. Is used to cache object data
|
||||
lifetime: 600 # Lifetime of cached objects in seconds (0 = infinite)
|
||||
render:
|
||||
enabled: true # Set to true to enable Flex render caching. Is used to cache rendered output
|
||||
lifetime: 600 # Lifetime of cached HTML in seconds (0 = infinite)
|
||||
|
||||
strict_mode:
|
||||
yaml_compat: false # Set to true to enable YAML backwards compatibility
|
||||
twig_compat: false # Set to true to enable deprecated Twig settings (autoescape: false)
|
||||
blueprint_compat: false # Set to true to enable backward compatible strict support for blueprints
|
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @package Grav\Core
|
||||
*
|
||||
* @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
// Some standard defines
|
||||
define('GRAV', true);
|
||||
define('GRAV_VERSION', '1.7.44');
|
||||
define('GRAV_SCHEMA', '1.7.0_2020-11-20_1');
|
||||
define('GRAV_TESTING', false);
|
||||
|
||||
// PHP minimum requirement
|
||||
if (!defined('GRAV_PHP_MIN')) {
|
||||
define('GRAV_PHP_MIN', '7.3.6');
|
||||
}
|
||||
|
||||
// Directory separator
|
||||
if (!defined('DS')) {
|
||||
define('DS', '/');
|
||||
}
|
||||
|
||||
// Absolute path to Grav root. This is where Grav is installed into.
|
||||
if (!defined('GRAV_ROOT')) {
|
||||
$path = rtrim(str_replace(DIRECTORY_SEPARATOR, DS, getenv('GRAV_ROOT') ?: getcwd()), DS);
|
||||
define('GRAV_ROOT', $path);
|
||||
}
|
||||
// Absolute path to Grav webroot. This is the path where your site is located in.
|
||||
if (!defined('GRAV_WEBROOT')) {
|
||||
$path = rtrim(getenv('GRAV_WEBROOT') ?: GRAV_ROOT, DS);
|
||||
define('GRAV_WEBROOT', $path);
|
||||
}
|
||||
// Relative path to user folder. This path needs to be located under GRAV_WEBROOT.
|
||||
if (!defined('GRAV_USER_PATH')) {
|
||||
$path = rtrim(getenv('GRAV_USER_PATH') ?: 'user', DS);
|
||||
define('GRAV_USER_PATH', $path);
|
||||
}
|
||||
// Absolute or relative path to system folder. Defaults to GRAV_ROOT/system
|
||||
// If system folder is outside of webroot, see https://github.com/getgrav/grav/issues/3297#issuecomment-810294972
|
||||
if (!defined('GRAV_SYSTEM_PATH')) {
|
||||
$path = rtrim(getenv('GRAV_SYSTEM_PATH') ?: 'system', DS);
|
||||
define('GRAV_SYSTEM_PATH', $path);
|
||||
}
|
||||
// Absolute or relative path to cache folder. Defaults to GRAV_ROOT/cache
|
||||
if (!defined('GRAV_CACHE_PATH')) {
|
||||
$path = rtrim(getenv('GRAV_CACHE_PATH') ?: 'cache', DS);
|
||||
define('GRAV_CACHE_PATH', $path);
|
||||
}
|
||||
// Absolute or relative path to logs folder. Defaults to GRAV_ROOT/logs
|
||||
if (!defined('GRAV_LOG_PATH')) {
|
||||
$path = rtrim(getenv('GRAV_LOG_PATH') ?: 'logs', DS);
|
||||
define('GRAV_LOG_PATH', $path);
|
||||
}
|
||||
// Absolute or relative path to tmp folder. Defaults to GRAV_ROOT/tmp
|
||||
if (!defined('GRAV_TMP_PATH')) {
|
||||
$path = rtrim(getenv('GRAV_TMP_PATH') ?: 'tmp', DS);
|
||||
define('GRAV_TMP_PATH', $path);
|
||||
}
|
||||
// Absolute or relative path to backup folder. Defaults to GRAV_ROOT/backup
|
||||
if (!defined('GRAV_BACKUP_PATH')) {
|
||||
$path = rtrim(getenv('GRAV_BACKUP_PATH') ?: 'backup', DS);
|
||||
define('GRAV_BACKUP_PATH', $path);
|
||||
}
|
||||
unset($path);
|
||||
|
||||
// INTERNAL: Do not use!
|
||||
define('USER_DIR', GRAV_WEBROOT . '/' . GRAV_USER_PATH . '/');
|
||||
define('CACHE_DIR', (!preg_match('`^(/|[a-z]:[\\\/])`ui', GRAV_CACHE_PATH) ? GRAV_ROOT . '/' : '') . GRAV_CACHE_PATH . '/');
|
||||
|
||||
// DEPRECATED: Do not use!
|
||||
define('CACHE_PATH', GRAV_CACHE_PATH . DS);
|
||||
define('USER_PATH', GRAV_USER_PATH . DS);
|
||||
define('ROOT_DIR', GRAV_ROOT . DS);
|
||||
define('ASSETS_DIR', GRAV_WEBROOT . '/assets/');
|
||||
define('IMAGES_DIR', GRAV_WEBROOT . '/images/');
|
||||
define('ACCOUNTS_DIR', USER_DIR . 'accounts/');
|
||||
define('PAGES_DIR', USER_DIR . 'pages/');
|
||||
define('DATA_DIR', USER_DIR . 'data/');
|
||||
define('PLUGINS_DIR', USER_DIR . 'plugins/');
|
||||
define('THEMES_DIR', USER_DIR . 'themes/');
|
||||
define('SYSTEM_DIR', (!preg_match('`^(/|[a-z]:[\\\/])`ui', GRAV_SYSTEM_PATH) ? GRAV_ROOT . '/' : '') . GRAV_SYSTEM_PATH . '/');
|
||||
define('LIB_DIR', SYSTEM_DIR . 'src/');
|
||||
define('VENDOR_DIR', GRAV_ROOT . '/vendor/');
|
||||
define('LOG_DIR', (!preg_match('`^(/|[a-z]:[\\\/])`ui', GRAV_LOG_PATH) ? GRAV_ROOT . '/' : '') . GRAV_LOG_PATH . '/');
|
||||
// END DEPRECATED
|
||||
|
||||
// Some extensions
|
||||
define('CONTENT_EXT', '.md');
|
||||
define('TEMPLATE_EXT', '.html.twig');
|
||||
define('TWIG_EXT', '.twig');
|
||||
define('PLUGIN_EXT', '.php');
|
||||
define('YAML_EXT', '.yaml');
|
||||
|
||||
// Content types
|
||||
define('RAW_CONTENT', 1);
|
||||
define('TWIG_CONTENT', 2);
|
||||
define('TWIG_CONTENT_LIST', 3);
|
||||
define('TWIG_TEMPLATES', 4);
|
||||
|
||||
// Filters
|
||||
define('GRAV_SANITIZE_STRING', 5001);
|
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.3 KiB |