Enable CI/CD by adding .onedev-buildspec.yml
| src/main | Loading last commit info... | |
| .gitignore | ||
| README.org | ||
| flake.lock | ||
| flake.nix | ||
| pom.xml |
README.org
OneDev plugin that adds org-mode file rendering via pandoc.
What it does
- Renders
.orgfiles in the repository browser using pandoc for HTML conversion - Attempts to display
README.orgin folder views when noREADME.mdis present - Inherits OneDev's existing markup CSS (
markdown-renderedclass)
Architecture
OrgModule (Guice entry point)
├── BlobRenderer → OrgBlobRenderer
│ └── OrgBlobViewPanel (Wicket panel, reads blob, calls pandoc)
├── OrgRenderService → DefaultOrgRenderService
│ └── Shells out to pandoc --from=org --to=html5
└── WebApplicationConfigurator → OrgReadmeSupport
└── IComponentInstantiationListener on FolderViewPanel
└── Behavior that replaces readme placeholder with OrgReadmePanel
Building
nix build
The output goes to result/share/onedev-plugins/*.jar.
For development:
nix develop
mvn package -Dmaven.test.skip=true
Integration with ~/nix
The ~/nix/flake.nix consumes this flake as an input. The server-onedev-org NixOS module:
- Adds the plugin JAR to OneDev's
lib/directory viaextraPlugins - Adds
pandocto the systemd service PATH viaextraPath
Caveats
- Folder README.org display uses reflection to hook into
FolderViewPanelinternals. This may break across OneDev major version upgrades. Individual.orgfile rendering (BlobRenderer) uses a stable extension point and is not affected. - Pandoc must be on the OneDev service's PATH. The NixOS module handles this.
- Files larger than 2 MiB fall back to raw
<pre>display.