dundalek / dinodoc

Polyglot documentation system for building unified documentation sites

Home Page:https://dinodoc.pages.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

it is unclear from the documentation how to run the program

Wanderwichtl opened this issue · comments

Hello,
I have some problems to run the program with the documentation.
When I try to run

(ns doc
  (:require [dinodoc.api :as dinodoc]))

(dinodoc/generate
 {:inputs ["."]
  :output-path "docs"})

I get a null reference error here https://github.com/dundalek/dinodoc/blob/v0.2.0/src/dinodoc/impl/quickdoc/impl.clj#L91C30-L91C36
If I use :inputs {:git/branch "master"} then I get

{:type java.util.regex.PatternSyntaxException,
    :message
    "Explicit 'name separator' in class near index 42\n/home/foobar/Documents/dev/foobarproject/[:git/branch \"master\"]/doc/*.md\n                                          ^",
    :at [sun.nio.fs.Globs toRegexPattern "Globs.java" 115]}]

Hi, thanks for the report. It looks like you are not running it from within a git repo (which is used for detection in order to generate links to source code).

But, the error message is bad, therefore I consider this a bug and am going to make a fix. Probably making the generation of source links optional.

As a workaround for now you could try:

(dinodoc/generate
 {:inputs ["."]
  :output-path "docs"
  :git/branch "master"
  :github/repo "dummy"})

@Wanderwichtl I pushed a fix to the main branch. I plan to publish a tagged release in the next few days. In the meantime you can use the following dep which should work without needing the workaround above:
io.github.dundalek/dinodoc {:git/sha "4ffa00a0b162d35d72291beb7348a2bae286aa57"}

Thanks @dundalek, for the workaround, it worked flawlessly! Also a huge thanks for your dinodoc project.

Thanks, let me know if you encounter other issues or have suggestions for improvement. There is always interesting feedback when trying to apply the system on real world projects.

New version v0.3.0 with the fix is now published.