Make minor adjustments to lib.nix
This commit is contained in:
parent
30bd041431
commit
853dcaac4b
12
lib.nix
12
lib.nix
|
@ -31,25 +31,25 @@ let
|
|||
};
|
||||
wrapHost = ssl: host: (if ssl then "https" else "http") + "//${host}";
|
||||
in
|
||||
lib = {
|
||||
{
|
||||
english = settings: website {
|
||||
inherit (settings) drafts;
|
||||
ssl = settings.ssl or false;
|
||||
drafts = settings.drafts or false;
|
||||
source = blog-source;
|
||||
path = ".";
|
||||
replaceUrl = {
|
||||
from = "https://danilafe.com";
|
||||
to = wrapHost settings.ssl settings.host;
|
||||
to = wrapHost (settings.ssl or false) settings.host;
|
||||
};
|
||||
};
|
||||
russian = settings: website {
|
||||
inherit (settings) drafts;
|
||||
ssl = settings.ssl or false;
|
||||
drafts = settings.drafts or false;
|
||||
source = blog-source-localized;
|
||||
path = "ru";
|
||||
replaceUrl = {
|
||||
from = "https://ru.danilafe.com";
|
||||
to = wrapHost settings.ssl settings.host;
|
||||
to = wrapHost (settings.ssl or false) settings.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user