Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 1 addition & 44 deletions docs/content/docs/usage/shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,4 @@ weight = 70

selfoss offers some keyboard shortcuts. They are very similar to what Google Reader used:

<dl>
<dt><kbd>space</kbd></dt>
<dd>select and open next entry</dd>
<dt><kbd>j</kbd></dt>
<dd>select and open next entry</dd>
<dt><kbd>n</kbd></dt>
<dd>select next entry</dd>
<dt><kbd>→</kbd></dt>
<dd>select next entry (and open it when the current is open)</dd>
<dt><kbd>shift</kbd>+<kbd>space</kbd></dt>
<dd>select and open previous entry</dd>
<dt><kbd>k</kbd></dt>
<dd>select and open previous entry</dd>
<dt><kbd>p</kbd></dt>
<dd>select previous entry</dd>
<dt><kbd>←</kbd></dt>
<dd>select previous entry (and open it when the current is open)</dd>
<dt><kbd>s</kbd></dt>
<dd>mark and unmark current selected entry as starred/unstarred</dd>
<dt><kbd>m</kbd></dt>
<dd>mark and unmark current selected entry as read/unread</dd>
<dt><kbd>t</kbd></dt>
<dd>throw current item (mark as read and open next)</dd>
<dt><kbd>shift</kbd>+<kbd>t</kbd></dt>
<dd>throw current item (mark as read and open previous)</dd>
<dt><kbd>v</kbd></dt>
<dd>open url of current entry in new tab/window</dd>
<dt><kbd>shift</kbd>+<kbd>v</kbd></dt>
<dd>open url of current entry in new tab/window and mark read</dd>
<dt><kbd>ctrl</kbd>+<kbd>m</kbd></dt>
<dd>mark all as read</dd>
<dt><kbd>r</kbd></dt>
<dd>reload the list</dd>
<dt><kbd>o</kbd></dt>
<dd>open / close current item</dd>
<dt><kbd>shift</kbd>+<kbd>o</kbd></dt>
<dd>close all open items</dd>
<dt><kbd>shift</kbd>+<kbd>n</kbd></dt>
<dd>open newest items page</dd>
<dt><kbd>shift</kbd>+<kbd>u</kbd></dt>
<dd>open unread items page</dd>
<dt><kbd>shift</kbd>+<kbd>s</kbd></dt>
<dd>open starred items page</dd>
</dl>
{{ shortcuts(path="static/shortcuts.json") }}
90 changes: 90 additions & 0 deletions docs/static/shortcuts.json

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to put this in client/js directory, not docs but then zola would complain that it is “not inside the base site directory”, even when using a symlink.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work in reverse? Symlink the zola file towards client/js?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that should work. But client can just import the json file directly.

Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[
{
"key": "space",
"description": "select and open next entry"
},
{
"key": "j",
"description": "select and open next entry"
},
{
"key": "n",
"description": "select next entry"
},
{
"key": "→",
"description": "select next entry (and open it when the current is open)"
},
{
"key": "space",
"shift": true,
"description": "select and open previous entry"
},
{
"key": "k",
"description": "select and open previous entry"
},
{
"key": "p",
"description": "select previous entry"
},
{
"key": "←",
"description": "select previous entry (and open it when the current is open)"
},
{
"key": "s",
"description": "mark and unmark current selected entry as starred/unstarred"
},
{
"key": "m",
"description": "mark and unmark current selected entry as read/unread"
},
{
"key": "t",
"description": "throw current item (mark as read and open next)"
},
{
"key": "t",
"shift": true,
"description": "throw current item (mark as read and open previous)"
},
{
"key": "v",
"description": "open url of current entry in new tab/window"
},
{
"key": "v",
"shift": true,
"description": "open url of current entry in new tab/window and mark read"
},
{
"key": "m",
"ctrl": true,
"description": "mark all as read"
},
{
"key": "o",
"description": "open / close current item"
},
{
"key": "o",
"shift": true,
"description": "close all open items"
},
{
"key": "n",
"shift": true,
"description": "open newest items page"
},
{
"key": "u",
"shift": true,
"description": "open unread items page"
},
{
"key": "s",
"shift": true,
"description": "open starred items page"
}
]
7 changes: 7 additions & 0 deletions docs/templates/shortcodes/shortcuts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% set shortcuts = load_data(path=path) %}
<dl>
{% for shortcut in shortcuts %}
<dt>{% if shortcut.ctrl %}<kbd>ctrl</kbd> + {% endif %}{% if shortcut.shift %}<kbd>shift</kbd> + {% endif %}<kbd>{{ shortcut.key }}</kbd></dt>
<dd>{{ shortcut.description }}</dd>
{% endfor %}
</dl>