Move source link on docs website
This commit is contained in:
parent
42b355c38c
commit
da894f6e13
2 changed files with 13 additions and 3 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
|
|
||||||
repo = rec {
|
repo = rec {
|
||||||
rev = if self ? rev then self.rev else lib.warn "Repo is dirty, links will not work!" "???";
|
rev = if self ? rev then self.rev else lib.warn "Repo is dirty, links point to main!" "main";
|
||||||
shortRev = lib.substring 0 8 rev;
|
shortRev = lib.substring 0 8 rev;
|
||||||
urls = {
|
urls = {
|
||||||
base = "https://git.sr.ht/~alexdavid/jail.nix";
|
base = "https://git.sr.ht/~alexdavid/jail.nix";
|
||||||
|
|
@ -34,9 +34,9 @@
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
### ${name}
|
### ${name}
|
||||||
**${name} :: ${combinatorObj.sig}**
|
<a class="source" href="${repo.urls.file file attrPos.line}">Source</a>
|
||||||
|
|
||||||
[Source](${repo.urls.file file attrPos.line})
|
**${name} :: ${combinatorObj.sig}**
|
||||||
|
|
||||||
${combinatorObj.doc}
|
${combinatorObj.doc}
|
||||||
'';
|
'';
|
||||||
|
|
@ -104,6 +104,7 @@
|
||||||
name = "readthedocs";
|
name = "readthedocs";
|
||||||
hljs_languages = [ "nix" ];
|
hljs_languages = [ "nix" ];
|
||||||
};
|
};
|
||||||
|
extra_css = [ "extra.css" ];
|
||||||
# Copyright is placed directly into the page within a <p> tag.
|
# Copyright is placed directly into the page within a <p> tag.
|
||||||
# Concatenating with </p><p> here is super janky, but good enough for
|
# Concatenating with </p><p> here is super janky, but good enough for
|
||||||
# now.
|
# now.
|
||||||
|
|
|
||||||
9
website/static-docs/extra.css
Normal file
9
website/static-docs/extra.css
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
.document {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.source {
|
||||||
|
position: absolute;
|
||||||
|
margin-top: -48px;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue