We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add "edit this page" link on docs?
It would link to the GitHub editor page.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ocfweb/docs/doc.py`
Content:
```
1 from collections import namedtuple
2 
3 
4 class Document(namedtuple('Document', ['name', 'title', 'render'])):
5 
6     @property
7     def category(self):
8         """Return full category path of the document.
9 
10         For example, "/" or "/staff/backend/".
11         """
12         return self.name.rsplit('/', 1)[0] + '/'
13 
14     @property
15     def category_for_sidebar(self):
16         """Return the category to show similar pages for in the sidebar.
17 
18         If this page isn't at the root category, we just return this page's
19         category.
20 
21         If this page is at the root category, we return the category rooted at
22         this page (which may or may not have any pages in it).
23         """
24         if self.category == '/':
25             return self.name + '/'
26         else:
27             return self.category
28
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/ocfweb/docs/doc.py b/ocfweb/docs/doc.py
--- a/ocfweb/docs/doc.py
+++ b/ocfweb/docs/doc.py
@@ -25,3 +25,12 @@
             return self.name + '/'
         else:
             return self.category
+
+    @property
+    def edit_url(self):
+        """Return a GitHub edit URL for this page."""
+        return (
+            'https://github.com/ocf/ocfweb/edit/master/ocfweb/docs/docs' +
+            self.name +
+            '.md'
+        )

{"golden_diff": "diff --git a/ocfweb/docs/doc.py b/ocfweb/docs/doc.py\n--- a/ocfweb/docs/doc.py\n+++ b/ocfweb/docs/doc.py\n@@ -25,3 +25,12 @@\n             return self.name + '/'\n         else:\n             return self.category\n+\n+    @property\n+    def edit_url(self):\n+        \"\"\"Return a GitHub edit URL for this page.\"\"\"\n+        return (\n+            'https://github.com/ocf/ocfweb/edit/master/ocfweb/docs/docs' +\n+            self.name +\n+            '.md'\n+        )\n", "issue": "Add \"edit this page\" link on docs?\nIt would link to the GitHub editor page.\n\n", "before_files": [{"content": "from collections import namedtuple\n\n\nclass Document(namedtuple('Document', ['name', 'title', 'render'])):\n\n    @property\n    def category(self):\n        \"\"\"Return full category path of the document.\n\n        For example, \"/\" or \"/staff/backend/\".\n        \"\"\"\n        return self.name.rsplit('/', 1)[0] + '/'\n\n    @property\n    def category_for_sidebar(self):\n        \"\"\"Return the category to show similar pages for in the sidebar.\n\n        If this page isn't at the root category, we just return this page's\n        category.\n\n        If this page is at the root category, we return the category rooted at\n        this page (which may or may not have any pages in it).\n        \"\"\"\n        if self.category == '/':\n            return self.name + '/'\n        else:\n            return self.category\n", "path": "ocfweb/docs/doc.py"}], "after_files": [{"content": "from collections import namedtuple\n\n\nclass Document(namedtuple('Document', ['name', 'title', 'render'])):\n\n    @property\n    def category(self):\n        \"\"\"Return full category path of the document.\n\n        For example, \"/\" or \"/staff/backend/\".\n        \"\"\"\n        return self.name.rsplit('/', 1)[0] + '/'\n\n    @property\n    def category_for_sidebar(self):\n        \"\"\"Return the category to show similar pages for in the sidebar.\n\n        If this page isn't at the root category, we just return this page's\n        category.\n\n        If this page is at the root category, we return the category rooted at\n        this page (which may or may not have any pages in it).\n        \"\"\"\n        if self.category == '/':\n            return self.name + '/'\n        else:\n            return self.category\n\n    @property\n    def edit_url(self):\n        \"\"\"Return a GitHub edit URL for this page.\"\"\"\n        return (\n            'https://github.com/ocf/ocfweb/edit/master/ocfweb/docs/docs' +\n            self.name +\n            '.md'\n        )\n", "path": "ocfweb/docs/doc.py"}]}