diff --git a/appview/pages/templates/banner.html b/appview/pages/templates/banner.html index bc93c896..b6a514e0 100644 --- a/appview/pages/templates/banner.html +++ b/appview/pages/templates/banner.html @@ -30,7 +30,7 @@
Host repositories on your own infrastructure with knots.
- + Read the docs {{ i "arrow-right" "size-4" }} @@ -47,7 +47,7 @@Run CI jobs on your own infrastructure using spindles.
- + Read the docs {{ i "arrow-right" "size-4" }} diff --git a/appview/pages/templates/repo/needsUpgrade.html b/appview/pages/templates/repo/needsUpgrade.html index b068a476..23c316cb 100644 --- a/appview/pages/templates/repo/needsUpgrade.html +++ b/appview/pages/templates/repo/needsUpgrade.html @@ -54,7 +54,7 @@ {{ i "triangle-alert" "size-5 inline-flex items-center align-middle" }} The knot hosting this repository needs an upgrade. This repository is currently unavailable. diff --git a/appview/pages/templates/repo/pipelines/pipelines.html b/appview/pages/templates/repo/pipelines/pipelines.html index 04f86600..e7fcc6e2 100644 --- a/appview/pages/templates/repo/pipelines/pipelines.html +++ b/appview/pages/templates/repo/pipelines/pipelines.html @@ -73,7 +73,7 @@ 2Configure your CI/CD - pipeline + pipeline
Choose a spindle to execute your workflows on. Only repository owners can configure spindles. Spindles can be selfhosted, - + click to learn more.
diff --git a/appview/pages/templates/spindles/index.html b/appview/pages/templates/spindles/index.html index 9f1f9d88..b770ad71 100644 --- a/appview/pages/templates/spindles/index.html +++ b/appview/pages/templates/spindles/index.html @@ -102,7 +102,7 @@ {{ define "docsButton" }} +href="https://docs.tangled.org/spindles/self-hosting/"> {{ i "book" "size-4" }} Docs diff --git a/appview/pages/templates/timeline/home.html b/appview/pages/templates/timeline/home.html index 2a61955b..5eb49f8f 100644 --- a/appview/pages/templates/timeline/home.html +++ b/appview/pages/templates/timeline/home.html @@ -228,12 +228,12 @@
- Host your repositories on your own infrastructure with knots.
- Run CI on your own machines with spindles.
+ Host your repositories on your own infrastructure with knots.
+ Run CI on your own machines with spindles.
Don't want to self-host? All are welcome on our hosted instances.
Pick and choose dependencies for your CI pipelines from nixpkgs, one of the biggest
package repositories.
Support for Docker and MicroVM based runners coming soon!
diff --git a/appview/pages/templates/user/settings/sites.html b/appview/pages/templates/user/settings/sites.html index 80cdbaa6..eecb378e 100644 --- a/appview/pages/templates/user/settings/sites.html +++ b/appview/pages/templates/user/settings/sites.html @@ -51,7 +51,7 @@ {{ if .Claim }}
- To deploy your site on this domain, read the docs. + To deploy your site on this domain, read the docs.
{{ end }} {{ end }} diff --git a/flake.nix b/flake.nix index 2dbceae7..71bb90aa 100644 --- a/flake.nix +++ b/flake.nix @@ -160,8 +160,7 @@ appview = self.callPackage ./nix/pkgs/appview.nix {}; blog = self.callPackage ./nix/pkgs/blog.nix {}; docs = self.callPackage ./nix/pkgs/docs.nix { - inherit inter-fonts-src ibm-plex-mono-src lucide-src; - inherit (pkgs) pagefind; + inherit inter-fonts-src ibm-plex-mono-src; }; spindle = self.callPackage ./nix/pkgs/spindle.nix {}; shuttle = self.callPackage ./nix/pkgs/shuttle.nix { @@ -467,6 +466,15 @@ exec ${pkgs.python3}/bin/python3 -m http.server 1414 ''); }; + watch-docs = { + type = "app"; + program = toString (pkgs.writeShellScript "watch-docs" '' + export PATH=${pkgs.nodejs}/bin:$PATH + cd docs + [ -d node_modules ] || npm install + exec npm run dev + ''); + }; regenerate-proto = { type = "app"; program = diff --git a/knotserver/motd b/knotserver/motd index 177ec7c6..f700da6b 100644 --- a/knotserver/motd +++ b/knotserver/motd @@ -8,6 +8,6 @@ ...____: '.______.-"""-.__.-' '-.___.' -This is a knot server. More info at https://docs.tangled.org/knot-self-hosting-guide.html +This is a knot server. More info at https://docs.tangled.org/knots/self-hosting/ Most API routes are under /xrpc/ diff --git a/nix/pkgs/docs.nix b/nix/pkgs/docs.nix index 90d72c0f..afa7a202 100644 --- a/nix/pkgs/docs.nix +++ b/nix/pkgs/docs.nix @@ -1,66 +1,33 @@ { - pandoc, - pagefind, - tailwindcss, - runCommandLocal, + buildNpmPackage, inter-fonts-src, ibm-plex-mono-src, - lucide-src, - dolly, src, }: -runCommandLocal "docs" {} '' - mkdir -p working - - # copy templates, themes, styles, filters to working directory - cp ${src}/docs/*.html working/ - cp ${src}/docs/*.theme working/ - cp ${src}/docs/*.css working/ - - # icons - cp -rf ${lucide-src}/*.svg working/ - - # logo - ${dolly}/bin/dolly -output working/dolly.svg -color currentColor - - # content - chunked - ${pandoc}/bin/pandoc ${src}/docs/DOCS.md \ - -o $out/ \ - -t chunkedhtml \ - --variable toc \ - --variable-json single-page=false \ - --toc-depth=2 \ - --css=stylesheet.css \ - --chunk-template="%i.html" \ - --highlight-style=working/highlight.theme \ - --template=working/template.html - - # content - single page - ${pandoc}/bin/pandoc ${src}/docs/DOCS.md \ - -o $out/single-page.html \ - --toc \ - --variable toc \ - --variable single-page \ - --toc-depth=2 \ - --css=stylesheet.css \ - --highlight-style=working/highlight.theme \ - --template=working/template.html - - # fonts - mkdir -p $out/static/fonts - cp -f ${inter-fonts-src}/web/InterVariable*.woff2 $out/static/fonts/ - cp -f ${inter-fonts-src}/web/InterDisplay*.woff2 $out/static/fonts/ - cp -f ${inter-fonts-src}/InterVariable*.ttf $out/static/fonts/ - cp -f ${ibm-plex-mono-src}/fonts/complete/woff2/IBMPlexMono*.woff2 $out/static/fonts/ - - # favicons - ${dolly}/bin/dolly -output $out/static/logos/dolly.png -size 180 - ${dolly}/bin/dolly -output $out/static/logos/dolly.ico -size 48 - ${dolly}/bin/dolly -output $out/static/logos/dolly.svg -color currentColor -favicon - - # styles - cd ${src} && ${tailwindcss}/bin/tailwindcss -i input.css -o $out/stylesheet.css - - # search index - ${pagefind}/bin/pagefind --site $out --output-path $out/pagefind -'' +buildNpmPackage { + pname = "tangled-docs"; + version = "0.0.1"; + + # the docs site compiles the appview's input.css (via its own + # tailwind config), so the build needs the repo root too + inherit src; + sourceRoot = "${src.name}/docs"; + + npmDepsHash = "sha256-6VcF5idQNeSHQuA3qezzQVoCBN93DqAR9YFjkhhZGkg="; + + env.ASTRO_TELEMETRY_DISABLED = "1"; + + preBuild = '' + # self-hosted fonts, same as the appview (see input.css @font-face) + mkdir -p public/static/fonts + cp -f ${inter-fonts-src}/web/InterVariable*.woff2 public/static/fonts/ + cp -f ${inter-fonts-src}/web/InterDisplay*.woff2 public/static/fonts/ + cp -f ${ibm-plex-mono-src}/fonts/complete/woff2/IBMPlexMono*.woff2 public/static/fonts/ + ''; + + installPhase = '' + runHook preInstall + cp -r dist $out + runHook postInstall + ''; +} diff --git a/spindle/motd b/spindle/motd index db861047..a276c394 100644 --- a/spindle/motd +++ b/spindle/motd @@ -20,6 +20,6 @@ ** ******** -This is a spindle server. More info at https://docs.tangled.org/spindles.html#spindles +This is a spindle server. More info at https://docs.tangled.org/spindles/workflows/ Most API routes are under /xrpc/