Skip to content

The viewer

Introduction

The viewer is the main widget in Rogallo's display. If you are viewing a Gemini page, a Gopher server or the response from a Finger server, this is where the result will be displayed.

When it has focus, the viewer has a number of keys that let you navigate the content. Where possible, many of the navigation keys that you might have muscle-memory for are available. You can always check what keys are available by calling on the Help command (bound to F1 by default).

Viewer help Rogallo v1.10.0 gemini://localhost/features.gmi  Help ────────────────────────────────────────────────────────────────── Rogallo ice, Nexspace,Rogallo v1.10.0 features  Support f BookmarksViewer Location  Backward As well as using the common set of cursor and page keys, the following Copy-to-ckeys are available for movement within the document: Configura Full mous───────────────────────────────────────────────────────────────── Built-in KeyDescription Context-s───────────────────────────────────────────────────────────────── Command pshift+pgdn, dScroll down half a page Automatic───────────────────────────────────────────────────────────────── Optional j, e, ⏎Scroll down one line Local [Ge─────────────────────────────────────────────────────────────────ing Built-in f, space, zScroll down one page Persisten───────────────────────────────────────────────────────────────── Fully resG, >Scroll to the bottom Cross-pla─────────────────────────────────────────────────────────────────nning modern Pyg, <, p, %Scroll to the top ───────────────────────────────────────────────────────────────── shift+pgup, uScroll up half a page ───────────────────────────────────────────────────────────────── k, yScroll up one line ───────────────────────────────────────────────────────────────── b, wScroll up one page ───────────────────────────────────────────────────────────────── As well as the normal widget navigation keys, the following keys are available to navigate through the links: ───────────────────────────────────────────────────────────────── KeyDescription ───────────────────────────────────────────────────────────────── ←, shift+↑, LMove backwards through each of the links ───────────────────────────────────────────────────────────────── →, shift+↓, lMove forward through each of the links ───────────────────────────────────────────────────────────────── ───────────────────────────────────────────────────────────────────────── ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔  Okay [Esc] ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ───────────────────────────────────────────────────────────────────────── text/gemini; charset=utf-8 >Enter a URI, file, or command  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forward  f10 Quit ^p Commands

When viewing a Gemini page or a Gopher menu, often there will be links embedded in the page. There are a number of ways that these can be navigated.

Next/previous navigation

Links within the viewer are navigable widgets, just like other elements in Rogallo's user interface. As such you can move between them with Tab and Shift+Tab. Because these keys will eventually navigate you out of the viewer and on to other widgets in the user interface, there are some other keys that let you move between links and stay within the viewer:

  • , Shift+, L - All navigate to the previous link.
  • , Shift+, l - All navigate to the next link.

To speed up navigating to a specific link, Rogallo also provides a method of jumping to a specific link. By default each link in a document will have a numbered label shown to the right of the viewer (the position is configurable).

Links with labels Rogallo v1.10.0 gemini://localhost/lots_of_links.gmi An example of lots of links Here's a document that has quite a few links, all next to each other. Bandcamp[1] BlueSky[2] My discord server[3] My Flickr[4] My GitHub[5] My Instagram[6] Me on last.fm[7] Me on LinkedIn[8] My Mastodon account[9] My stuff on NPM[10] My Python code on PyPI[11] Me on Reddit[12] Me on Steam[13] Me on TikTok[14] My YouTube channel[15] My GitLab[16] My Codeberg[17] text/gemini; charset=utf-8 >Enter a URI, file, or command  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forwa^p Commands

To jump to that link, simply type its number.

A highlighted link after typing its number Rogallo v1.10.0 gemini://localhost/lots_of_links.gmi An example of lots of links Here's a document that has quite a few links, all next to each other. Bandcamp[1] BlueSky[2] My discord server[3] My Flickr[4] My GitHub[5] My Instagram[6] Me on last.fm[7] Me on LinkedIn[8] My Mastodon account[9] My stuff on NPM[10] My Python code on PyPI[11] Me on Reddit[12] Me on Steam[13] Me on TikTok[14] My YouTube channel[15] My GitLab[16] My Codeberg[17] https://github.com/daveptext/gemini; charset=utf-8 >Enter a URI, file, or command  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forwa^p Commands

Configuration

Filtering out pre-formatted text

Because pre-formatted text can be used to generate site logos and similar, this can sometimes mean that you're faced with viewing the same ASCII art over and over again, that uses up vertical space, and means it takes longer to get to the content of a site. With this in mind Rogallo has a facility for hiding specific pre-formatted text. It is based on the idea that such pre-formatted blocks will have alt-text, and that we will normally only want to do it for a specific URI. As an example: suppose I wanted to hide my avatar image on Station, and also the site logo to save some space, I can set the following in the configuration file:

"hide_preformatted": [
    [
        "gemini://station.martinrue.com/",
        "Station logo"
    ],
    [
        "gemini://station.martinrue.com/davep",
        "User image"
    ]
]

As you can see, the filters are defined as a list of lists. The first value in each is the URI to match. This will match that location and all below it. So in the above gemini://station.martinrue.com/ would match that location, and also gemini://station.martinrue.com/davep and gemini://station.martinrue.com/example-user and so on. The second value is the alt-text for the pre-formatted text.

Markdown rendering

If Rogallo is served a Markdown file, it will convert it into Gemtext and render it. This makes it easier to navigate links, etc.

Viewing Markdown as Gemtext Rogallo v1.10.0 gemini://localhost/example.md Rogallo Markdown example A paragraph This is a paragraph. This is some more of that paragraph. Here's the final sentence in that paragraph. Links Links are handled just fine too{a}. As well as done as markup{b}, they can also appear inline: gopher://tilde.team/1/~davep/{c} -- while that Gopher link there isn't markup, it is detected and linked. {a} are handled just fine too[1] {b} as markup[2] {c} gopher://tilde.team/1/~davep/[3] Tables | Protocol | Documentation                         | | :------- | :------------------------------------ | | Gemini   | https://rogallo.davep.dev/gemini/{a}  | | Gopher   | https://rogallo.davep.dev/gopher/{b}  | | Finger   | https://rogallo.davep.dev/finger/{c}  | | Spartan  | https://rogallo.davep.dev/spartan/{d} | | Nex      | https://rogallo.davep.dev/nex/{e}     | {a} https://rogallo.davep.dev/gemini/[4] {b} https://rogallo.davep.dev/gopher/[5] {c} https://rogallo.davep.dev/finger/[6] {d} https://rogallo.davep.dev/spartan/[7] {e} https://rogallo.davep.dev/nex/[8] Blockquotes To quote myself: Rogallo supports blockquotes in Markdown. There, I said it. text/markdown; charset=utf-8 >Enter a URI, file, or command  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forward  f10 Quit ^p Commands

If you would prefer that Rogallo renders the text using its builtin Markdown widget, you can set convert_markdown_to_gemtext in the configuration file to false:

"convert_markdown_to_gemtext": false

The result of viewing Markdown will be more like this:

Viewing Markdown Rogallo v1.10.0 gemini://localhost/example.md Rogallo Markdown example A paragraph This is a paragraph. This is some more of that paragraph. Here's the final sentence in that paragraph. Links Links are handled just fine too. As well as done as markup, they can also appear inline: gopher://tilde.team/1/~davep/ -- while that Gopher link there isn't markup, it is detected and linked. Tables ───────────────────────────────────────────────────────────────────────────────── ProtocolDocumentation ───────────────────────────────────────────────────────────────────────────────── Geminihttps://rogallo.davep.dev/gemini/ ───────────────────────────────────────────────────────────────────────────────── Gopherhttps://rogallo.davep.dev/gopher/ ───────────────────────────────────────────────────────────────────────────────── Fingerhttps://rogallo.davep.dev/finger/ ───────────────────────────────────────────────────────────────────────────────── Spartanhttps://rogallo.davep.dev/spartan/ ───────────────────────────────────────────────────────────────────────────────── Nexhttps://rogallo.davep.dev/nex/ ───────────────────────────────────────────────────────────────────────────────── Blockquotes To quote myself: Rogallo supports blockquotes in Markdown. There, I said it. Preformatted text text/markdown; charset=utf-8 >Enter a URI, file, or command  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forward  f10 Quit ^p Commands

While the result is more in keeping with the document being Markdown, it will be trickier to navigate if you don't have a mouse (the issue being that Textual's Markdown widget is keyboard-hostile when it comes to navigation of links).