[TYPO3-core] Workflow for changing documentation
Xavier Perseguers
xavier at typo3.org
Mon May 5 13:45:13 CEST 2014
Just to make it clear, my suggestion of using Github is because it's
straightforward to use (although, @Philipp, it's a different workflow
than Gerrit, I admit :D) and it would require a minimal effort (= time)
from our side to implement this idea as shown below:
Please see
https://twitter.com/xperseguers/status/463282977435172866/photo/1/large
> => The edit link is like that:
> https://github.com/TYPO3-extensions/sphinx/edit/master/Documentation/Introduction/Index.rst
> meaning we could relatively easily directly link to it from any page on
> docs.typo3.org, as many other projects already do, with a big button
> similar to "Enhance me on Github"
I just tried to do that. I had to add a reference to the "github
repository" in my Settings.yml file:
conf.py:
copyright: 2013-2014
project: Sphinx Python Documentation Generator and Viewer
version: 2.1
release: 2.1.0-dev
html_theme_options:
github_repository: TYPO3-extensions/sphinx
and change this in RestTools (theme for docs.typo3.org):
diff --git
a/ExtendingSphinxForTYPO3/src/t3sphinx/themes/t3org/layout.html
b/ExtendingSphinxForTYPO3/src/t3sphinx/themes/t3org/layout.html
index fb63a3e..a710220 100644
--- a/ExtendingSphinxForTYPO3/src/t3sphinx/themes/t3org/layout.html
+++ b/ExtendingSphinxForTYPO3/src/t3sphinx/themes/t3org/layout.html
@@ -100,13 +100,22 @@
<li>
<a href="{{ pathto(master_doc) }}" title="{{ shorttitle|e
}}">Docstart</a>
</li>
- {%- if show_source and has_source and sourcename %}
+ {%- if show_source and has_source and sourcename %}
{%- block liShowSource %}
<li>
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
rel="nofollow">
{{ _('Show Source') }}
</a>
</li>
+
+ {% if theme_github_repository %}
+ <li>
+ <a href="https://github.com/{{ theme_github_repository|e
}}/edit/master/Documentation/{{ sourcename|replace(".txt", ".rst")|e }}">
+ Edit me on Github
+ </a>
+ </li>
+ {% endif %}
+
{%- endblock %}
{%- for rellink in rellinks %}
<li>
diff --git
a/ExtendingSphinxForTYPO3/src/t3sphinx/themes/t3org/theme.conf
b/ExtendingSphinxForTYPO3/src/t3sphinx/themes/t3org/theme.conf
index f728373..63c6a10 100644
--- a/ExtendingSphinxForTYPO3/src/t3sphinx/themes/t3org/theme.conf
+++ b/ExtendingSphinxForTYPO3/src/t3sphinx/themes/t3org/theme.conf
@@ -5,4 +5,5 @@ pygments_style = none
[options]
nosidebar = false
-sidebarwidth = 230
\ No newline at end of file
+sidebarwidth = 230
+github_repository =
\ No newline at end of file
Cheers
--
Xavier Perseguers
TYPO3 CMS Team Member
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
More information about the TYPO3-team-core
mailing list