YunoHost-Apps / pelican_ynh

Pelican package for Yunohost
https://blog.getpelican.com/
GNU Affero General Public License v3.0
4 stars 2 forks source link

Improve UX to upload and edit source files #11

Open lucyferu opened 1 year ago

lucyferu commented 1 year ago

Describe the bug

it's not a bug, but more a simple question i think should have already been answered by the readme. how do i upload/update my website? my_webapp create a custom user through which i can upload stuff in the related /var/www/ directory. pelican doesn't provide something like that. does it mean i have to access the folder with root every time? that doesn't seem right and, on top of that, straightforward to me. i've tried to ask for help on the forum, but the answers stopped.

Context

Steps to reproduce

  1. installed Pelican on a subdomain
  2. checked for info on the readme on how to use it
  3. asked for help in the forum
  4. still wondering about it

Expected behavior

at least a single line sentence on how to use it as for my_webapp.

jsonoctopus commented 1 year ago

@lucyferu

how do i upload/update my website?

For Yunohost the Pelican files are in /var/www/pelican with pelican as user and group www-data. You can make your sftp user have the same uid as the pelican user (because the pelican user has no shell). Not a beautiful solution but it should work.

I read in the Pelican documentation that for updating the conversion from Markdown to html a cronjob can be made so that there is no need to ssh in and run that command manually. For Pelican itself, and how to use it see the documentation : https://docs.getpelican.com/en/latest/

tituspijean commented 1 year ago

Discussion (in French) on the forum (https://forum.yunohost.org/t/suite-installation-pelican-ssh-et-wireguard/25318/4), where I draft up a tutorial to integrate Pelican with Nextcloud. We might be able to include that in the app. Consider also the SFTP permission.

lucyferu commented 10 months ago

Discussion (in French) on the forum (https://forum.yunohost.org/t/suite-installation-pelican-ssh-et-wireguard/25318/4), where I draft up a tutorial to integrate Pelican with Nextcloud. We might be able to include that in the app. Consider also the SFTP permission.

i finally got around to do this and it worked. thank you very much. ❤️

the tutorial was easy to follow and straight-forward and your comments were very clear.

i have one question though. now i have the content folder of pelican that i can access through my nextcloud to add content. but what if i want to change theme, layout and whatnot? can i just make every needed folder available through nextcloud and edit them there?

isAAAc commented 8 months ago

on my side,
i just edit in content/ some *.md files,
and then publish with ./venv/bin/pelican content -o output -s pelicanconf.py

silverhook commented 7 months ago

Discussion (in French) on the forum (https://forum.yunohost.org/t/suite-installation-pelican-ssh-et-wireguard/25318/4), where I draft up a tutorial to integrate Pelican with Nextcloud. We might be able to include that in the app. Consider also the SFTP permission.

That is a cool approach. I would very much like to see that implemented in the app.

If I understand the way the Pelican app works currently, it’s actually not possible to run more than one Pelican app on YunoHost at the same time, since the content/work folder is hardcoded.

My pre-Yuno approach on a much weaker server was a cronjob and a check if there is new content.

Since I plan to use Nextcloud to sync the content folder from my laptop to the server, I’m toying with the idea to use the Flow feature of it, but I haven’t figured out yet how (or even if) that would work.

tituspijean commented 7 months ago

If I understand the way the Pelican app works currently, it’s actually not possible to run more than one Pelican app on YunoHost at the same time, since the content/work folder is hardcoded.

That is incorrect. Work folder is $install_dir in the scripts, which is /var/www/$app with $app being the app ID.

silverhook commented 7 months ago

If I understand the way the Pelican app works currently, it’s actually not possible to run more than one Pelican app on YunoHost at the same time, since the content/work folder is hardcoded.

That is incorrect. Work folder is $install_dir in the scripts, which is /var/www/$app with $app being the app ID.

That is good to know, thanks. I assumed that /var/www/pelican was hardcoded.