Skip to content

Allow to define assets such as images #43

@svetlyak40wt

Description

@svetlyak40wt

Right now I'm using docs-builder and this workaround for copying static folder to the results dir:

(defmethod docs-builder/builder:build :around ((builder t) (system (eql (asdf:registered-system "multiplication-docs")))
                                               &rest rest
                                               &key local root-sections)
  (declare (ignore rest local root-sections))
  (let* ((target-dir (call-next-method))
         (static-dir (namestring
                      (merge-pathnames (make-pathname :directory '(:relative "static"))
                                       target-dir))))

    (uiop:run-program (format nil "rm -fr ~A"
                              static-dir))
    ;; We keep static in the root folder to make images accessable
    ;; from the README
    (uiop:run-program (format nil "cp -R static ~A"
                              static-dir))))

It would be cool to define the image in the lisp code like this:

(defasset @demo.gif #"static/demo.gif")

And to refer it in the documentation as @DEMO.GIF having this to be replaced with the path to the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions