Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.75k stars 313 forks source link

Documentation improvement - RawPedia replacement #6999

Open Entropy512 opened 5 months ago

Entropy512 commented 5 months ago

Since https://discuss.pixls.us/t/an-update-on-rawpedia/34168/43 often falls by the wayside and people forget about it, perhaps it might be beneficial to track the issue here.

A quick summary of the issue(s):

In general it seemed like the response to the concept was positive for all involved

The proposed solution was hugo backed by a gitlab or github repository, which has the following advantages:

Rough task list would be:

Other than the "get dump from server" tasks and "move to organizational namespace" tasks, I'm volunteering to start working on this. I've spent some time learning hugo already and really need to learn Github-action-foo, and I'm finally mostly recovered from the mental health issues that had me not really work on anything RT-related (or frankly much else) for over a year. (Hopefully I'll have some treatment for suspected but as-yet-undiagnosed ADHD in a bit over a week, which should also help significantly with me stopping the procrastinating and actually DOING something. :) )

Issues that need to have solutions discussed (some of this came up in the linked Pixls discussion):

TechXavAL commented 5 months ago

I've been learning a bit of how Hugo works, and I wish to share some thoughts about it and websites in general.

From what I understand the idea is that a user should only worry about writing markdown, and a bunch of parameters in the frontmatter (Hugo's file metadata).

Given that and the suggestion to not use plain HTML within markdown, next are some points to think about.

Whenever you read «must», «should», «have to» or the likes, read all of them as suggestions, as those are only my personal point of view about them.

1- About Hugo:

2- About the website users, a.k.a. the page editors:

3- About content:

4- About the website itself:

There is a good amount of decissions to be made when building a theme, which will constrain the way the website is managed. A theme developer may decide how everything should work, but afterwards everybody should feel happy with it: site maintainers have little work to do, content creators have a relatively easy task with markdown, and the site readers have a smooth experience with the site.

As a last note, the easier the content can be created, and the easier the site can be maintained, the more work for the theme creator because more and more things must be coded to automate features. So, if you want an easy experience with the site, with Hugo you have to carefully craft the theme.

Lawrence37 commented 5 months ago

@patdavid FYI


That person shouldn't edit the site configuration, ever, but that leads to a site maintainer having to write a new menu entry linking to that page in the site config. Shouldn't it be automated creating the menu entry some other way?

The website automatically adds news articles and download links, so I assume it will be possible to automate it for RawPedia.

they are left with markdown, which is not ideal to add content to usual websites.

I see that MediaWiki markup has image captions. What else is missing from markdown that markup has?

TechXavAL commented 5 months ago

The website automatically adds news articles and download links

I'm not sure I understand this. Do you mean the current RawPedia website? If so, the links present in the homepage, those that may be more or less felt as a menu, are not automatically generated, if I remember correctly. They have to be typed by hand, instead.

In a Hugo website, it is indeed possible to automatically generate links to new pages, but how they will be shown depends on how the menu is designed. I've managed to automatically create a menu with all the links (pages) present in a website, but it quickly gets huge if you show the links to all the pages of the site.

In my opinion, the menu design should be carefully designed to show the essential links while still giving a good user experience (too many links means too many page scrolls to find the desired link, and that's bad user experience).

What else is missing from markdown that markup has?

As a reference, take a look at this Hugo thread. (As a side note, jmooring is a main contributor). There, it is clearly stated that markdown only has provision for a title tag, which is rendered as the image tooltip. There is no way to add image captions with plain markdown.

This is the way mediawiki encodes images: [[File:filename.extension|options|caption]]

And this is how Hugo encodes images: ![alt text](/path/to/image.extension "title")

The reason why I say images should have captions is explained in this website (among others).

At RawPedia, most of the images show an example of what's being explained in the text, so it makes sense (if it's not a real need) some caption explaining why that image is linked to the text.

The usual approach, as far as I've seen, is using shortcodes, either to add custom addons to an image, or to use the figure html tag. It's not that difficult, there are lots of examples out there, but the user writing content should be aware of the existence of such shortcodes, somehow.

If needed I can save a webpage (html file) showing what can be done with plain markdown and share it here. Not too fancy styling though, and it's written in Spanish... (Sorry, no live website available).

Entropy512 commented 5 months ago

It looks like it may be possible to implement captioning in Hugo - https://sebastiandedeyne.com/captioned-images-with-markdown-render-hooks-in-hugo/ is one possible approach.

Obviously there is going to be a lot of experimentation involved in this process. Ideally we'd get a dump (via @patdavid ? - not sure why attempting to @ him doesn't autocomplete properly... I only see patdavid-test...) to fiddle with as an experiment.

Lawrence37 commented 5 months ago

@TechXavAL I'm referring to the RawTherapee website (www.rawtherapee.com). The News and Downloads pages are automatically generated from the articles in the news and downloads directories. In this merge request, I added a news article on the updated macOS build. Note that there are only two files: the new news article and some edits to the 5.10 download page. I did not need to manually add anything to www.rawtherapee.com/news/.

TechXavAL commented 5 months ago

@Lawrence37

Ok. Sorry I didn't get it. I thought we were talking about mediawiki all the time... And yes, that's a Hugo feature when integrated with git (github, gitlab, ...).

Now let me distinguish between several concepts:

So, to rephrase my previous comments about the menu:

@Entropy512

Yes, that's one approach, but let's not put the cart before the horse. The requirements, what is needed about images must be defined prior to seeking for solutions. Same strategy for everything in the website.

In my opinion that's a quick and easy solution for captions, but is hacky and doesn't solve all problems. You replace one tag for another, and in the end you are doing mostly the same work as you would with a shortcode.

In everyday content creation you need to add an image, an explanation of what you see in the image, the author of the image, the source url of the image, and the original licensing of the image. You know, it's a must, because that's what is currently required at RawPedia (well, maybe the explanation is not required). And that falls completely outside markdown capabilities.

By the way, with that solution all the images in RawPedia will look the same, and will link to the same image. That is, for large displays you need a large, heavy image, and for small displays like smartphones you will download the same large image. And you won't be able to use css class selectors to change the position, appeareance or size of the image. That's fine if that's what you want. What I say is that you should be clear about what you want or need prior to code anything.

Entropy512 commented 5 months ago

The requirements, what is needed about images must be defined prior to seeking for solutions.

Writing a requirements document without a thorough understanding of the potential solution space is a paper tiger - a waste of time because you wind up writing a requirements document that cannot be met by any viable solution. So you wind up throwing away a bunch of your requirements because they turned out to be unrealistic. Our solution space is already limited - must be free and open source, must be mostly off the shelf with low amounts of customization (no touching core code, only data and ancillary scripts such as JavaScript macros, etc.)

As to the worries about whether a rawpedia replacement is mobile-friendly - given that rawpedia is the document for an application which has no support whatsoever for mobile devices, I really don't think there's that much benefit in worrying about mobile devices. Anyone using the software is going to have a full desktop browser at their disposal. Obviously mobile friendliness is a nice-to-have here if it can be achieved without significant compromises but I really don't see smartphone friendliness being a hard requirement for the documentation site for something that is not going to ever run on a smartphone or even a tablet in the foreseeable future. At least the Hugo theme I've poked at in the past (ReLearn) handles mobile layout well, with the only limitation being no mobile-specific image resizing. Not like Rawpedia handles that well - it serves a smaller thumbnail (300 pixels wide) to my desktop for images on the Exposure page than to my phone (600 pixels wide)

Note that right now my focus is on rawpedia. The website might have its own issues (and THAT is a case where mobile friendliness is more likely to be of benefit) but that should be kept to a separate discussion to avoid confusion. Perhaps in the future if both are using Hugo there will be a way to integrate the two, although so far looking over in darktable-land, that hasn't happened. I do agree that the lack of images in dtdocs is something that we don't want to follow, but I think there are plenty of solutions to that issue.

My biggest concern still is the issue of image storage - LFS and github are not a good mix. Linking to external image hosting is theoretically possible but that winds up with some of the same challenges rawpedia has (access management, etc). Not sure if the solution might be a self-hosted git repository on pixls infrastructure? LFS itself isn't bad, the problem is Github's pricing for LFS. I wouldn't be as concerned about the 1GB limit except that it seems like every single clone of the repo gets counted against your transfer (BAD for a public FOSS project) and any image that gets removed/replace remains in LFS as part of history.

TechXavAL commented 5 months ago

It seems to me that there's always a middle point..., but anyway.

Just to say things quickly:

For image storage, maybe coolify could be a solution for self-managed, open-source, hosting server?

Entropy512 commented 5 months ago

Yup, those look good to me. I'm open to suggestions on documentation-specific themes, but it's my opinion that "ReLearn" seems to be the closest in layout to MediaWiki of the options in https://themes.gohugo.io/tags/docs/ but maybe I missed another option. I think there's definitely value in fiddling with a few options as experiments first.

I'll leave judgement on coolify to @patdavid since that might be redundant compared to a lot of the stuff he's already set up. One of the big things I want to avoid, if possible, is duplicating one of the big flaws in mediawiki which is the risk of spambots clogging the system if we remove the barriers to account creation.

TechXavAL commented 5 months ago

I've thought about coolify as a cdn: it serves media to github pages, so you still have free CI/CD github services, account management, known server environment (github)... But as I haven't spent time figuring out what's possible with it, I will let the pros to decide if it's good or not.

Now, here is another option for images: Hugo Easy Gallery, with a live sample page.

It is a shortcode that you include within the markdown file, specifying all needed information. It's a bit more typing work than just including an image, but I think it's worth it. And if it finally is acceptable, it could be customized to include all the must have information (source url, original author, licensing).

The same shortcode can be used to add standalone images and galleries. It's all explained in the link.

Desmis commented 5 months ago

My comments will be limited. On the one hand, I have a very poor command of English and, on the other, I have a minimal command of Github and all these tools. I copy what I'm told.

I trust the team to find a solution (or solutions) that will be comprehensible and transparent (progressive?) for the majority of users and developers. These major transformations of our media must be accompanied by good communication.

As a reminder, I've written numerous articles for Rawpedia, notably the "Local adjustments" section in collaboration with Wayne. It's a big (very big) job.

I would add: 1) "je ne botte pas en touche ".. I don't take sides, as we say in French, 2) I'm ready to cooperate 3) it's a good idea for the system to focus not just on the "how", but also on the "why", with the notion of Retour d'expérience (REX) as a source of learning.

Jacques

Entropy512 commented 4 months ago

So updates:

Edit: So far, it looks like for a public repo, it counts against your storage quota but not against your bandwidth quota. I've pulled from a test repo multiple times and my bandwidth is still showing 0, but maybe there's some latency here. As long as the repo is garbage-collected occasionally, it might be OK if it continues that pulling from a public repo doesn't count against the bandwidth quota.