Skip to content

Instantly share code, notes, and snippets.

@paulcalabro
Created December 7, 2019 21:04
Show Gist options
  • Save paulcalabro/eedfa66593f46085cde2332864fde556 to your computer and use it in GitHub Desktop.
Save paulcalabro/eedfa66593f46085cde2332864fde556 to your computer and use it in GitHub Desktop.
{
"reqId":"3y6E9T0xmndM0xCbsmnK",
"level":3,
"time":"2019-12-07T18:48:06+00:00",
"remoteAddr":"173.224.164.11",
"user":"<REDACTED>",
"app":"index",
"method":"GET",
"url":"\/index.php\/apps\/cms_pico\/pico\/tutorials",
"message":{
"Exception":"Exception",
"Message":"Call to undefined method ParsedownExtra::textElements()",
"Code":0,
"Trace":[
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/App.php",
"line":126,
"function":"dispatch",
"class":"OC\\AppFramework\\Http\\Dispatcher",
"type":"->",
"args":[
{
"__class__":"OCA\\CMSPico\\Controller\\PicoController"
},
"getPage"
]
},
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php",
"line":47,
"function":"main",
"class":"OC\\AppFramework\\App",
"type":"::",
"args":[
"OCA\\CMSPico\\Controller\\PicoController",
"getPage",
{
"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"
},
{
"page":"",
"site":"tutorials",
"_route":"cms_pico.Pico.getPage"
}
]
},
{
"function":"__invoke",
"class":"OC\\AppFramework\\Routing\\RouteActionHandler",
"type":"->",
"args":[
{
"page":"",
"site":"tutorials",
"_route":"cms_pico.Pico.getPage"
}
]
},
{
"file":"\/var\/www\/html\/lib\/private\/Route\/Router.php",
"line":297,
"function":"call_user_func",
"args":[
{
"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"
},
{
"page":"",
"site":"tutorials",
"_route":"cms_pico.Pico.getPage"
}
]
},
{
"file":"\/var\/www\/html\/lib\/base.php",
"line":1000,
"function":"match",
"class":"OC\\Route\\Router",
"type":"->",
"args":[
"\/apps\/cms_pico\/pico\/tutorials"
]
},
{
"file":"\/var\/www\/html\/index.php",
"line":42,
"function":"handleRequest",
"class":"OC",
"type":"::",
"args":[
]
}
],
"File":"\/var\/www\/html\/lib\/private\/AppFramework\/Http\/Dispatcher.php",
"Line":109,
"Previous":{
"Exception":"Error",
"Message":"Call to undefined method ParsedownExtra::textElements()",
"Code":0,
"Trace":[
{
"file":"\/var\/www\/html\/custom_apps\/cms_pico\/vendor\/picocms\/pico\/lib\/Pico.php",
"line":1661,
"function":"text",
"class":"ParsedownExtra",
"type":"->",
"args":[
"\n## Welcome to Pico\n\n![Nextcloud Logo](\/apps\/cms_pico\/pico\/tutorials\/assets-5debf17150d7a\/image.png)\n\nCongratulations, you have successfully installed [Pico CMS for Nextcloud][App],\nutilizing [Pico][] 2.1.0. Pico is a stupidly simple, blazing fast, flat file CMS. <!-- replaced by the above Description header -->\n\n## Creating Content\n\nPico is a flat file CMS. This means there is no administration backend or\ndatabase to deal with. You simply create `.md` files in the `content` folder\nand those files become your pages. For example, this file is called `index.md`\nand is shown as the main landing page.\n\nWhen you install Pico, it comes with some sample contents that will display\nuntil you add your own content. Simply add some `.md` files to your `content`\nfolder in Pico's root directory. No configuration is required, Pico will\nautomatically use the `content` folder as soon as you create your own\n`index.md`. Just check out [Pico's sample contents][SampleContents] for an\nexample!\n\nIf you create a folder within the content directory (e.g. `content\/sub`) and\nput an `index.md` inside it, you can access that folder at the URL\n`\/apps\/cms_pico\/pico\/tutorials\/sub`. If you want another page within the sub folder, simply create\na text file with the corresponding name and you will be able to access it\n(e.g. `content\/sub\/page.md` is accessible from the URL `\/apps\/cms_pico\/pico\/tutorials\/sub\/page`).\nBelow we've shown some examples of locations and their corresponding URLs:\n\n<table style=\"width: 100%; max-width: 40em;\">\n <thead>\n <tr>\n <th style=\"width: 50%;\">Physical Location<\/th>\n <th style=\"width: 50%;\">URL<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <tr>\n <td>content\/index.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\">\/<\/a><\/td>\n <\/tr>\n <tr>\n <td>content\/sub.md<\/td>\n <td><del>?sub<\/del> (not accessible, see below)<\/td>\n <\/tr>\n <tr>\n <td>content\/sub\/index.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/sub\">?sub<\/a> (same as above)<\/td>\n <\/tr>\n <tr>\n <td>content\/sub\/page.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/sub\/page\">?sub\/page<\/a><\/td>\n <\/tr>\n <tr>\n <td>content\/theme.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/theme\">?theme<\/a> (hidden in menu)<\/td>\n <\/tr>\n <tr>\n <td>content\/a\/very\/long\/url.md<\/td>\n <td>\n <a href=\"\/apps\/cms_pico\/pico\/tutorials\/a\/very\/long\/url\">?a\/very\/long\/url<\/a>\n (doesn't exist)\n <\/td>\n <\/tr>\n <\/tbody>\n<\/table>\n\nIf a file cannot be found, the file `content\/404.md` will be shown. You can add\n`404.md` files to any directory. So, for example, if you wanted to use a special\nerror page for your blog, you could simply create `content\/blog\/404.md`.\n\nPico strictly separates contents of your website (the Markdown files in your\n`content` directory) and how these contents should be displayed (the Twig\ntemplates in your `themes` directory). However, not every file in your `content`\ndirectory might actually be a distinct page. For example, some themes (including\nPico's default theme) use some special \"hidden\" file to manage meta data (like\n`_meta.md` in Pico's sample contents). Some other themes use a `_footer.md` to\nrepresent the contents of the website's footer. The common point is the `_`: all\nfiles and directories prefixed by a `_` in your `content` directory are hidden.\nThese pages can't be accessed from a web browser, Pico will show a 404 error\npage instead.\n\nAs a common practice, we recommend you to separate your contents and assets\n(like images, downloads, etc.). We even deny access to your `content` directory\nby default. If you want to use some assets (e.g. a image) in one of your content\nfiles, use Pico's `assets` folder. You can then access them in your Markdown\nusing the <code>&#37;assets_url&#37;<\/code> placeholder, for example:\n<code>!\\[Image Title\\](&#37;assets_url&#37;\/image.png)<\/code>\n\n### Text File Markup\n\nText files are marked up using [Markdown][] and [Markdown Extra][MarkdownExtra].\nThey can also contain regular HTML.\n\nAt the top of text files you can place a block comment and specify certain meta\nattributes of the page using [YAML][] (the \"YAML header\"). For example:\n\n ---\n Title: Welcome\n Description: This description will go in the meta description tag\n Author: Joe Bloggs\n Date: 2001-04-25\n Robots: noindex,nofollow\n Template: index\n ---\n\nThese values will be contained in the `{{ meta }}` variable in themes (see\nbelow). Meta headers sometimes have a special meaning: For instance, Pico not\nonly passes through the `Date` meta header, but rather evaluates it to really\n\"understand\" when this page was created. This comes into play when you want to\nsort your pages not just alphabetically, but by date. Another example is the\n`Template` meta header: It controls what Twig template Pico uses to display\nthis page (e.g. if you add `Template: blog`, Pico uses `blog.twig`).\n\nIn an attempt to separate contents and styling, we recommend you to not use\ninline CSS in your Markdown files. You should rather add appropriate CSS\nclasses to your theme. For example, you might want to add some CSS classes to\nyour theme to rule how much of the available space a image should use (e.g.\n`img.small { width: 80%; }`). You can then use these CSS classes in your\nMarkdown files, for example:\n<code>!\\[Image Title\\](&#37;assets_url&#37;\/image.png) {.small}<\/code>\n\nThere are also certain variables that you can use in your text files:\n\n* <code>&#37;site_title&#37;<\/code> - The title of your Pico site\n* <code>&#37;base_url&#37;<\/code> - The URL to your Pico site; internal links\n can be specified using <code>&#37;base_url&#37;?sub\/page<\/code>\n* <code>&#37;theme_url&#37;<\/code> - The URL to the currently used theme\n* <code>&#37;assets_url&#37;<\/code> - The URL to Pico's `assets` directory\n* <code>&#37;themes_url&#37;<\/code> - The URL to Pico's `themes` directory;\n don't confuse this with <code>&#37;theme_url&#37;<\/code>\n* <code>&#37;plugins_url&#37;<\/code> - The URL to Pico's `plugins` directory\n* <code>&#37;version&#37;<\/code> - Pico's current version string (e.g. `2.0.0`)\n* <code>&#37;meta.&#42;&#37;<\/code> - Access any meta variable of the current\n page, e.g. <code>&#37;meta.author&#37;<\/code> is replaced with `Joe Bloggs`\n* <code>&#37;config.&#42;&#37;<\/code> - Access any scalar config variable,\n e.g. <code>&#37;config.theme&#37;<\/code> is replaced with `default`\n\n### Blogging\n\nPico is not blogging software - but makes it very easy for you to use it as a\nblog. You can find many plugins out there implementing typical blogging\nfeatures like authentication, tagging, pagination and social plugins. See the\nbelow Plugins section for details.\n\nIf you want to use Pico as a blogging software, you probably want to do\nsomething like the following:\n\n1. Put all your blog articles in a separate `blog` folder in your `content`\n directory. All these articles should have a `Date` meta header.\n2. Create a `blog.md` or `blog\/index.md` in your `content` directory. Add\n `Template: blog-index` to the YAML header of this page. It will later show a\n list of all your blog articles (see step 3).\n3. Create the new Twig template `blog-index.twig` (the file name must match the\n `Template` meta header from Step 2) in your theme directory. This template\n probably isn't very different from your default `index.twig` (i.e. copy\n `index.twig`), it will create a list of all your blog articles. Add the\n following Twig snippet to `blog-index.twig` near `{{ content }}`:\n ```\n {% for page in pages(\"blog\")|sort_by(\"time\")|reverse if not page.hidden %}\n <div class=\"post\">\n <h3><a href=\"{{ page.url }}\">{{ page.title }}<\/a><\/h3>\n <p class=\"date\">{{ page.date_formatted }}<\/p>\n <p class=\"excerpt\">{{ page.description }}<\/p>\n <\/div>\n {% endfor %}\n ```\n\n## Customization\n\nPico is highly customizable in two different ways: On the one hand you can\nchange Pico's appearance by using themes, on the other hand you can add new\nfunctionality by using plugins. Doing the former includes changing Pico's HTML,\nCSS and JavaScript, the latter mostly consists of PHP programming.\n\nThis is all Greek to you? Don't worry, you don't have to spend time on these\ntechie talk - it's very easy to use one of the great themes or plugins others\ndeveloped and released to the public. Please refer to the next sections for\ndetails.\n\n### Themes\n\nYou can create themes for your Pico installation in the `themes` folder. Pico\nuses [Twig][] for template rendering. You can select your theme by setting the\n`theme` option in `config\/config.yml` to the name of your theme folder.\n\n[Pico's default theme][PicoTheme] isn't really intended to be used for a\nproductive website, it's rather a starting point for creating your own theme.\nIf the default theme isn't sufficient for you, and you don't want to create\nyour own theme, you can use one of the great themes third-party developers and\ndesigners created in the past. As with plugins, you can find themes in\n[our Wiki][WikiThemes] and on [our website][OfficialThemes].\n\nAll themes must include an `index.twig` file to define the HTML structure of\nthe theme, and a `pico-theme.yml` to set the necessary config parameters. Just\nrefer to Pico's default theme as an example. You can use different templates\nfor different content files by specifying the `Template` meta header. Simply\nadd e.g. `Template: blog` to the YAML header of a content file and Pico will\nuse the `blog.twig` template in your theme folder to display the page.\n\nBelow are the Twig variables that are available to use in themes. Please note\nthat URLs (e.g. `{{ base_url }}`) never include a trailing slash.\n\n* `{{ site_title }}` - Shortcut to the site title (see `config\/config.yml`)\n* `{{ config }}` - Contains the values you set in `config\/config.yml`\n (e.g. `{{ config.theme }}` becomes `default`)\n* `{{ base_url }}` - The URL to your Pico site; use Twig's `link` filter to\n specify internal links (e.g. `{{ \"sub\/page\"|link }}`),\n this guarantees that your link works whether URL rewriting\n is enabled or not\n* `{{ theme_url }}` - The URL to the currently active theme\n* `{{ assets_url }}` - The URL to Pico's `assets` directory\n* `{{ themes_url }}` - The URL to Pico's `themes` directory; don't confuse this\n with `{{ theme_url }}`\n* `{{ plugins_url }}` - The URL to Pico's `plugins` directory\n* `{{ version }}` - Pico's current version string (e.g. `2.1.0`)\n* `{{ meta }}` - Contains the meta values of the current page\n * `{{ meta.title }}` - The `Title` YAML header\n * `{{ meta.description }}` - The `Description` YAML header\n * `{{ meta.author }}` - The `Author` YAML header\n * `{{ meta.date }}` - The `Date` YAML header\n * `{{ meta.date_formatted }}` - The formatted date of the page as specified\n by the `date_format` parameter in your\n `config\/config.yml`\n * `{{ meta.time }}` - The [Unix timestamp][UnixTimestamp] derived from the\n `Date` YAML header\n * `{{ meta.robots }}` - The `Robots` YAML header\n * ...\n* `{{ content }}` - The content of the current page after it has been processed\n through Markdown\n* `{{ previous_page }}` - The data of the previous page, relative to\n `current_page`\n* `{{ current_page }}` - The data of the current page; refer to the \"Pages\"\n section below for details\n* `{{ next_page }}` - The data of the next page, relative to `current_page`\n\nTo call assets from your theme, use `{{ theme_url }}`. For instance, to include\nthe CSS file `themes\/my_theme\/example.css`, add\n`<link rel=\"stylesheet\" href=\"{{ theme_url }}\/example.css\" type=\"text\/css\" \/>`\nto your `index.twig`. This works for arbitrary files in your theme's folder,\nincluding images and JavaScript files.\n\nPlease note that Twig escapes HTML in all strings before outputting them. So\nfor example, if you add `headline: My <strong>favorite<\/strong> color` to the\nYAML header of a page and output it using `{{ meta.headline }}`, you'll end up\nseeing `My <strong>favorite<\/strong> color` - yes, including the markup! To\nactually get it parsed, you must use `{{ meta.headline|raw }}` (resulting in\nthe expected <code>My **favorite** color<\/code>). Notable exceptions to this\nare Pico's `content` variable (e.g. `{{ content }}`), Pico's `content` filter\n(e.g. `{{ \"sub\/page\"|content }}`), and Pico's `markdown` filter, they all are\nmarked as HTML safe.\n\n#### Dealing with pages\n\nThere are several ways to access Pico's pages list. You can access the current\npage's data using the `current_page` variable, or use the `prev_page` and\/or\n`next_page` variables to access the respective previous\/next page in Pico's\npages list. But more importantly there's the `pages()` function. No matter how\nyou access a page, it will always consist of the following data:\n\n* `{{ id }}` - The relative path to the content file (unique ID)\n* `{{ url }}` - The URL to the page\n* `{{ title }}` - The title of the page (`Title` YAML header)\n* `{{ description }}` - The description of the page (`Description` YAML header)\n* `{{ author }}` - The author of the page (`Author` YAML header)\n* `{{ date }}` - The date of the page (`Date` YAML header)\n* `{{ date_formatted }}` - The formatted date of the page as specified by the\n `date_format` parameter in your `config\/config.yml`\n* `{{ time }}` - The [Unix timestamp][UnixTimestamp] derived from the page's\n date\n* `{{ raw_content }}` - The raw, not yet parsed contents of the page; use the\n filter to get the parsed contents of a page by passing\n its unique ID (e.g. `{{ \"sub\/page\"|content }}`)\n* `{{ meta }}` - The meta values of the page (see global `{{ meta }}` above)\n* `{{ prev_page }}` - The data of the respective previous page\n* `{{ next_page }}` - The data of the respective next page\n* `{{ tree_node }}` - The page's node in Pico's page tree; check out Pico's\n [page tree documentation][FeaturesPageTree] for details\n\nPico's `pages()` function is the best way to access all of your site's pages.\nIt uses Pico's page tree to easily traverse a subset of Pico's pages list. It\nallows you to filter pages and to build recursive menus (like dropdowns). By\ndefault, `pages()` returns a list of all main pages (e.g. `content\/page.md` and\n`content\/sub\/index.md`, but not `content\/sub\/page.md` or `content\/index.md`).\nIf you want to return all pages below a specific folder (e.g. `content\/blog\/`),\npass the folder name as first parameter to the function (e.g. `pages(\"blog\")`).\nNaturally you can also pass variables to the function. For example, to return a\nlist of all child pages of the current page, use `pages(current_page.id)`.\nCheck out the following code snippet:\n\n <section class=\"articles\">\n {% for page in pages(current_page.id) if not page.hidden %}\n <article>\n <h2><a href=\"{{ page.url }}\">{{ page.title }}<\/a><\/h2>\n {{ page.id|content }}\n <\/article>\n {% endfor %}\n <\/section>\n\nThe `pages()` function is very powerful and also allows you to return not just\na page's child pages by passing the `depth` and `depthOffset` params. For\nexample, if you pass `pages(depthOffset=-1)`, the list will also include Pico's\nmain index page (i.e. `content\/index.md`). This one is commonly used to create\na theme's main navigation. If you want to learn more, head over to Pico's\ncomplete [`pages()` function documentation][FeaturesPagesFunction].\n\nIf you want to access the data of a particular page, use Pico's `pages`\nvariable. Just take `content\/_meta.md` in Pico's sample contents for an\nexample: `content\/_meta.md` contains some meta data you might want to use in\nyour theme. If you want to output the page's `tagline` meta value, use\n`{{ pages[\"_meta\"].meta.logo }}`. Don't ever try to use Pico's `pages` variable\nas an replacement for Pico's `pages()` function. Its usage looks very similar,\nit will kinda work and you might even see it being used in old themes, but be\nwarned: It slows down Pico. Always use Pico's `pages()` function when iterating\nPico's page list (e.g. `{% for page in pages() %}\u2026{% endfor %}`).\n\n#### Twig filters and functions\n\nAdditional to [Twig][]'s extensive list of filters, functions and tags, Pico\nalso provides some useful additional filters and functions to make theming\neven easier.\n\n* Pass the unique ID of a page to the `link` filter to return the page's URL\n (e.g. `{{ \"sub\/page\"|link }}` gets `\/apps\/cms_pico\/pico\/tutorials\/sub\/page`).\n* You can replace URL placeholders (like <code>&#37;base_url&#37;<\/code>) in\n arbitrary strings using the `url` filter. This is helpful together with meta\n variables, e.g. if you add <code>image: &#37;assets_url&#37;\/stock.jpg<\/code>\n to the YAML header of a page, `{{ meta.image|url }}` will return\n `\/apps\/cms_pico\/pico\/tutorials\/assets-5debf17150d7a\/stock.jpg`.\n* To get the parsed contents of a page, pass its unique ID to the `content`\n filter (e.g. `{{ \"sub\/page\"|content }}`).\n* You can parse any Markdown string using the `markdown` filter. For example,\n you might use Markdown in the `description` meta variable and later parse it\n in your theme using `{{ meta.description|markdown }}`. You can also pass meta\n data as parameter to replace <code>&#37;meta.&#42;&#37;<\/code> placeholders\n (e.g. `{{ \"Written by **\"|markdown(meta) }}` yields \"Written by\n *John Doe*\"). However, please note that all contents will be wrapped inside\n HTML paragraph elements (i.e. `<p>\u2026<\/p>`). If you want to parse just a single\n line of Markdown markup, pass the `singleLine` param to the `markdown` filter\n (e.g. `{{ \"This really is a *single* line\"|markdown(singleLine=true) }}`).\n* Arrays can be sorted by one of its keys using the `sort_by` filter\n (e.g. `{% for page in pages|sort_by([ 'meta', 'nav' ]) %}...{% endfor %}`\n iterates through all pages, ordered by the `nav` meta header; please note the\n `[ 'meta', 'nav' ]` part of the example, it instructs Pico to sort by\n `page.meta.nav`). Items which couldn't be sorted are moved to the bottom of\n the array; you can specify `bottom` (move items to bottom; default), `top`\n (move items to top), `keep` (keep original order) or `remove` (remove items)\n as second parameter to change this behavior.\n* You can return all values of a given array key using the `map` filter\n (e.g. `{{ pages|map(\"title\") }}` returns all page titles).\n* Use the `url_param` and `form_param` Twig functions to access HTTP GET (i.e.\n a URL's query string like `?some-variable=my-value`) and HTTP POST (i.e. data\n of a submitted form) parameters. This allows you to implement things like\n pagination, tags and categories, dynamic pages, and even more - with pure\n Twig! Simply head over to our [introductory page for accessing HTTP\n parameters][FeaturesHttpParams] for details.\n\n### Plugins\n\n#### Plugins for users\n\nOfficially tested plugins can be found at http:\/\/picocms.org\/plugins\/, but\nthere are many awesome third-party plugins out there! A good start point for\ndiscovery is [our Wiki][WikiPlugins].\n\nPico makes it very easy for you to add new features to your website using\nplugins. Just like Pico, you can install plugins either using [Composer][]\n(e.g. `composer require phrozenbyte\/pico-file-prefixes`), or manually by\nuploading the plugin's file (just for small plugins consisting of a single file,\ne.g. `PicoFilePrefixes.php`) or directory (e.g. `PicoFilePrefixes`) to your\n`plugins` directory. We always recommend you to use Composer whenever possible,\nbecause it makes updating both Pico and your plugins way easier. Anyway,\ndepending on the plugin you want to install, you may have to go through some\nmore steps (e.g. specifying config variables) to make the plugin work. Thus you\nshould always check out the plugin's docs or `README.md` file to learn the\nnecessary steps.\n\nPlugins which were written to work with Pico 1.0 and later can be enabled and\ndisabled through your `config\/config.yml`. If you want to e.g. disable the\n`PicoDeprecated` plugin, add the following line to your `config\/config.yml`:\n`PicoDeprecated.enabled: false`. To force the plugin to be enabled, replace\n`false` by `true`.\n\n#### Plugins for developers\n\nYou're a plugin developer? We love you guys! You can find tons of information\nabout how to develop plugins at http:\/\/picocms.org\/development\/. If you've\ndeveloped a plugin before and want to upgrade it to Pico 2.0, refer to the\n[upgrade section of the docs][PluginUpgrade].\n\n## Config\n\nConfiguring Pico really is stupidly simple: Just create a `config\/config.yml`\nto override the default Pico settings (and add your own custom settings). Take\na look at the `config\/config.yml.template` for a brief overview of the\navailable settings and their defaults. To override a setting, simply copy the\nline from `config\/config.yml.template` to `config\/config.yml` and set your\ncustom value.\n\nBut we didn't stop there. Rather than having just a single config file, you can\nuse a arbitrary number of config files. Simply create a `.yml` file in Pico's\n`config` dir and you're good to go. This allows you to add some structure to\nyour config, like a separate config file for your theme (`config\/my_theme.yml`).\n\nPlease note that Pico loads config files in a special way you should be aware\nof. First of all it loads the main config file `config\/config.yml`, and then\nany other `*.yml` file in Pico's `config` dir in alphabetical order. The file\norder is crucial: Config values which have been set already, cannot be\noverwritten by a succeeding file. For example, if you set `site_title: Pico` in\n`config\/a.yml` and `site_title: My awesome site!` in `config\/b.yml`, your site\ntitle will be \"Pico\".\n\n## Documentation\n\nFor more help have a look at the Pico documentation at http:\/\/picocms.org\/docs.\n\n[Pico]: http:\/\/picocms.org\/\n[PicoTheme]: https:\/\/github.com\/picocms\/pico-theme\n[App]: https:\/\/apps.nextcloud.com\/apps\/cms_pico\n[SampleContents]: https:\/\/github.com\/picocms\/Pico\/tree\/master\/content-sample\n[Markdown]: http:\/\/daringfireball.net\/projects\/markdown\/syntax\n[MarkdownExtra]: https:\/\/michelf.ca\/projects\/php-markdown\/extra\/\n[YAML]: https:\/\/en.wikipedia.org\/wiki\/YAML\n[Twig]: http:\/\/twig.sensiolabs.org\/documentation\n[UnixTimestamp]: https:\/\/en.wikipedia.org\/wiki\/Unix_timestamp\n[Composer]: https:\/\/getcomposer.org\/\n[FeaturesHttpParams]: http:\/\/picocms.org\/in-depth\/features\/http-params\/\n[FeaturesPageTree]: http:\/\/picocms.org\/in-depth\/features\/page-tree\/\n[FeaturesPagesFunction]: http:\/\/picocms.org\/in-depth\/features\/pages-function\/\n[WikiThemes]: https:\/\/github.com\/picocms\/Pico\/wiki\/Pico-Themes\n[WikiPlugins]: https:\/\/github.com\/picocms\/Pico\/wiki\/Pico-Plugins\n[OfficialThemes]: http:\/\/picocms.org\/themes\/\n[PluginUpgrade]: http:\/\/picocms.org\/development\/#upgrade\n"
]
},
{
"file":"\/var\/www\/html\/custom_apps\/cms_pico\/lib\/Pico.php",
"line":211,
"function":"parseFileContent",
"class":"Pico",
"type":"->",
"args":[
"\n## Welcome to Pico\n\n![Nextcloud Logo](\/apps\/cms_pico\/pico\/tutorials\/assets-5debf17150d7a\/image.png)\n\nCongratulations, you have successfully installed [Pico CMS for Nextcloud][App],\nutilizing [Pico][] 2.1.0. Pico is a stupidly simple, blazing fast, flat file CMS. <!-- replaced by the above Description header -->\n\n## Creating Content\n\nPico is a flat file CMS. This means there is no administration backend or\ndatabase to deal with. You simply create `.md` files in the `content` folder\nand those files become your pages. For example, this file is called `index.md`\nand is shown as the main landing page.\n\nWhen you install Pico, it comes with some sample contents that will display\nuntil you add your own content. Simply add some `.md` files to your `content`\nfolder in Pico's root directory. No configuration is required, Pico will\nautomatically use the `content` folder as soon as you create your own\n`index.md`. Just check out [Pico's sample contents][SampleContents] for an\nexample!\n\nIf you create a folder within the content directory (e.g. `content\/sub`) and\nput an `index.md` inside it, you can access that folder at the URL\n`\/apps\/cms_pico\/pico\/tutorials\/sub`. If you want another page within the sub folder, simply create\na text file with the corresponding name and you will be able to access it\n(e.g. `content\/sub\/page.md` is accessible from the URL `\/apps\/cms_pico\/pico\/tutorials\/sub\/page`).\nBelow we've shown some examples of locations and their corresponding URLs:\n\n<table style=\"width: 100%; max-width: 40em;\">\n <thead>\n <tr>\n <th style=\"width: 50%;\">Physical Location<\/th>\n <th style=\"width: 50%;\">URL<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <tr>\n <td>content\/index.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\">\/<\/a><\/td>\n <\/tr>\n <tr>\n <td>content\/sub.md<\/td>\n <td><del>?sub<\/del> (not accessible, see below)<\/td>\n <\/tr>\n <tr>\n <td>content\/sub\/index.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/sub\">?sub<\/a> (same as above)<\/td>\n <\/tr>\n <tr>\n <td>content\/sub\/page.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/sub\/page\">?sub\/page<\/a><\/td>\n <\/tr>\n <tr>\n <td>content\/theme.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/theme\">?theme<\/a> (hidden in menu)<\/td>\n <\/tr>\n <tr>\n <td>content\/a\/very\/long\/url.md<\/td>\n <td>\n <a href=\"\/apps\/cms_pico\/pico\/tutorials\/a\/very\/long\/url\">?a\/very\/long\/url<\/a>\n (doesn't exist)\n <\/td>\n <\/tr>\n <\/tbody>\n<\/table>\n\nIf a file cannot be found, the file `content\/404.md` will be shown. You can add\n`404.md` files to any directory. So, for example, if you wanted to use a special\nerror page for your blog, you could simply create `content\/blog\/404.md`.\n\nPico strictly separates contents of your website (the Markdown files in your\n`content` directory) and how these contents should be displayed (the Twig\ntemplates in your `themes` directory). However, not every file in your `content`\ndirectory might actually be a distinct page. For example, some themes (including\nPico's default theme) use some special \"hidden\" file to manage meta data (like\n`_meta.md` in Pico's sample contents). Some other themes use a `_footer.md` to\nrepresent the contents of the website's footer. The common point is the `_`: all\nfiles and directories prefixed by a `_` in your `content` directory are hidden.\nThese pages can't be accessed from a web browser, Pico will show a 404 error\npage instead.\n\nAs a common practice, we recommend you to separate your contents and assets\n(like images, downloads, etc.). We even deny access to your `content` directory\nby default. If you want to use some assets (e.g. a image) in one of your content\nfiles, use Pico's `assets` folder. You can then access them in your Markdown\nusing the <code>&#37;assets_url&#37;<\/code> placeholder, for example:\n<code>!\\[Image Title\\](&#37;assets_url&#37;\/image.png)<\/code>\n\n### Text File Markup\n\nText files are marked up using [Markdown][] and [Markdown Extra][MarkdownExtra].\nThey can also contain regular HTML.\n\nAt the top of text files you can place a block comment and specify certain meta\nattributes of the page using [YAML][] (the \"YAML header\"). For example:\n\n ---\n Title: Welcome\n Description: This description will go in the meta description tag\n Author: Joe Bloggs\n Date: 2001-04-25\n Robots: noindex,nofollow\n Template: index\n ---\n\nThese values will be contained in the `{{ meta }}` variable in themes (see\nbelow). Meta headers sometimes have a special meaning: For instance, Pico not\nonly passes through the `Date` meta header, but rather evaluates it to really\n\"understand\" when this page was created. This comes into play when you want to\nsort your pages not just alphabetically, but by date. Another example is the\n`Template` meta header: It controls what Twig template Pico uses to display\nthis page (e.g. if you add `Template: blog`, Pico uses `blog.twig`).\n\nIn an attempt to separate contents and styling, we recommend you to not use\ninline CSS in your Markdown files. You should rather add appropriate CSS\nclasses to your theme. For example, you might want to add some CSS classes to\nyour theme to rule how much of the available space a image should use (e.g.\n`img.small { width: 80%; }`). You can then use these CSS classes in your\nMarkdown files, for example:\n<code>!\\[Image Title\\](&#37;assets_url&#37;\/image.png) {.small}<\/code>\n\nThere are also certain variables that you can use in your text files:\n\n* <code>&#37;site_title&#37;<\/code> - The title of your Pico site\n* <code>&#37;base_url&#37;<\/code> - The URL to your Pico site; internal links\n can be specified using <code>&#37;base_url&#37;?sub\/page<\/code>\n* <code>&#37;theme_url&#37;<\/code> - The URL to the currently used theme\n* <code>&#37;assets_url&#37;<\/code> - The URL to Pico's `assets` directory\n* <code>&#37;themes_url&#37;<\/code> - The URL to Pico's `themes` directory;\n don't confuse this with <code>&#37;theme_url&#37;<\/code>\n* <code>&#37;plugins_url&#37;<\/code> - The URL to Pico's `plugins` directory\n* <code>&#37;version&#37;<\/code> - Pico's current version string (e.g. `2.0.0`)\n* <code>&#37;meta.&#42;&#37;<\/code> - Access any meta variable of the current\n page, e.g. <code>&#37;meta.author&#37;<\/code> is replaced with `Joe Bloggs`\n* <code>&#37;config.&#42;&#37;<\/code> - Access any scalar config variable,\n e.g. <code>&#37;config.theme&#37;<\/code> is replaced with `default`\n\n### Blogging\n\nPico is not blogging software - but makes it very easy for you to use it as a\nblog. You can find many plugins out there implementing typical blogging\nfeatures like authentication, tagging, pagination and social plugins. See the\nbelow Plugins section for details.\n\nIf you want to use Pico as a blogging software, you probably want to do\nsomething like the following:\n\n1. Put all your blog articles in a separate `blog` folder in your `content`\n directory. All these articles should have a `Date` meta header.\n2. Create a `blog.md` or `blog\/index.md` in your `content` directory. Add\n `Template: blog-index` to the YAML header of this page. It will later show a\n list of all your blog articles (see step 3).\n3. Create the new Twig template `blog-index.twig` (the file name must match the\n `Template` meta header from Step 2) in your theme directory. This template\n probably isn't very different from your default `index.twig` (i.e. copy\n `index.twig`), it will create a list of all your blog articles. Add the\n following Twig snippet to `blog-index.twig` near `{{ content }}`:\n ```\n {% for page in pages(\"blog\")|sort_by(\"time\")|reverse if not page.hidden %}\n <div class=\"post\">\n <h3><a href=\"{{ page.url }}\">{{ page.title }}<\/a><\/h3>\n <p class=\"date\">{{ page.date_formatted }}<\/p>\n <p class=\"excerpt\">{{ page.description }}<\/p>\n <\/div>\n {% endfor %}\n ```\n\n## Customization\n\nPico is highly customizable in two different ways: On the one hand you can\nchange Pico's appearance by using themes, on the other hand you can add new\nfunctionality by using plugins. Doing the former includes changing Pico's HTML,\nCSS and JavaScript, the latter mostly consists of PHP programming.\n\nThis is all Greek to you? Don't worry, you don't have to spend time on these\ntechie talk - it's very easy to use one of the great themes or plugins others\ndeveloped and released to the public. Please refer to the next sections for\ndetails.\n\n### Themes\n\nYou can create themes for your Pico installation in the `themes` folder. Pico\nuses [Twig][] for template rendering. You can select your theme by setting the\n`theme` option in `config\/config.yml` to the name of your theme folder.\n\n[Pico's default theme][PicoTheme] isn't really intended to be used for a\nproductive website, it's rather a starting point for creating your own theme.\nIf the default theme isn't sufficient for you, and you don't want to create\nyour own theme, you can use one of the great themes third-party developers and\ndesigners created in the past. As with plugins, you can find themes in\n[our Wiki][WikiThemes] and on [our website][OfficialThemes].\n\nAll themes must include an `index.twig` file to define the HTML structure of\nthe theme, and a `pico-theme.yml` to set the necessary config parameters. Just\nrefer to Pico's default theme as an example. You can use different templates\nfor different content files by specifying the `Template` meta header. Simply\nadd e.g. `Template: blog` to the YAML header of a content file and Pico will\nuse the `blog.twig` template in your theme folder to display the page.\n\nBelow are the Twig variables that are available to use in themes. Please note\nthat URLs (e.g. `{{ base_url }}`) never include a trailing slash.\n\n* `{{ site_title }}` - Shortcut to the site title (see `config\/config.yml`)\n* `{{ config }}` - Contains the values you set in `config\/config.yml`\n (e.g. `{{ config.theme }}` becomes `default`)\n* `{{ base_url }}` - The URL to your Pico site; use Twig's `link` filter to\n specify internal links (e.g. `{{ \"sub\/page\"|link }}`),\n this guarantees that your link works whether URL rewriting\n is enabled or not\n* `{{ theme_url }}` - The URL to the currently active theme\n* `{{ assets_url }}` - The URL to Pico's `assets` directory\n* `{{ themes_url }}` - The URL to Pico's `themes` directory; don't confuse this\n with `{{ theme_url }}`\n* `{{ plugins_url }}` - The URL to Pico's `plugins` directory\n* `{{ version }}` - Pico's current version string (e.g. `2.1.0`)\n* `{{ meta }}` - Contains the meta values of the current page\n * `{{ meta.title }}` - The `Title` YAML header\n * `{{ meta.description }}` - The `Description` YAML header\n * `{{ meta.author }}` - The `Author` YAML header\n * `{{ meta.date }}` - The `Date` YAML header\n * `{{ meta.date_formatted }}` - The formatted date of the page as specified\n by the `date_format` parameter in your\n `config\/config.yml`\n * `{{ meta.time }}` - The [Unix timestamp][UnixTimestamp] derived from the\n `Date` YAML header\n * `{{ meta.robots }}` - The `Robots` YAML header\n * ...\n* `{{ content }}` - The content of the current page after it has been processed\n through Markdown\n* `{{ previous_page }}` - The data of the previous page, relative to\n `current_page`\n* `{{ current_page }}` - The data of the current page; refer to the \"Pages\"\n section below for details\n* `{{ next_page }}` - The data of the next page, relative to `current_page`\n\nTo call assets from your theme, use `{{ theme_url }}`. For instance, to include\nthe CSS file `themes\/my_theme\/example.css`, add\n`<link rel=\"stylesheet\" href=\"{{ theme_url }}\/example.css\" type=\"text\/css\" \/>`\nto your `index.twig`. This works for arbitrary files in your theme's folder,\nincluding images and JavaScript files.\n\nPlease note that Twig escapes HTML in all strings before outputting them. So\nfor example, if you add `headline: My <strong>favorite<\/strong> color` to the\nYAML header of a page and output it using `{{ meta.headline }}`, you'll end up\nseeing `My <strong>favorite<\/strong> color` - yes, including the markup! To\nactually get it parsed, you must use `{{ meta.headline|raw }}` (resulting in\nthe expected <code>My **favorite** color<\/code>). Notable exceptions to this\nare Pico's `content` variable (e.g. `{{ content }}`), Pico's `content` filter\n(e.g. `{{ \"sub\/page\"|content }}`), and Pico's `markdown` filter, they all are\nmarked as HTML safe.\n\n#### Dealing with pages\n\nThere are several ways to access Pico's pages list. You can access the current\npage's data using the `current_page` variable, or use the `prev_page` and\/or\n`next_page` variables to access the respective previous\/next page in Pico's\npages list. But more importantly there's the `pages()` function. No matter how\nyou access a page, it will always consist of the following data:\n\n* `{{ id }}` - The relative path to the content file (unique ID)\n* `{{ url }}` - The URL to the page\n* `{{ title }}` - The title of the page (`Title` YAML header)\n* `{{ description }}` - The description of the page (`Description` YAML header)\n* `{{ author }}` - The author of the page (`Author` YAML header)\n* `{{ date }}` - The date of the page (`Date` YAML header)\n* `{{ date_formatted }}` - The formatted date of the page as specified by the\n `date_format` parameter in your `config\/config.yml`\n* `{{ time }}` - The [Unix timestamp][UnixTimestamp] derived from the page's\n date\n* `{{ raw_content }}` - The raw, not yet parsed contents of the page; use the\n filter to get the parsed contents of a page by passing\n its unique ID (e.g. `{{ \"sub\/page\"|content }}`)\n* `{{ meta }}` - The meta values of the page (see global `{{ meta }}` above)\n* `{{ prev_page }}` - The data of the respective previous page\n* `{{ next_page }}` - The data of the respective next page\n* `{{ tree_node }}` - The page's node in Pico's page tree; check out Pico's\n [page tree documentation][FeaturesPageTree] for details\n\nPico's `pages()` function is the best way to access all of your site's pages.\nIt uses Pico's page tree to easily traverse a subset of Pico's pages list. It\nallows you to filter pages and to build recursive menus (like dropdowns). By\ndefault, `pages()` returns a list of all main pages (e.g. `content\/page.md` and\n`content\/sub\/index.md`, but not `content\/sub\/page.md` or `content\/index.md`).\nIf you want to return all pages below a specific folder (e.g. `content\/blog\/`),\npass the folder name as first parameter to the function (e.g. `pages(\"blog\")`).\nNaturally you can also pass variables to the function. For example, to return a\nlist of all child pages of the current page, use `pages(current_page.id)`.\nCheck out the following code snippet:\n\n <section class=\"articles\">\n {% for page in pages(current_page.id) if not page.hidden %}\n <article>\n <h2><a href=\"{{ page.url }}\">{{ page.title }}<\/a><\/h2>\n {{ page.id|content }}\n <\/article>\n {% endfor %}\n <\/section>\n\nThe `pages()` function is very powerful and also allows you to return not just\na page's child pages by passing the `depth` and `depthOffset` params. For\nexample, if you pass `pages(depthOffset=-1)`, the list will also include Pico's\nmain index page (i.e. `content\/index.md`). This one is commonly used to create\na theme's main navigation. If you want to learn more, head over to Pico's\ncomplete [`pages()` function documentation][FeaturesPagesFunction].\n\nIf you want to access the data of a particular page, use Pico's `pages`\nvariable. Just take `content\/_meta.md` in Pico's sample contents for an\nexample: `content\/_meta.md` contains some meta data you might want to use in\nyour theme. If you want to output the page's `tagline` meta value, use\n`{{ pages[\"_meta\"].meta.logo }}`. Don't ever try to use Pico's `pages` variable\nas an replacement for Pico's `pages()` function. Its usage looks very similar,\nit will kinda work and you might even see it being used in old themes, but be\nwarned: It slows down Pico. Always use Pico's `pages()` function when iterating\nPico's page list (e.g. `{% for page in pages() %}\u2026{% endfor %}`).\n\n#### Twig filters and functions\n\nAdditional to [Twig][]'s extensive list of filters, functions and tags, Pico\nalso provides some useful additional filters and functions to make theming\neven easier.\n\n* Pass the unique ID of a page to the `link` filter to return the page's URL\n (e.g. `{{ \"sub\/page\"|link }}` gets `\/apps\/cms_pico\/pico\/tutorials\/sub\/page`).\n* You can replace URL placeholders (like <code>&#37;base_url&#37;<\/code>) in\n arbitrary strings using the `url` filter. This is helpful together with meta\n variables, e.g. if you add <code>image: &#37;assets_url&#37;\/stock.jpg<\/code>\n to the YAML header of a page, `{{ meta.image|url }}` will return\n `\/apps\/cms_pico\/pico\/tutorials\/assets-5debf17150d7a\/stock.jpg`.\n* To get the parsed contents of a page, pass its unique ID to the `content`\n filter (e.g. `{{ \"sub\/page\"|content }}`).\n* You can parse any Markdown string using the `markdown` filter. For example,\n you might use Markdown in the `description` meta variable and later parse it\n in your theme using `{{ meta.description|markdown }}`. You can also pass meta\n data as parameter to replace <code>&#37;meta.&#42;&#37;<\/code> placeholders\n (e.g. `{{ \"Written by **\"|markdown(meta) }}` yields \"Written by\n *John Doe*\"). However, please note that all contents will be wrapped inside\n HTML paragraph elements (i.e. `<p>\u2026<\/p>`). If you want to parse just a single\n line of Markdown markup, pass the `singleLine` param to the `markdown` filter\n (e.g. `{{ \"This really is a *single* line\"|markdown(singleLine=true) }}`).\n* Arrays can be sorted by one of its keys using the `sort_by` filter\n (e.g. `{% for page in pages|sort_by([ 'meta', 'nav' ]) %}...{% endfor %}`\n iterates through all pages, ordered by the `nav` meta header; please note the\n `[ 'meta', 'nav' ]` part of the example, it instructs Pico to sort by\n `page.meta.nav`). Items which couldn't be sorted are moved to the bottom of\n the array; you can specify `bottom` (move items to bottom; default), `top`\n (move items to top), `keep` (keep original order) or `remove` (remove items)\n as second parameter to change this behavior.\n* You can return all values of a given array key using the `map` filter\n (e.g. `{{ pages|map(\"title\") }}` returns all page titles).\n* Use the `url_param` and `form_param` Twig functions to access HTTP GET (i.e.\n a URL's query string like `?some-variable=my-value`) and HTTP POST (i.e. data\n of a submitted form) parameters. This allows you to implement things like\n pagination, tags and categories, dynamic pages, and even more - with pure\n Twig! Simply head over to our [introductory page for accessing HTTP\n parameters][FeaturesHttpParams] for details.\n\n### Plugins\n\n#### Plugins for users\n\nOfficially tested plugins can be found at http:\/\/picocms.org\/plugins\/, but\nthere are many awesome third-party plugins out there! A good start point for\ndiscovery is [our Wiki][WikiPlugins].\n\nPico makes it very easy for you to add new features to your website using\nplugins. Just like Pico, you can install plugins either using [Composer][]\n(e.g. `composer require phrozenbyte\/pico-file-prefixes`), or manually by\nuploading the plugin's file (just for small plugins consisting of a single file,\ne.g. `PicoFilePrefixes.php`) or directory (e.g. `PicoFilePrefixes`) to your\n`plugins` directory. We always recommend you to use Composer whenever possible,\nbecause it makes updating both Pico and your plugins way easier. Anyway,\ndepending on the plugin you want to install, you may have to go through some\nmore steps (e.g. specifying config variables) to make the plugin work. Thus you\nshould always check out the plugin's docs or `README.md` file to learn the\nnecessary steps.\n\nPlugins which were written to work with Pico 1.0 and later can be enabled and\ndisabled through your `config\/config.yml`. If you want to e.g. disable the\n`PicoDeprecated` plugin, add the following line to your `config\/config.yml`:\n`PicoDeprecated.enabled: false`. To force the plugin to be enabled, replace\n`false` by `true`.\n\n#### Plugins for developers\n\nYou're a plugin developer? We love you guys! You can find tons of information\nabout how to develop plugins at http:\/\/picocms.org\/development\/. If you've\ndeveloped a plugin before and want to upgrade it to Pico 2.0, refer to the\n[upgrade section of the docs][PluginUpgrade].\n\n## Config\n\nConfiguring Pico really is stupidly simple: Just create a `config\/config.yml`\nto override the default Pico settings (and add your own custom settings). Take\na look at the `config\/config.yml.template` for a brief overview of the\navailable settings and their defaults. To override a setting, simply copy the\nline from `config\/config.yml.template` to `config\/config.yml` and set your\ncustom value.\n\nBut we didn't stop there. Rather than having just a single config file, you can\nuse a arbitrary number of config files. Simply create a `.yml` file in Pico's\n`config` dir and you're good to go. This allows you to add some structure to\nyour config, like a separate config file for your theme (`config\/my_theme.yml`).\n\nPlease note that Pico loads config files in a special way you should be aware\nof. First of all it loads the main config file `config\/config.yml`, and then\nany other `*.yml` file in Pico's `config` dir in alphabetical order. The file\norder is crucial: Config values which have been set already, cannot be\noverwritten by a succeeding file. For example, if you set `site_title: Pico` in\n`config\/a.yml` and `site_title: My awesome site!` in `config\/b.yml`, your site\ntitle will be \"Pico\".\n\n## Documentation\n\nFor more help have a look at the Pico documentation at http:\/\/picocms.org\/docs.\n\n[Pico]: http:\/\/picocms.org\/\n[PicoTheme]: https:\/\/github.com\/picocms\/pico-theme\n[App]: https:\/\/apps.nextcloud.com\/apps\/cms_pico\n[SampleContents]: https:\/\/github.com\/picocms\/Pico\/tree\/master\/content-sample\n[Markdown]: http:\/\/daringfireball.net\/projects\/markdown\/syntax\n[MarkdownExtra]: https:\/\/michelf.ca\/projects\/php-markdown\/extra\/\n[YAML]: https:\/\/en.wikipedia.org\/wiki\/YAML\n[Twig]: http:\/\/twig.sensiolabs.org\/documentation\n[UnixTimestamp]: https:\/\/en.wikipedia.org\/wiki\/Unix_timestamp\n[Composer]: https:\/\/getcomposer.org\/\n[FeaturesHttpParams]: http:\/\/picocms.org\/in-depth\/features\/http-params\/\n[FeaturesPageTree]: http:\/\/picocms.org\/in-depth\/features\/page-tree\/\n[FeaturesPagesFunction]: http:\/\/picocms.org\/in-depth\/features\/pages-function\/\n[WikiThemes]: https:\/\/github.com\/picocms\/Pico\/wiki\/Pico-Themes\n[WikiPlugins]: https:\/\/github.com\/picocms\/Pico\/wiki\/Pico-Plugins\n[OfficialThemes]: http:\/\/picocms.org\/themes\/\n[PluginUpgrade]: http:\/\/picocms.org\/development\/#upgrade\n",
false
]
},
{
"file":"\/var\/www\/html\/custom_apps\/cms_pico\/vendor\/picocms\/pico\/lib\/Pico.php",
"line":486,
"function":"parseFileContent",
"class":"OCA\\CMSPico\\Pico",
"type":"->",
"args":[
"\n## Welcome to Pico\n\n![Nextcloud Logo](\/apps\/cms_pico\/pico\/tutorials\/assets-5debf17150d7a\/image.png)\n\nCongratulations, you have successfully installed [Pico CMS for Nextcloud][App],\nutilizing [Pico][] 2.1.0. Pico is a stupidly simple, blazing fast, flat file CMS. <!-- replaced by the above Description header -->\n\n## Creating Content\n\nPico is a flat file CMS. This means there is no administration backend or\ndatabase to deal with. You simply create `.md` files in the `content` folder\nand those files become your pages. For example, this file is called `index.md`\nand is shown as the main landing page.\n\nWhen you install Pico, it comes with some sample contents that will display\nuntil you add your own content. Simply add some `.md` files to your `content`\nfolder in Pico's root directory. No configuration is required, Pico will\nautomatically use the `content` folder as soon as you create your own\n`index.md`. Just check out [Pico's sample contents][SampleContents] for an\nexample!\n\nIf you create a folder within the content directory (e.g. `content\/sub`) and\nput an `index.md` inside it, you can access that folder at the URL\n`\/apps\/cms_pico\/pico\/tutorials\/sub`. If you want another page within the sub folder, simply create\na text file with the corresponding name and you will be able to access it\n(e.g. `content\/sub\/page.md` is accessible from the URL `\/apps\/cms_pico\/pico\/tutorials\/sub\/page`).\nBelow we've shown some examples of locations and their corresponding URLs:\n\n<table style=\"width: 100%; max-width: 40em;\">\n <thead>\n <tr>\n <th style=\"width: 50%;\">Physical Location<\/th>\n <th style=\"width: 50%;\">URL<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <tr>\n <td>content\/index.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\">\/<\/a><\/td>\n <\/tr>\n <tr>\n <td>content\/sub.md<\/td>\n <td><del>?sub<\/del> (not accessible, see below)<\/td>\n <\/tr>\n <tr>\n <td>content\/sub\/index.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/sub\">?sub<\/a> (same as above)<\/td>\n <\/tr>\n <tr>\n <td>content\/sub\/page.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/sub\/page\">?sub\/page<\/a><\/td>\n <\/tr>\n <tr>\n <td>content\/theme.md<\/td>\n <td><a href=\"\/apps\/cms_pico\/pico\/tutorials\/theme\">?theme<\/a> (hidden in menu)<\/td>\n <\/tr>\n <tr>\n <td>content\/a\/very\/long\/url.md<\/td>\n <td>\n <a href=\"\/apps\/cms_pico\/pico\/tutorials\/a\/very\/long\/url\">?a\/very\/long\/url<\/a>\n (doesn't exist)\n <\/td>\n <\/tr>\n <\/tbody>\n<\/table>\n\nIf a file cannot be found, the file `content\/404.md` will be shown. You can add\n`404.md` files to any directory. So, for example, if you wanted to use a special\nerror page for your blog, you could simply create `content\/blog\/404.md`.\n\nPico strictly separates contents of your website (the Markdown files in your\n`content` directory) and how these contents should be displayed (the Twig\ntemplates in your `themes` directory). However, not every file in your `content`\ndirectory might actually be a distinct page. For example, some themes (including\nPico's default theme) use some special \"hidden\" file to manage meta data (like\n`_meta.md` in Pico's sample contents). Some other themes use a `_footer.md` to\nrepresent the contents of the website's footer. The common point is the `_`: all\nfiles and directories prefixed by a `_` in your `content` directory are hidden.\nThese pages can't be accessed from a web browser, Pico will show a 404 error\npage instead.\n\nAs a common practice, we recommend you to separate your contents and assets\n(like images, downloads, etc.). We even deny access to your `content` directory\nby default. If you want to use some assets (e.g. a image) in one of your content\nfiles, use Pico's `assets` folder. You can then access them in your Markdown\nusing the <code>&#37;assets_url&#37;<\/code> placeholder, for example:\n<code>!\\[Image Title\\](&#37;assets_url&#37;\/image.png)<\/code>\n\n### Text File Markup\n\nText files are marked up using [Markdown][] and [Markdown Extra][MarkdownExtra].\nThey can also contain regular HTML.\n\nAt the top of text files you can place a block comment and specify certain meta\nattributes of the page using [YAML][] (the \"YAML header\"). For example:\n\n ---\n Title: Welcome\n Description: This description will go in the meta description tag\n Author: Joe Bloggs\n Date: 2001-04-25\n Robots: noindex,nofollow\n Template: index\n ---\n\nThese values will be contained in the `{{ meta }}` variable in themes (see\nbelow). Meta headers sometimes have a special meaning: For instance, Pico not\nonly passes through the `Date` meta header, but rather evaluates it to really\n\"understand\" when this page was created. This comes into play when you want to\nsort your pages not just alphabetically, but by date. Another example is the\n`Template` meta header: It controls what Twig template Pico uses to display\nthis page (e.g. if you add `Template: blog`, Pico uses `blog.twig`).\n\nIn an attempt to separate contents and styling, we recommend you to not use\ninline CSS in your Markdown files. You should rather add appropriate CSS\nclasses to your theme. For example, you might want to add some CSS classes to\nyour theme to rule how much of the available space a image should use (e.g.\n`img.small { width: 80%; }`). You can then use these CSS classes in your\nMarkdown files, for example:\n<code>!\\[Image Title\\](&#37;assets_url&#37;\/image.png) {.small}<\/code>\n\nThere are also certain variables that you can use in your text files:\n\n* <code>&#37;site_title&#37;<\/code> - The title of your Pico site\n* <code>&#37;base_url&#37;<\/code> - The URL to your Pico site; internal links\n can be specified using <code>&#37;base_url&#37;?sub\/page<\/code>\n* <code>&#37;theme_url&#37;<\/code> - The URL to the currently used theme\n* <code>&#37;assets_url&#37;<\/code> - The URL to Pico's `assets` directory\n* <code>&#37;themes_url&#37;<\/code> - The URL to Pico's `themes` directory;\n don't confuse this with <code>&#37;theme_url&#37;<\/code>\n* <code>&#37;plugins_url&#37;<\/code> - The URL to Pico's `plugins` directory\n* <code>&#37;version&#37;<\/code> - Pico's current version string (e.g. `2.0.0`)\n* <code>&#37;meta.&#42;&#37;<\/code> - Access any meta variable of the current\n page, e.g. <code>&#37;meta.author&#37;<\/code> is replaced with `Joe Bloggs`\n* <code>&#37;config.&#42;&#37;<\/code> - Access any scalar config variable,\n e.g. <code>&#37;config.theme&#37;<\/code> is replaced with `default`\n\n### Blogging\n\nPico is not blogging software - but makes it very easy for you to use it as a\nblog. You can find many plugins out there implementing typical blogging\nfeatures like authentication, tagging, pagination and social plugins. See the\nbelow Plugins section for details.\n\nIf you want to use Pico as a blogging software, you probably want to do\nsomething like the following:\n\n1. Put all your blog articles in a separate `blog` folder in your `content`\n directory. All these articles should have a `Date` meta header.\n2. Create a `blog.md` or `blog\/index.md` in your `content` directory. Add\n `Template: blog-index` to the YAML header of this page. It will later show a\n list of all your blog articles (see step 3).\n3. Create the new Twig template `blog-index.twig` (the file name must match the\n `Template` meta header from Step 2) in your theme directory. This template\n probably isn't very different from your default `index.twig` (i.e. copy\n `index.twig`), it will create a list of all your blog articles. Add the\n following Twig snippet to `blog-index.twig` near `{{ content }}`:\n ```\n {% for page in pages(\"blog\")|sort_by(\"time\")|reverse if not page.hidden %}\n <div class=\"post\">\n <h3><a href=\"{{ page.url }}\">{{ page.title }}<\/a><\/h3>\n <p class=\"date\">{{ page.date_formatted }}<\/p>\n <p class=\"excerpt\">{{ page.description }}<\/p>\n <\/div>\n {% endfor %}\n ```\n\n## Customization\n\nPico is highly customizable in two different ways: On the one hand you can\nchange Pico's appearance by using themes, on the other hand you can add new\nfunctionality by using plugins. Doing the former includes changing Pico's HTML,\nCSS and JavaScript, the latter mostly consists of PHP programming.\n\nThis is all Greek to you? Don't worry, you don't have to spend time on these\ntechie talk - it's very easy to use one of the great themes or plugins others\ndeveloped and released to the public. Please refer to the next sections for\ndetails.\n\n### Themes\n\nYou can create themes for your Pico installation in the `themes` folder. Pico\nuses [Twig][] for template rendering. You can select your theme by setting the\n`theme` option in `config\/config.yml` to the name of your theme folder.\n\n[Pico's default theme][PicoTheme] isn't really intended to be used for a\nproductive website, it's rather a starting point for creating your own theme.\nIf the default theme isn't sufficient for you, and you don't want to create\nyour own theme, you can use one of the great themes third-party developers and\ndesigners created in the past. As with plugins, you can find themes in\n[our Wiki][WikiThemes] and on [our website][OfficialThemes].\n\nAll themes must include an `index.twig` file to define the HTML structure of\nthe theme, and a `pico-theme.yml` to set the necessary config parameters. Just\nrefer to Pico's default theme as an example. You can use different templates\nfor different content files by specifying the `Template` meta header. Simply\nadd e.g. `Template: blog` to the YAML header of a content file and Pico will\nuse the `blog.twig` template in your theme folder to display the page.\n\nBelow are the Twig variables that are available to use in themes. Please note\nthat URLs (e.g. `{{ base_url }}`) never include a trailing slash.\n\n* `{{ site_title }}` - Shortcut to the site title (see `config\/config.yml`)\n* `{{ config }}` - Contains the values you set in `config\/config.yml`\n (e.g. `{{ config.theme }}` becomes `default`)\n* `{{ base_url }}` - The URL to your Pico site; use Twig's `link` filter to\n specify internal links (e.g. `{{ \"sub\/page\"|link }}`),\n this guarantees that your link works whether URL rewriting\n is enabled or not\n* `{{ theme_url }}` - The URL to the currently active theme\n* `{{ assets_url }}` - The URL to Pico's `assets` directory\n* `{{ themes_url }}` - The URL to Pico's `themes` directory; don't confuse this\n with `{{ theme_url }}`\n* `{{ plugins_url }}` - The URL to Pico's `plugins` directory\n* `{{ version }}` - Pico's current version string (e.g. `2.1.0`)\n* `{{ meta }}` - Contains the meta values of the current page\n * `{{ meta.title }}` - The `Title` YAML header\n * `{{ meta.description }}` - The `Description` YAML header\n * `{{ meta.author }}` - The `Author` YAML header\n * `{{ meta.date }}` - The `Date` YAML header\n * `{{ meta.date_formatted }}` - The formatted date of the page as specified\n by the `date_format` parameter in your\n `config\/config.yml`\n * `{{ meta.time }}` - The [Unix timestamp][UnixTimestamp] derived from the\n `Date` YAML header\n * `{{ meta.robots }}` - The `Robots` YAML header\n * ...\n* `{{ content }}` - The content of the current page after it has been processed\n through Markdown\n* `{{ previous_page }}` - The data of the previous page, relative to\n `current_page`\n* `{{ current_page }}` - The data of the current page; refer to the \"Pages\"\n section below for details\n* `{{ next_page }}` - The data of the next page, relative to `current_page`\n\nTo call assets from your theme, use `{{ theme_url }}`. For instance, to include\nthe CSS file `themes\/my_theme\/example.css`, add\n`<link rel=\"stylesheet\" href=\"{{ theme_url }}\/example.css\" type=\"text\/css\" \/>`\nto your `index.twig`. This works for arbitrary files in your theme's folder,\nincluding images and JavaScript files.\n\nPlease note that Twig escapes HTML in all strings before outputting them. So\nfor example, if you add `headline: My <strong>favorite<\/strong> color` to the\nYAML header of a page and output it using `{{ meta.headline }}`, you'll end up\nseeing `My <strong>favorite<\/strong> color` - yes, including the markup! To\nactually get it parsed, you must use `{{ meta.headline|raw }}` (resulting in\nthe expected <code>My **favorite** color<\/code>). Notable exceptions to this\nare Pico's `content` variable (e.g. `{{ content }}`), Pico's `content` filter\n(e.g. `{{ \"sub\/page\"|content }}`), and Pico's `markdown` filter, they all are\nmarked as HTML safe.\n\n#### Dealing with pages\n\nThere are several ways to access Pico's pages list. You can access the current\npage's data using the `current_page` variable, or use the `prev_page` and\/or\n`next_page` variables to access the respective previous\/next page in Pico's\npages list. But more importantly there's the `pages()` function. No matter how\nyou access a page, it will always consist of the following data:\n\n* `{{ id }}` - The relative path to the content file (unique ID)\n* `{{ url }}` - The URL to the page\n* `{{ title }}` - The title of the page (`Title` YAML header)\n* `{{ description }}` - The description of the page (`Description` YAML header)\n* `{{ author }}` - The author of the page (`Author` YAML header)\n* `{{ date }}` - The date of the page (`Date` YAML header)\n* `{{ date_formatted }}` - The formatted date of the page as specified by the\n `date_format` parameter in your `config\/config.yml`\n* `{{ time }}` - The [Unix timestamp][UnixTimestamp] derived from the page's\n date\n* `{{ raw_content }}` - The raw, not yet parsed contents of the page; use the\n filter to get the parsed contents of a page by passing\n its unique ID (e.g. `{{ \"sub\/page\"|content }}`)\n* `{{ meta }}` - The meta values of the page (see global `{{ meta }}` above)\n* `{{ prev_page }}` - The data of the respective previous page\n* `{{ next_page }}` - The data of the respective next page\n* `{{ tree_node }}` - The page's node in Pico's page tree; check out Pico's\n [page tree documentation][FeaturesPageTree] for details\n\nPico's `pages()` function is the best way to access all of your site's pages.\nIt uses Pico's page tree to easily traverse a subset of Pico's pages list. It\nallows you to filter pages and to build recursive menus (like dropdowns). By\ndefault, `pages()` returns a list of all main pages (e.g. `content\/page.md` and\n`content\/sub\/index.md`, but not `content\/sub\/page.md` or `content\/index.md`).\nIf you want to return all pages below a specific folder (e.g. `content\/blog\/`),\npass the folder name as first parameter to the function (e.g. `pages(\"blog\")`).\nNaturally you can also pass variables to the function. For example, to return a\nlist of all child pages of the current page, use `pages(current_page.id)`.\nCheck out the following code snippet:\n\n <section class=\"articles\">\n {% for page in pages(current_page.id) if not page.hidden %}\n <article>\n <h2><a href=\"{{ page.url }}\">{{ page.title }}<\/a><\/h2>\n {{ page.id|content }}\n <\/article>\n {% endfor %}\n <\/section>\n\nThe `pages()` function is very powerful and also allows you to return not just\na page's child pages by passing the `depth` and `depthOffset` params. For\nexample, if you pass `pages(depthOffset=-1)`, the list will also include Pico's\nmain index page (i.e. `content\/index.md`). This one is commonly used to create\na theme's main navigation. If you want to learn more, head over to Pico's\ncomplete [`pages()` function documentation][FeaturesPagesFunction].\n\nIf you want to access the data of a particular page, use Pico's `pages`\nvariable. Just take `content\/_meta.md` in Pico's sample contents for an\nexample: `content\/_meta.md` contains some meta data you might want to use in\nyour theme. If you want to output the page's `tagline` meta value, use\n`{{ pages[\"_meta\"].meta.logo }}`. Don't ever try to use Pico's `pages` variable\nas an replacement for Pico's `pages()` function. Its usage looks very similar,\nit will kinda work and you might even see it being used in old themes, but be\nwarned: It slows down Pico. Always use Pico's `pages()` function when iterating\nPico's page list (e.g. `{% for page in pages() %}\u2026{% endfor %}`).\n\n#### Twig filters and functions\n\nAdditional to [Twig][]'s extensive list of filters, functions and tags, Pico\nalso provides some useful additional filters and functions to make theming\neven easier.\n\n* Pass the unique ID of a page to the `link` filter to return the page's URL\n (e.g. `{{ \"sub\/page\"|link }}` gets `\/apps\/cms_pico\/pico\/tutorials\/sub\/page`).\n* You can replace URL placeholders (like <code>&#37;base_url&#37;<\/code>) in\n arbitrary strings using the `url` filter. This is helpful together with meta\n variables, e.g. if you add <code>image: &#37;assets_url&#37;\/stock.jpg<\/code>\n to the YAML header of a page, `{{ meta.image|url }}` will return\n `\/apps\/cms_pico\/pico\/tutorials\/assets-5debf17150d7a\/stock.jpg`.\n* To get the parsed contents of a page, pass its unique ID to the `content`\n filter (e.g. `{{ \"sub\/page\"|content }}`).\n* You can parse any Markdown string using the `markdown` filter. For example,\n you might use Markdown in the `description` meta variable and later parse it\n in your theme using `{{ meta.description|markdown }}`. You can also pass meta\n data as parameter to replace <code>&#37;meta.&#42;&#37;<\/code> placeholders\n (e.g. `{{ \"Written by **\"|markdown(meta) }}` yields \"Written by\n *John Doe*\"). However, please note that all contents will be wrapped inside\n HTML paragraph elements (i.e. `<p>\u2026<\/p>`). If you want to parse just a single\n line of Markdown markup, pass the `singleLine` param to the `markdown` filter\n (e.g. `{{ \"This really is a *single* line\"|markdown(singleLine=true) }}`).\n* Arrays can be sorted by one of its keys using the `sort_by` filter\n (e.g. `{% for page in pages|sort_by([ 'meta', 'nav' ]) %}...{% endfor %}`\n iterates through all pages, ordered by the `nav` meta header; please note the\n `[ 'meta', 'nav' ]` part of the example, it instructs Pico to sort by\n `page.meta.nav`). Items which couldn't be sorted are moved to the bottom of\n the array; you can specify `bottom` (move items to bottom; default), `top`\n (move items to top), `keep` (keep original order) or `remove` (remove items)\n as second parameter to change this behavior.\n* You can return all values of a given array key using the `map` filter\n (e.g. `{{ pages|map(\"title\") }}` returns all page titles).\n* Use the `url_param` and `form_param` Twig functions to access HTTP GET (i.e.\n a URL's query string like `?some-variable=my-value`) and HTTP POST (i.e. data\n of a submitted form) parameters. This allows you to implement things like\n pagination, tags and categories, dynamic pages, and even more - with pure\n Twig! Simply head over to our [introductory page for accessing HTTP\n parameters][FeaturesHttpParams] for details.\n\n### Plugins\n\n#### Plugins for users\n\nOfficially tested plugins can be found at http:\/\/picocms.org\/plugins\/, but\nthere are many awesome third-party plugins out there! A good start point for\ndiscovery is [our Wiki][WikiPlugins].\n\nPico makes it very easy for you to add new features to your website using\nplugins. Just like Pico, you can install plugins either using [Composer][]\n(e.g. `composer require phrozenbyte\/pico-file-prefixes`), or manually by\nuploading the plugin's file (just for small plugins consisting of a single file,\ne.g. `PicoFilePrefixes.php`) or directory (e.g. `PicoFilePrefixes`) to your\n`plugins` directory. We always recommend you to use Composer whenever possible,\nbecause it makes updating both Pico and your plugins way easier. Anyway,\ndepending on the plugin you want to install, you may have to go through some\nmore steps (e.g. specifying config variables) to make the plugin work. Thus you\nshould always check out the plugin's docs or `README.md` file to learn the\nnecessary steps.\n\nPlugins which were written to work with Pico 1.0 and later can be enabled and\ndisabled through your `config\/config.yml`. If you want to e.g. disable the\n`PicoDeprecated` plugin, add the following line to your `config\/config.yml`:\n`PicoDeprecated.enabled: false`. To force the plugin to be enabled, replace\n`false` by `true`.\n\n#### Plugins for developers\n\nYou're a plugin developer? We love you guys! You can find tons of information\nabout how to develop plugins at http:\/\/picocms.org\/development\/. If you've\ndeveloped a plugin before and want to upgrade it to Pico 2.0, refer to the\n[upgrade section of the docs][PluginUpgrade].\n\n## Config\n\nConfiguring Pico really is stupidly simple: Just create a `config\/config.yml`\nto override the default Pico settings (and add your own custom settings). Take\na look at the `config\/config.yml.template` for a brief overview of the\navailable settings and their defaults. To override a setting, simply copy the\nline from `config\/config.yml.template` to `config\/config.yml` and set your\ncustom value.\n\nBut we didn't stop there. Rather than having just a single config file, you can\nuse a arbitrary number of config files. Simply create a `.yml` file in Pico's\n`config` dir and you're good to go. This allows you to add some structure to\nyour config, like a separate config file for your theme (`config\/my_theme.yml`).\n\nPlease note that Pico loads config files in a special way you should be aware\nof. First of all it loads the main config file `config\/config.yml`, and then\nany other `*.yml` file in Pico's `config` dir in alphabetical order. The file\norder is crucial: Config values which have been set already, cannot be\noverwritten by a succeeding file. For example, if you set `site_title: Pico` in\n`config\/a.yml` and `site_title: My awesome site!` in `config\/b.yml`, your site\ntitle will be \"Pico\".\n\n## Documentation\n\nFor more help have a look at the Pico documentation at http:\/\/picocms.org\/docs.\n\n[Pico]: http:\/\/picocms.org\/\n[PicoTheme]: https:\/\/github.com\/picocms\/pico-theme\n[App]: https:\/\/apps.nextcloud.com\/apps\/cms_pico\n[SampleContents]: https:\/\/github.com\/picocms\/Pico\/tree\/master\/content-sample\n[Markdown]: http:\/\/daringfireball.net\/projects\/markdown\/syntax\n[MarkdownExtra]: https:\/\/michelf.ca\/projects\/php-markdown\/extra\/\n[YAML]: https:\/\/en.wikipedia.org\/wiki\/YAML\n[Twig]: http:\/\/twig.sensiolabs.org\/documentation\n[UnixTimestamp]: https:\/\/en.wikipedia.org\/wiki\/Unix_timestamp\n[Composer]: https:\/\/getcomposer.org\/\n[FeaturesHttpParams]: http:\/\/picocms.org\/in-depth\/features\/http-params\/\n[FeaturesPageTree]: http:\/\/picocms.org\/in-depth\/features\/page-tree\/\n[FeaturesPagesFunction]: http:\/\/picocms.org\/in-depth\/features\/pages-function\/\n[WikiThemes]: https:\/\/github.com\/picocms\/Pico\/wiki\/Pico-Themes\n[WikiPlugins]: https:\/\/github.com\/picocms\/Pico\/wiki\/Pico-Plugins\n[OfficialThemes]: http:\/\/picocms.org\/themes\/\n[PluginUpgrade]: http:\/\/picocms.org\/development\/#upgrade\n"
]
},
{
"file":"\/var\/www\/html\/custom_apps\/cms_pico\/lib\/Pico.php",
"line":104,
"function":"run",
"class":"Pico",
"type":"->",
"args":[
]
},
{
"file":"\/var\/www\/html\/custom_apps\/cms_pico\/lib\/Service\/PicoService.php",
"line":147,
"function":"run",
"class":"OCA\\CMSPico\\Pico",
"type":"->",
"args":[
]
},
{
"file":"\/var\/www\/html\/custom_apps\/cms_pico\/lib\/Service\/WebsitesService.php",
"line":282,
"function":"getPage",
"class":"OCA\\CMSPico\\Service\\PicoService",
"type":"->",
"args":[
{
"__class__":"OCA\\CMSPico\\Model\\Website"
}
]
},
{
"file":"\/var\/www\/html\/custom_apps\/cms_pico\/lib\/Controller\/PicoController.php",
"line":108,
"function":"getPage",
"class":"OCA\\CMSPico\\Service\\WebsitesService",
"type":"->",
"args":[
"tutorials",
"",
"<REDACTED>",
false
]
},
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Http\/Dispatcher.php",
"line":170,
"function":"getPage",
"class":"OCA\\CMSPico\\Controller\\PicoController",
"type":"->",
"args":[
"tutorials",
"",
false
]
},
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Http\/Dispatcher.php",
"line":99,
"function":"executeController",
"class":"OC\\AppFramework\\Http\\Dispatcher",
"type":"->",
"args":[
{
"__class__":"OCA\\CMSPico\\Controller\\PicoController"
},
"getPage"
]
},
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/App.php",
"line":126,
"function":"dispatch",
"class":"OC\\AppFramework\\Http\\Dispatcher",
"type":"->",
"args":[
{
"__class__":"OCA\\CMSPico\\Controller\\PicoController"
},
"getPage"
]
},
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php",
"line":47,
"function":"main",
"class":"OC\\AppFramework\\App",
"type":"::",
"args":[
"OCA\\CMSPico\\Controller\\PicoController",
"getPage",
{
"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"
},
{
"page":"",
"site":"tutorials",
"_route":"cms_pico.Pico.getPage"
}
]
},
{
"function":"__invoke",
"class":"OC\\AppFramework\\Routing\\RouteActionHandler",
"type":"->",
"args":[
{
"page":"",
"site":"tutorials",
"_route":"cms_pico.Pico.getPage"
}
]
},
{
"file":"\/var\/www\/html\/lib\/private\/Route\/Router.php",
"line":297,
"function":"call_user_func",
"args":[
{
"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"
},
{
"page":"",
"site":"tutorials",
"_route":"cms_pico.Pico.getPage"
}
]
},
{
"file":"\/var\/www\/html\/lib\/base.php",
"line":1000,
"function":"match",
"class":"OC\\Route\\Router",
"type":"->",
"args":[
"\/apps\/cms_pico\/pico\/tutorials"
]
},
{
"file":"\/var\/www\/html\/index.php",
"line":42,
"function":"handleRequest",
"class":"OC",
"type":"::",
"args":[
]
}
],
"File":"\/var\/www\/html\/custom_apps\/cms_pico\/vendor\/erusev\/parsedown-extra\/ParsedownExtra.php",
"Line":46
},
"CustomMessage":"--"
},
"userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko\/20100101 Firefox\/70.0",
"version":"17.0.1.1"
}{
"reqId":"KhxEMtVO5yGu1w0lWyGY",
"level":0,
"time":"2019-12-07T18:48:06+00:00",
"remoteAddr":"<REDACTED>",
"user":"<REDACTED>",
"app":"core",
"method":"GET",
"url":"\/index.php\/apps\/terms_of_service\/terms",
"message":{
"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\CrossSiteRequestForgeryException",
"Message":"CSRF check failed",
"Code":412,
"Trace":[
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Middleware\/MiddlewareDispatcher.php",
"line":95,
"function":"beforeController",
"class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware",
"type":"->",
"args":[
{
"__class__":"OCA\\TermsOfService\\Controller\\TermsController"
},
"index"
]
},
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Http\/Dispatcher.php",
"line":97,
"function":"beforeController",
"class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher",
"type":"->",
"args":[
{
"__class__":"OCA\\TermsOfService\\Controller\\TermsController"
},
"index"
]
},
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/App.php",
"line":126,
"function":"dispatch",
"class":"OC\\AppFramework\\Http\\Dispatcher",
"type":"->",
"args":[
{
"__class__":"OCA\\TermsOfService\\Controller\\TermsController"
},
"index"
]
},
{
"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php",
"line":47,
"function":"main",
"class":"OC\\AppFramework\\App",
"type":"::",
"args":[
"OCA\\TermsOfService\\Controller\\TermsController",
"index",
{
"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"
},
{
"_route":"terms_of_service.terms.index"
}
]
},
{
"function":"__invoke",
"class":"OC\\AppFramework\\Routing\\RouteActionHandler",
"type":"->",
"args":[
{
"_route":"terms_of_service.terms.index"
}
]
},
{
"file":"\/var\/www\/html\/lib\/private\/Route\/Router.php",
"line":297,
"function":"call_user_func",
"args":[
{
"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"
},
{
"_route":"terms_of_service.terms.index"
}
]
},
{
"file":"\/var\/www\/html\/lib\/base.php",
"line":1000,
"function":"match",
"class":"OC\\Route\\Router",
"type":"->",
"args":[
"\/apps\/terms_of_service\/terms"
]
},
{
"file":"\/var\/www\/html\/index.php",
"line":42,
"function":"handleRequest",
"class":"OC",
"type":"::",
"args":[
]
}
],
"File":"\/var\/www\/html\/lib\/private\/AppFramework\/Middleware\/Security\/SecurityMiddleware.php",
"Line":173,
"CustomMessage":"--"
},
"userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko\/20100101 Firefox\/70.0",
"version":"17.0.1.1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment