From 385c46fd4bbe396197c2e9a2df6ca922824b7cff Mon Sep 17 00:00:00 2001 From: Stefan Tatschner Date: Fri, 29 May 2015 23:08:17 +0200 Subject: [PATCH] Use sphinx.ext.extlinks to generate frequently used links Documentation see here: http://sphinx-doc.org/ext/extlinks.html --- conf.py | 12 +++++++++++- index.rst | 2 +- users/faq.rst | 4 +--- users/ignoring.rst | 6 ++---- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/conf.py b/conf.py index 6f88fb7f5..8687f1882 100644 --- a/conf.py +++ b/conf.py @@ -28,7 +28,10 @@ import os # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.todo'] +extensions = [ + 'sphinx.ext.todo', + 'sphinx.ext.extlinks', +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -96,6 +99,13 @@ pygments_style = 'sphinx' # Show .. todo:: block. todo_include_todos = True +# Configure external links. +extlinks = { + 'issue': ('https://github.com/syncthing/syncthing/issues/%s', 'issue #'), + 'user': ('https://github.com/%s', '@'), + 'commit': ('https://github.com/syncthing/syncthing/commit/%s', ''), +} + # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/index.rst b/index.rst index 345bde7f3..4abaec6e3 100644 --- a/index.rst +++ b/index.rst @@ -31,7 +31,7 @@ Contact * For a more real time experience, there's also an IRC channel ``#syncthing`` on `Freenode `_. -* For other concerns you may reach out to members of the core team, currently `@calmh `_, `@AudriusButkevicius `_ and `@Zillode `_. +* For other concerns you may reach out to members of the core team, currently :user:`calmh`, :user:`AudriusButkevicius` and :user:`Zillode`. The main documentation for the site is organized into a couple of sections. You can use the heading in the left sidebar to navigate the site. diff --git a/users/faq.rst b/users/faq.rst index e60fe72ed..1fb0805ca 100644 --- a/users/faq.rst +++ b/users/faq.rst @@ -210,9 +210,7 @@ settings at default and use an ssh port forward to access it. For example, will log you into othercomputer.example.com, and present the *remote* Syncthing GUI on http://localhost:9090 on your *local* computer. You should not open more than one Syncthing GUI in a single browser due to conflicting X-CSRFTokens. Any -modification will be rejected. See `Issue 720 -`__ to -work around this limitation. +modification will be rejected. See :issue:`720` to work around this limitation. The CSRF tokens are stored using cookies. Therefore, if you get the message ``Syncthing seems to be experiencing a problem processing your request``, you diff --git a/users/ignoring.rst b/users/ignoring.rst index 5596ad0e9..afc789bc7 100644 --- a/users/ignoring.rst +++ b/users/ignoring.rst @@ -124,16 +124,14 @@ Assume two nodes, Alice and Bob, where Alice has 100 files to share, but Bob ignores 25 of these. From Alice's point of view Bob will become about 75% in sync (the actual number depends on the sizes of the individual files) and remain in "Syncing" state even though it is in -fact not syncing anything (issue -`#623 `__). From +fact not syncing anything (:issue:`623`). From Bob's point of view it's 100% up to date but will show fewer files in both the local and global view. If Bob adds files that have already been synced to the ignore list, they will remain in the "global" view but disappear from the "local" view. The end result is more files in the global repository than in the local, -but still 100% in sync (issue -`#624 `__). From +but still 100% in sync (:issue:`624`). From Alice's point of view, Bob will remain 100% in sync until the next reconnect, because Bob has already announce that he has the files that are now suddenly ignored.