Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define assets such as images #43

Open
svetlyak40wt opened this issue Mar 8, 2024 · 0 comments
Open

Allow to define assets such as images #43

svetlyak40wt opened this issue Mar 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@svetlyak40wt
Copy link
Member

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.

@svetlyak40wt svetlyak40wt added the enhancement New feature or request label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant