Skip to content

Commit

Permalink
Merge branch 'master' of github.com:40ants/docs-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed Dec 1, 2023
2 parents 9e60f85 + f6182d2 commit 12b6827
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 13 deletions.
15 changes: 15 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

# ChangeLog

<a id="x-28DOCS-BUILDER-2FCHANGELOG-3A-3A-7C0-2E11-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

## 0.11.0 (2023-06-05)

* Now docs builder tries to load system using either Quicklisp client or `ASDF` if system is not already loaded.

* Also a bug was fixed - previously [`docs-builder:build`][febf] function hanged in recursion in case if asdf system wasn't found.
Now it will show an error.

<a id="x-28DOCS-BUILDER-2FCHANGELOG-3A-3A-7C0-2E10-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

## 0.10.0 (2022-11-16)

Support new refactored [`40ants-doc`][a2c7] system.

<a id="x-28DOCS-BUILDER-2FCHANGELOG-3A-3A-7C0-2E9-2E1-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

## 0.9.1 (2022-10-26)
Expand Down
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

* Source control: [GIT][843b]

* Depends on: [40ants-doc][2c00], [alexandria][8236], [docs-config][ce67], [log4cl][7f8b], [uiop][5274]

This system is a generic documentation builder for Common Lisp Systems.
It able to generate `HTML` documentation for specified `ASDF` system.

Expand Down Expand Up @@ -49,15 +51,15 @@ From the `REPL`, you need first to call a [`docs-builder:build`][febf] function:

<a id="x-28DOCS-BUILDER-3ABUILD-20FUNCTION-29"></a>

#### [function](de45) `docs-builder:build` system &rest rest &key (error-on-warnings t) &allow-other-keys
#### [function](6a20) `docs-builder:build` system &rest rest &key (error-on-warnings t) &allow-other-keys

Builds `HTML` documentation for `ASDF` system and returns absolute path to the dir with docs.

Inside, it will try to guess which documentation builder should be used:

<a id="x-28DOCS-BUILDER-2FGUESSER-3AGUESS-BUILDER-20GENERIC-FUNCTION-29"></a>

#### [generic-function](c645) `docs-builder/guesser:guess-builder` system
#### [generic-function](77d5) `docs-builder/guesser:guess-builder` system

Returns a builder object which can be passed to the [`docs-builder/builder:build`][9de0] generic-function along with system.

Expand All @@ -69,7 +71,7 @@ Then it will pass the builder object and `ASDF` system to the [`docs-builder/bui

<a id="x-28DOCS-BUILDER-2FBUILDER-3ABUILD-20GENERIC-FUNCTION-29"></a>

#### [generic-function](1424) `docs-builder/builder:build` builder system &key local root-sections &allow-other-keys
#### [generic-function](589d) `docs-builder/builder:build` builder system &key local root-sections &allow-other-keys

Builds `HTML` documentation for `ASDF` system and returns absolute path to the dir with docs.

Expand Down Expand Up @@ -158,7 +160,7 @@ You can customize a builder by defining a method for this generic function:
<a id="x-28DOCS-CONFIG-3ADOCS-CONFIG-20GENERIC-FUNCTION-29"></a>
#### [generic-function](684a) `docs-config:docs-config` asdf-system
#### [generic-function](e256) `docs-config:docs-config` asdf-system

Should return a plist which will be passed as keyword
arguments to the documentation builder when building
Expand Down Expand Up @@ -221,16 +223,21 @@ a method looks like when I configure Weblocks documentation builder:
[8884]: https://cl-doc-systems.github.io/
[843b]: https://github.com/40ants/docs-builder
[100b]: https://github.com/40ants/docs-builder/actions
[1424]: https://github.com/40ants/docs-builder/blob/ba6c6cb1b624f29e1be41b5fbf090fa1b78da7fb/src/builder.lisp#L10
[684a]: https://github.com/40ants/docs-builder/blob/ba6c6cb1b624f29e1be41b5fbf090fa1b78da7fb/src/config.lisp#L9
[de45]: https://github.com/40ants/docs-builder/blob/ba6c6cb1b624f29e1be41b5fbf090fa1b78da7fb/src/core.lisp#L29
[c645]: https://github.com/40ants/docs-builder/blob/ba6c6cb1b624f29e1be41b5fbf090fa1b78da7fb/src/guesser.lisp#L14
[589d]: https://github.com/40ants/docs-builder/blob/d90b94f54a75fb943c4e8e7088809f325021623e/src/builder.lisp#L10
[e256]: https://github.com/40ants/docs-builder/blob/d90b94f54a75fb943c4e8e7088809f325021623e/src/config.lisp#L9
[6a20]: https://github.com/40ants/docs-builder/blob/d90b94f54a75fb943c4e8e7088809f325021623e/src/core.lisp#L29
[77d5]: https://github.com/40ants/docs-builder/blob/d90b94f54a75fb943c4e8e7088809f325021623e/src/guesser.lisp#L14
[7d71]: https://github.com/40ants/docs-builder/issues
[7927]: https://github.com/melisgl/mgl-pax
[795a]: https://github.com/roswell/roswell
[f9f7]: https://guicho271828.github.io/eazy-documentation/
[05ae]: https://inters.co/geneva/open-geneva.html
[9f4c]: https://pages.github.com/
[2c00]: https://quickdocs.org/40ants-doc
[8236]: https://quickdocs.org/alexandria
[ce67]: https://quickdocs.org/docs-config
[7f8b]: https://quickdocs.org/log4cl
[5274]: https://quickdocs.org/uiop

* * *
###### [generated by [40ANTS-DOC](https://40ants.com/doc/)]
6 changes: 3 additions & 3 deletions qlfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
("quicklisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2021-10-21"))
:version "2023-02-15"))
("ultralisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://dist.ultralisp.org" :%version :latest)
:version "20211026222000"))
:version "20230605020501"))
("sly" .
(:class qlot/source/github:source-github
:initargs (:repos "svetlyak40wt/sly" :ref nil :branch "patches" :tag nil)
:version "github-028f191582f27e6f1582840c09e6508d71aaa0ab"))
:version "github-030a8441f57f7e0bb401570935e741dfd9edfb83"))
4 changes: 4 additions & 0 deletions src/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"ERROR-ON-WARNINGS"
"DYNAMIC-BINDINGS")
:external-docs ("https://40ants.com/doc/"))
(0.11.0 2023-06-05
"* Now docs builder tries to load system using either Quicklisp client or ASDF if system is not already loaded.
* Also a bug was fixed - previously DOCS-BUILDER:BUILD function hanged in recursion in case if asdf system wasn't found.
Now it will show an error.")
(0.10.0 2022-11-16
"Support new refactored 40ANTS-DOC system.")
(0.9.1 2022-10-26
Expand Down
20 changes: 18 additions & 2 deletions src/guesser.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,28 @@ If you want to add support for a new documentation generator, use DEFGUESSER mac
(pushnew ',name *guessers*)))


(defun find-or-load-system (system-name)
(let ((system (asdf:registered-system system-name)))
(cond
(system system)
(t
(let ((system (progn
#+quicklisp
(ql:quickload system-name)
#-quicklisp
(asdf:load-system system-name)
(asdf:registered-system system-name))))
(unless system
(error "Unable to load system \"~A\" ensure it is accessible to ASDF or Quicklisp."
system-name))
(values system))))))

(defmethod guess-builder ((system symbol))
(guess-builder (asdf:registered-system system)))
(guess-builder (find-or-load-system system)))


(defmethod guess-builder ((system string))
(guess-builder (asdf:registered-system system)))
(guess-builder (find-or-load-system system)))


(defmethod guess-builder ((system asdf:system))
Expand Down

0 comments on commit 12b6827

Please sign in to comment.