PhrozenByte
Repos
63
Followers
35
Following
3

Pico is a stupidly simple, blazing fast, flat file CMS.

3615
602

🗃 Integrate Pico CMS and let your users manage their own websites

109
37

Put files (and directories) in trash using the `trash-put` command in a way that is, otherwise as `trash-put` itself, compatible to GNUs `rm` and `rmdir`

251
24

FreeDesktop.org-compatible notification service to periodically ask for acknowledgement before executing a cronjob.

4
0

Provides various array-related PHPUnit assertions, primarily used for API testing.

6
0

Provides various Throwable-related PHPUnit assertions.

1
0

Events

podman cannot start containers using `36.20220906.3.2`, but can with `36.20220820.3.0`

See containers/storage#1308, maybe its related.

containers/storage#1308 seems to be about running multiple containers using the same image, but I don't do that and still encounter this issue with 36.20220918.3.0. The error message is the same as in containers/storage#1308 though and slightly different from @ibotty's:

[    9.110800] overlayfs: POSIX ACLs are not yet supported with idmapped layers, mounting without ACL support.
[    9.435100] overlayfs: failed to resolve '/var/lib/containers/storage/overlay/f2761b92efa71f4dcd11378fc58891b5fbc4b4373cac4f0eedfee2902f4c5b50/mapped/0/l/HOTNAYERIZLT6DLBLTTQHX7T2V': -13

Affects rootful containers only, rootless containers work just fine. Anyway, it still might be the same issue, just a different trigger. Too bad we don't have the patch in FCOS yet. Once again rolling back to 36.20220820.3.0 for now...

Created at 13 hours ago
issue comment
Self-closing img tag

Why is because it's better html.

Even though <img></img> is valid XHTML, it actually is invalid HTML5:

Void elements only have a start tag; end tags must not be specified for void elements.

– Source: https://html.spec.whatwg.org/multipage/syntax.html#elements-2

Start tags must have the following format: … 6. Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single U+002F SOLIDUS character (/). This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing.

– Source: https://html.spec.whatwg.org/multipage/syntax.html#start-tags

Simply put: <img></img> is invalid HTML5, it must either be <img> (i.e. without a closing tag, but this is invalid XHTML), or <img /> (both valid XHTML and HTML5). So I'd recommend not to do stuff like that. <img /> is perfectly fine.

Anyway, you could extend Parsedown to transform your Markdown to whatever you like - or simply add the plain (X)HTML in your Markdown files.

Created at 17 hours ago
issue comment
Self-closing img tag

What is a "self-closing img tag" (<img />?) and why do you want to change its behaviour?

Created at 20 hours ago
issue comment
Google doesn't find my website

Unfortunately we can't really help you with your SEO, simply because Pico can't really do anything about it. It's all up to you, your theme and your contents.

However, here are a few quick tips: Google doesn't necessarily pick up new websites immediately. You might want to improve your chances by hinting Google about your website using Google's Search Console. Furthermore you might wanna add a sitemap, see e.g. phrozenbyte/pico-robots.

Created at 3 days ago
issue comment
REQ: limit Pico to groups!!!!!!

This feature exists already.

By the way: You should add a few more exclamation marks.

Created at 3 days ago
closed issue
REQ: limit Pico to groups!!!!!!

every user can create a web site, or access a menu to do so it's confusing for the users not involve in this task

please, add the limit to group in the App list :D

Created at 3 days ago
reopened issue
Target Blank

First of all, thank you for this great add-on to Nextcloud !

I'm trying to set some links with target blank to open them in new tabs/new windows.

I found some answer about how to handle it in Markdown, but it doesn't seem to work with CMS Pico in Nextcloud: https://stackoverflow.com/questions/4425198/can-i-create-links-with-target-blank-in-markdown

I did try [text](url){:target="_blank"} as suggested in the link above, however it ignores what's after the url and shows it as text.

Created at 1 week ago
issue comment
Target Blank

@sm8ps HTMLPurifier doesn't allow this by default. However, target="_blank" yields no threats in our scenario, so we should add it to the allow list. Thus I'm transforming this issue to an suggestion.

Created at 1 week ago
reopened issue
Pico 2.1.4 problem with Pico.php / strftime

Hello!!

Sorry for bothering, I wouldn't if I could find a solution by my own.

I am trying to install the new Pico 2.1.4 on Apache2 in Ubuntu 20.04. Everything is ok until I upload the index.md file. Then I get a white screen.

The Apache error logs points to Pico.php

[Mon Sep 05 22:00:52.876940 2022] [php:error] [pid 79888] [client XXXX.XXXX.XXXX.XXXX:XXXXX] 
PHP Fatal error:  Uncaught TypeError: strftime(): 
Argument #2 ($timestamp) must be of type ?int, string given in /..../pico/vendor/picocms/pico/lib/Pico.php:1527\n
Stack trace:\n
#0 /.../pico/vendor/picocms/pico/lib/Pico.php(1527): strftime()\n
#1 /.../pico/vendor/picocms/pico/lib/Pico.php(1760): Pico->parseFileMeta()\n
#2 /..../pico/vendor/picocms/pico/lib/Pico.php(493): Pico->readPages()\n
#3 /..../pico/index.php(33): Pico->run()\n#4 {main}\n  
thrown in /.../pico/vendor/picocms/pico/lib/Pico.php on line 1527

The date format I am using is the most common in Spain and Latin America date_format: '%d/%m/%Y'. I had some problems before with Pico page ordering, but I could solve them hacking a little bit the Pagination plugin to accept the data format. But this time it is not solvable with a touch in a plugin, it is a core issue...

Could you help me, please? Thanks a lot in advance!!

PS. If you are asking yourself about how I changed the Pagination plugin (which is independent of the problem now becasue I have not uploaded the pagination plugin and I am using the default theme) it was just a little change:

....
	// if filter_date is true, it filters so only dated items are returned.
		
		
		if ($this->config['filter_date']) {
			$show_pages = array();
			foreach($pages as $key=>$page) {
			
				if ($page['date']) {
				
					
					$page['nuevafecha'] = str_replace("/", ".", $page[date]);
					$page['nuevafecha'] = strtotime($page['nuevafecha']);
					$page['nuevafecha'] = date("Y-m-d", $page['nuevafecha']);
					
					$show_pages[$key] = $page; 
				}
			}
		} else {
			$show_pages = $pages;
		}
		// get total pages before show_pages is sliced
....
Created at 1 week ago
issue comment
%base_url% placeholder

This is expected behaviour in Pico CMS for Nextcloud, just as with Nextcloud. Browsers use the current host as default.

Created at 1 week ago
issue comment
Pico 2.1.4 problem with Pico.php / strftime

Looks like Maya's time is very limited and she has no free capacities to coordinate things right now. So, if you still want to help @maximalista, you might wanna start with the existing docs, or with porting new themes? :heart: You find our online docs here, and in Pico's content-sample dir. Neither the existing docs, nor theme development require much coordination with @mayamcdougall for now :+1:

Created at 1 week ago
issue comment
API call with CSRF check failed

Whether CSRF protection is required or not doesn't depend on the HTTP method used, but on whether state is changed or not. Even though it is true that the Websites#getPersonalWebsites route currently doesn't change state and thus doesn't require CSRF protection, it still yields the burden that this will never change in the future. Again, this is no public API and is not intended to be exploited as public API. Nextcloud provides an OCS API for a reason. If you need a public API, I'm very happy to accept any pull request implementing a public API if you're willing to take responsibility for it in future versions :+1:

Created at 2 weeks ago
issue comment
API call with CSRF check failed

We're very happy to accept pull requests if you're willing to take responsibility for it in future versions :+1:

Created at 2 weeks ago
issue comment
API call with CSRF check failed

Pico CMS for Nextcloud provides no public API. However, you can surely write your own stuff, but don't expect the API to be stable, it might change at any point. You'll have to acquire a CSRF token the same way as with any other Nextcloud App, nothing special here.

Created at 2 weeks ago
closed issue
Delete this issue please

Delete this issue please

Created at 2 weeks ago
issue comment
Uncertain about how to import a custom theme

To clarify my question: Is it possible for a theme to define custom variables in pico-theme.yml and how can they be accessed in the Twig-files?

Yes. Config variables in pico-theme.yml are merged into $config['theme_config'], accessible in Twig via e.g. {{ config.theme_config.my_custom_config_variable }}. However, since this theme doesn't seem to know about pico-theme.yml, it was probably written for an older Pico version and rather expects this config file to be placed in Pico's global config dir below appdata_*/cms_pico/config (i.e. affecting all themes).

Created at 2 weeks ago

LimeSurvey encryption setup: add code comment to explain failure reasoning

Preserve LimeSurvey's 'upload' directory on upgrades

Created at 2 weeks ago
issue comment
Unable to change date_format

You can change the default date_format in /var/nextcloud_data/appdata_*/cms_pico/config/config.yml (check config.yml.template for all options available)

Created at 3 weeks ago
issue comment
Pico 2.1.4 problem with Pico.php / strftime

Glad to hear that @maximalista :smiley:

Another helping hand is very welcome! :+1: If you're not really confident in programming, you might want to help improving our docs.

Our docs aren't the best, because they were mostly written by programmers. Programmers like myself aren't the best people for writing docs for non-developers I'm afraid. :see_no_evil: @mayamcdougall started rewriting most of the docs from scratch, but her time is very limited too. I'm sure she's very glad about any help. Most of her work can be found in her rewrite branch. Maybe Maya can give some hints where you could help?

I'm sure that a rewrite from scratch can look a bit overwhelming. If you don't want to take such a deep dive into the docs, you could skim through the existing docs to see where stuff can be improved more gradually. It's quite simple: If you don't understand it at first glance, then it isn't written well and needs improvement. Same is true for stuff you didn't find easily when you started experimenting with Pico. Improving the docs gradually is very welcome, too! :+1:

Besides, adapting new themes is always welcome, too. The more templates, the more attractive Pico gets. :+1: This can even be combined with improving the docs: We don't really have any developers docs right now. So, if you want to, you might wanna start with writing some (theme) developers docs? There's no need to even mention plugins, you can focus entirely on themes if you want to. This doesn't have to be "the definitive guide" either, just explaining the basics would be a huge improvement.

Created at 3 weeks ago
issue comment
Pico CMS is unable to show a flowchart

Please follow the instructions in the Pico CMS for Nextcloud admin interface; don't edit files in custom_apps/cms_pico/appdata_public.

Created at 3 weeks ago
reopened issue
Pico CMS is unable to show a flowchart

1662692595067 1662692634725

Pico CMS shows the web page, although can normally display Markdown syntax, but can not normally render Mermaid and flow syntax. Unable to show flow chart

Created at 3 weeks ago
issue comment
Pico CMS is unable to show a flowchart

This won't work in Pico CMS for Nextcloud for security reasons. You must add Mermaid's JavaScript sources to your theme, i.e. create a custom theme using the admin interface, download Mermaid's sources and add them to data/appdata_*/cms_pico/themes/my_custom_theme (load it using <script src="{{ theme_url }}/js/mermaid.min.js"> or similar) and then reload the theme sources using the admin interface again.

Created at 3 weeks ago
issue comment
Pico 2.1.4 problem with Pico.php / strftime

Modifying the PHP sources can be tricky, I'd not recommend doing this. Try upgrading to v3.0.0-alpha.2. Don't worry the "alpha", it's stable, you just have to take some precautions (namely the same as when upgrading from v2.1) when the final v3.0.0 is released. This should solve the Unparenthesized a ? b : c ? d : e error. The later Unable to find template "single.twig" error is about Twig being unable to find the template simple.twig. Make sure that there actually is a simple.twig in your theme and that PHP can read that file (i.e. check file permissions).

Created at 3 weeks ago
issue comment
Pico 2.1.4 problem with Pico.php / strftime

Somehow the time meta value receives a non-empty string as input. Did you add

---
time: some_string
---

to any of your pages?

Created at 4 weeks ago
closed issue
pico cms无法展示流程图

image image

pico cms制作的站点网页,虽然能正常显示markdown的语法,但是没法正常渲染mermaid和flow的流程图出来。

Created at 4 weeks ago
issue comment
pico cms无法展示流程图

I'm afraid we can't provide any support in languages other than English, sorry.

Created at 4 weeks ago

Add support for persistent encryption

Remove environment-variable-based configuration

Configuring secrets using environment variables is pretty bad, because it allows any process to access these secrets. You should rather use file-based secrets.

Created at 1 month ago

Add LimeSurvey upgrade routine

Created at 1 month ago
create branch
PhrozenByte create branch main
Created at 1 month ago
create repository
PhrozenByte create repository
Created at 1 month ago