{% extends "default.twig" %}

{% block content %}

    <div class="container documentation">

        <div class="sidebar">
            <ul>
                {% for itemId, item in menu.items %}
                    <li>
                        {{ item.section }}

                        <ul>
                            {% for itemId, item in item.items %}
                                <li class="{{ itemId == current_menu ? 'active' }}">
                                    <a href="{{ item.absoluteUrl|default(baseUrl ~ '/' ~ item.url) }}">
                                        {{ item.text|raw }}
                                    </a>
                                </li>
                            {% endfor %}
                        </ul>
                    </li>
                {% endfor %}
            </ul>
        </div>

        <article>
            <div class="pull-right">
                <a href="https://github.com/PHP-DI/PHP-DI/edit/master/{{ currentFile }}" class="btn btn-default btn-sm">
                    Edit this page on GitHub
                </a>
            </div>

            {{ content|raw }}
        </article>

    </div>

{% endblock %}

{% extends "default.twig" %}

{% block content %}

    <div class="container documentation">

        <div class="sidebar">
            <ul>
                {% for itemId, item in menu.items %}
                    <li>
                        {{ item.section }}

                        <ul>
                            {% for itemId, item in item.items %}
                                <li class="{{ itemId == current_menu ? 'active' }}">
                                    <a href="{{ item.absoluteUrl|default(baseUrl ~ '/' ~ item.url) }}">
                                        {{ item.text|raw }}
                                    </a>
                                </li>
                            {% endfor %}
                        </ul>
                    </li>
                {% endfor %}
            </ul>
        </div>

        <article>
            <div class="pull-right">
                <a href="https://github.com/PHP-DI/PHP-DI/blob/master/{{ currentFile }}" class="btn btn-default btn-sm">
                    Edit this page on GitHub
                </a>
            </div>

            {{ content|raw }}
        </article>

    </div>

{% endblock %}

Make the link to edit the current page on GitHub point to the rendered file
Make the link to edit the current page on GitHub point to the rendered file

This is a "friendlier" link for visitors: it will not auto-create a fork on their GitHub account, and it lets them view the document on GitHub first. Then can still simply click "Edit" to edit the file.
