All repositories

astro-git-view

License

A server-side generated source code explorer for git-repositories

2022-05-14 17:33 npm dependencies updated
Siver K. Volle 8a011bd
2022-05-14 17:33 npm dependencies updated master Siver K. Volle 8a011bd
2022-05-01 20:33 astr-lunr@0.0.2 Siver K. Volle b879cee
2022-05-01 20:12 SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR Siver K. Volle 9b5fdf1
2022-04-18 20:03 astro-lunr as its own repo Siver K. Volle 53e9aa9
2022-04-18 19:51 initial steps to turn astro-lunr into its own repo Siver K. Volle a0ab44c
2022-04-18 18:39 better lunr in dev-mode; better file diffs Siver K. Volle 9a34364
2022-04-17 19:29 support for github pages; max-lines in file view Siver K. Volle f3e5297
2022-04-16 13:57 commit-page with line diffs Siver K. Volle 304458c
2022-04-16 00:25 Included readme and licenses; made the plugins into npm-modules; removed more dead-links and ui/ux-bugs Siver K. Volle 8024c0a
2022-04-15 17:21 Multi-repo support; refactored astro-git and astro-lunr into independent plugins Siver K. Volle 37a934a
2022-04-14 10:00 lunr-based indexing and search integration; assorted minor ux/ui improvements Siver K. Volle 885875b
2022-04-12 19:25 Basic functionality, with some some dead links Siver K. Volle 1a4b2c5
astro-git-view / .
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
Basic functionality, with some some dead links 2022-04-12 19:25
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
commit-page with line diffs 2022-04-16 13:57
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
Included readme and licenses; made the plugins into npm-modules; removed more dead-links and ui/ux-bugs 2022-04-16 00:25
npm dependencies updated 2022-05-14 17:33
npm dependencies updated 2022-05-14 17:33
npm dependencies updated 2022-05-14 17:33
Basic functionality, with some some dead links 2022-04-12 19:25
SSR- and SSG+SSR-modes; file- and line-diffs; docker for local testing SSG+SSR 2022-05-01 20:12
astro-git-view / README.md
56 lines (32 sloc) | 2.0 KB

Astro Git View

A server-side generated source code explorer for git-repositories, inspired by stagit, built with Astro

See astro-git and astro-lunr for the astro-plugins that supply most of the functionality.

Pure SSG demo on Github Pages

SSG/SSR-hybrid demo on git.kvissleik.no

The SSG/SSR-hybrid maintains the full tree-view for each included branch and tag, but specific commits and raw files are served using the SSR-module.

Commands

All commands are run from the root of the project, from a terminal:

CommandAction
npm ci --ignore-scriptsInstalls dependencies
npm run dev -- --experimental-integrationsStarts local dev server at localhost:3000
npm run build -- --experimental-integrationsBuild your production site to ./dist/
npm run preview -- --experimental-integrationsPreview your build locally, before deploying

Running SSR

in Docker

SSR is SSR-only, but for deployment, I want SSG for common resources, and SSR for the more obscure parts.

To use:

docker compose up -d

This will start a server at localhost:80

Standalone

npm run build-ssr -- --experimental-integrations
npm run serve-ssr -- --experimental-integrations

Then go to localhost:12549

Static assets are not included, meaning styling and scripting will be missing.

SSR + astro-lunr

Note that astro-lunr is currently not removing the <lunr-document/>-elements when hosted using SSR. (Seems like options.addRenderer is not included by the adapter?)

Therefore a temporary css-style of lunr-document {display: none} is included in main.css;