Skip to content

Commit d935f39

Browse files
committed
Moved edit page to notes
1 parent e51955f commit d935f39

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

livemark/plugins/links/plugin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ def items(self):
3232
items.append({"name": "Report", "path": github.report_url})
3333
if github.fork_url:
3434
items.append({"name": "Fork", "path": github.fork_url})
35-
if github.edit_url:
36-
items.append({"name": "Edit", "path": github.edit_url})
3735
return items
3836

3937
# Process

livemark/plugins/notes/markup.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<div id="livemark-notes">
2-
Written in <a href="https://livemark.frictionlessdata.io" target="_blank"> Livemark </a><br>
2+
{% if plugin.edit_url %}
3+
<a href="{{ plugin.edit_url }}" target="_blank">Edit page </a> in <a href="https://livemark.frictionlessdata.io" target="_blank"> Livemark </a><br>
4+
{% else %}
5+
Written in <a href="https://livemark.frictionlessdata.io" target="_blank"> Livemark </a><br>
6+
{% endif %}
37
({{ plugin.current.strftime(plugin.format) }})
48
</div>

livemark/plugins/notes/plugin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ def format(self):
2323
def current(self):
2424
return datetime.fromtimestamp(os.path.getmtime(self.document.source))
2525

26+
@property
27+
def edit_url(self):
28+
github = self.document.get_plugin("github")
29+
if github:
30+
return github.edit_url
31+
2632
# Process
2733

2834
def process_markup(self, markup):

0 commit comments

Comments
 (0)