betterscientificsoftware / bssw.io

Better Scientific Software Homepage
https://bssw.io
Other
134 stars 85 forks source link

Long-term goal: meaningful preview without having to go to the preview site #1469

Open bernhold opened 1 year ago

bernhold commented 1 year ago

I find that that the thing that makes article development really tedious is having to rebuild the preview site repeatedly. You have to move to a different tool (the preview site), fiddle, and wait while it rebuilds. Rebuilds are currently taking O(10 min). It can really slow down iterations on getting the format of an article right.

One approach to addressing that is to align the way BSSw styles things closer to the way popular tools like GitHub and web browsers with default CSS settings style content. That's captured in #706.

Another approach would be to provide a way to preview a single page that retains the most important aspects of what the front-end is doing for us and uses the same CSS as the site. Maybe a very simple way to render the markdown to HTML which can then be loaded locally into a browser and reference the bssw.io CSS files or something. It would need to preserve the key elements of the processing the front-end currently does to articles. It seems like one way to approach that might be to try to reduce the special stuff the front-end is doing that materially changes the content of the document. I think if we captured the right 80-90% of the structure and formatting of the document, it could reduce the need for previews through the preview site significantly.

If #706 is, in essence, making our CSS closer to "standard", then this idea might reducing the "hidden" transformations that the front-end applies to the documents it ingests that isn't typical processing markdown documents.

bernhold commented 9 months ago

I remember talking with Parallactic about this some time ago and they suggested that they could probably add a feature to the front-end that would allow us to point (somehow) to a particular file and have it rendered (as best it can without having all of the database information, etc.). This might be a way of addressing the second alternative above. It would not require CSS changes, which are likely to have knock-on effects and therefore take quite a while to satisfactorily resolve (even though I really would like to have our rendering closer to the defaults in GitHub, and various web browsers).