Proper paste pages #23
Labels
No Label
Kind/Bug
Kind/Enhancement
Kind/Feature
Project/Lander
Project/Landerctl
idea
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Chewing_Bever/lander#23
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Pastes are currently just text files that get returned as plain text. I'd like to have a "proper" page for pastes, with syntax highlighting & the paste being rendered in some monospace font. For requests sent from a CLI, the plaintext version should still be returned.
For syntax highlighting, we could use
highlight.js
. The page should also look good/be functional with JavaScript disabled.To keep the application self-contained, we'd need to serve at least the
highlight.js
file (and probably some css files later on) from the Lander server. For this, it might be good to add a/_/
route where these files are served other. This route could then serve any necessary static files for the server.While experimenting with the LTM I've encountered another annoying issue:
<
and>
in pastes. If you add these into an HTML file (even inside<pre><code>
), the browser will try to interpret these as tags, causing lines such as#include <stdio.h>
to simply become#include
. For pastes, this isn't acceptable imo as the whole point is to show a paste properly inside an HTML page.Because pastes are suppposed be to relatively small text files, it might be acceptable to expand the LSM store to store multiple data objects. For pastes, we would then add an "html" data file that contains an HTML-escaped version of the paste, which gets served when requesting the HTML page. The default data file would then still be called
[key].data
, with other data files being called e.g.[key].html.data
.