Control: tag -1 patch
Cyril Brulebois <kibi@debian.org> (2016-11-11):
> It would be nice if an anchor could be added on the “Changes:” line of
> the news entry. For example, when trying to point to recent grub2
> changes, this link would lead to a page full of descriptions (one for
> each binary):
> https://tracker.debian.org/news/811622
>
> while the following link could lead directly to the Changes: part which
> is filled according to debian/changelog:
> https://tracker.debian.org/news/811622#changes
>
> grub2 isn't too bad; linux is… I seem to be needing 11 page downs to get
> to the changes part on this entry, for example:
> https://tracker.debian.org/news/811137
>
> Thanks for considering.
I think the attached patch should do the job.
But I suspect the following bits from the CSS might need updating (the
naked “a” part notably), since this anchor gets highlighted in blue,
which might not be too desirable?
| a, a:hover, a:focus {
| color: #0530D7;
| }
KiBi.
From 669f0459a86e2902e4972ecae9224f888977f6ba Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <kibi@debian.org>
Date: Fri, 11 Nov 2016 04:13:38 +0100
Subject: [PATCH] auto_news: add a "changes" anchor.
This way, one can share links pointing directly to the interesting part
of a news page (Closes: #843944).
Signed-off-by: Cyril Brulebois <kibi@debian.org>
---
distro_tracker/auto_news/tracker_tasks.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/distro_tracker/auto_news/tracker_tasks.py b/distro_tracker/auto_news/tracker_tasks.py
index ecd8089..186950d 100644
--- a/distro_tracker/auto_news/tracker_tasks.py
+++ b/distro_tracker/auto_news/tracker_tasks.py
@@ -49,7 +49,7 @@ class GenerateNewsFromRepositoryUpdates(BaseTask):
# Add changelog entries since last update...
changelog_content = package_version.get_changelog_entry()
if changelog_content:
- content = content + '\nChanges:\n' + changelog_content
+ content = content + '\n<a name="changes">Changes:</a>\n' + changelog_content
return content
--
2.1.4
Attachment:
signature.asc
Description: Digital signature