1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

firefox: support bookmark tags (#3942)

This commit is contained in:
Naïm Favier 2023-05-04 16:58:13 +02:00 committed by GitHub
parent 6abb775e75
commit ae6d5466bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View file

@ -71,6 +71,9 @@ let
}" ADD_DATE="0" LAST_MODIFIED="0"${
lib.optionalString (bookmark.keyword != null)
" SHORTCUTURL=\"${escapeXML bookmark.keyword}\""
}${
lib.optionalString (bookmark.tags != [ ])
" TAGS=\"${escapeXML (concatStringsSep "," bookmark.tags)}\""
}>${escapeXML bookmark.name}</A>'';
directoryToHTML = indentLevel: directory: ''
@ -251,6 +254,12 @@ in {
description = "Bookmark name.";
};
tags = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Bookmark tags.";
};
keyword = mkOption {
type = types.nullOr types.str;
default = null;
@ -300,6 +309,7 @@ in {
[
{
name = "wikipedia";
tags = [ "wiki" ];
keyword = "wiki";
url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
}
@ -317,6 +327,7 @@ in {
}
{
name = "wiki";
tags = [ "wiki" "nix" ];
url = "https://nixos.wiki/";
}
];

View file

@ -10,12 +10,12 @@
<DL><p>
<DT><A HREF="https://nixos.wiki/wiki/Home_Manager" ADD_DATE="0" LAST_MODIFIED="0">Home Manager</A>
</p></DL>
<DT><A HREF="https://en.wikipedia.org/wiki/Special:Search?search=%s&amp;go=Go" ADD_DATE="0" LAST_MODIFIED="0" SHORTCUTURL="wiki">wikipedia</A>
<DT><A HREF="https://en.wikipedia.org/wiki/Special:Search?search=%s&amp;go=Go" ADD_DATE="0" LAST_MODIFIED="0" SHORTCUTURL="wiki" TAGS="wiki">wikipedia</A>
<DT><A HREF="https://www.kernel.org" ADD_DATE="0" LAST_MODIFIED="0">kernel.org</A>
<DT><H3>Nix sites</H3>
<DL><p>
<DT><A HREF="https://nixos.org/" ADD_DATE="0" LAST_MODIFIED="0">homepage</A>
<DT><A HREF="https://nixos.wiki/" ADD_DATE="0" LAST_MODIFIED="0">wiki</A>
<DT><A HREF="https://nixos.wiki/" ADD_DATE="0" LAST_MODIFIED="0" TAGS="wiki,nix">wiki</A>
<DT><H3>Nix sites</H3>
<DL><p>
<DT><A HREF="https://nixos.org/" ADD_DATE="0" LAST_MODIFIED="0">homepage</A>

View file

@ -31,6 +31,7 @@ lib.mkIf config.test.enableBig {
}
{
name = "wikipedia";
tags = [ "wiki" ];
keyword = "wiki";
url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
}
@ -47,6 +48,7 @@ lib.mkIf config.test.enableBig {
}
{
name = "wiki";
tags = [ "wiki" "nix" ];
url = "https://nixos.wiki/";
}
{