File tree Expand file tree Collapse file tree 2 files changed +22
-8
lines changed Expand file tree Collapse file tree 2 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 1- { lib , ... } :
1+ { lib , pkgs , ... } :
2+ let
3+ # Convert links relative to github -> relative to docs
4+ fixLinks = pkgs . callPackage ../../docs/fix-links { } ;
5+ in
26{
37 options . enableMan = lib . mkOption {
48 type = lib . types . bool ;
1620 ./platforms.nix
1721 ] ;
1822
19- config . docs . optionPages = {
20- docs = {
23+ config . docs = {
24+ pages . "" = {
25+ menu . section = "header" ;
26+ menu . location = [ "Home" ] ;
27+ source = pkgs . callPackage ./readme.nix {
28+ inherit fixLinks ;
29+ # TODO: get `availableVersions` and `baseHref` from module options
30+ } ;
31+ } ;
32+ pages . contributing = {
33+ menu . section = "footer" ;
34+ menu . location = [ "Contributing" ] ;
35+ source = fixLinks ../../CONTRIBUTING.md ;
36+ } ;
37+ optionPages . docs = {
2138 optionScopes = [ "docs" ] ;
2239 page . menu . location = [ "docs" ] ;
2340 page . text = ''
Original file line number Diff line number Diff line change 11{
22 lib ,
3+ fixLinks ,
34 runCommand ,
45 availableVersions ? [ ] ,
56 baseHref ? "/" , # TODO: remove & get from module config
@@ -21,15 +22,11 @@ runCommand "index.md"
2122 {
2223 start = "<!-- START DOCS -->" ;
2324 end = "<!-- STOP DOCS -->" ;
24- baseurl = "https://nix-community.github.io/nixvim/" ;
25- src = ../../README.md ;
25+ src = fixLinks ../../README.md ;
2626 }
2727 ''
2828 # extract relevant section of the README
2929 sed -n "/$start/,/$end/p" $src > $out
30- # replace absolute links
31- substituteInPlace $out --replace-quiet "$baseurl" "./"
32- # TODO: replace .html with .md
3330 '' ;
3431
3532 docs_versions =
You can’t perform that action at this time.
0 commit comments