From 9dd80a7e600e4e29d3e56684bcb341e7fe124eba Mon Sep 17 00:00:00 2001 From: paku Date: Sat, 11 Jan 2025 09:52:57 +0000 Subject: [PATCH] Migrate from GitHub to Forgejo (#1) Reviewed-on: http://code.skyizwhite.dev/paku/hsx/pulls/1 Co-authored-by: paku Co-committed-by: paku --- .forgejo/workflows/CI.yml | 59 ++++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 29 ------------------- README.md | 25 ++++++++++------ qlfile | 6 ++-- qlfile.lock | 24 ++++++++-------- 5 files changed, 90 insertions(+), 53 deletions(-) create mode 100644 .forgejo/workflows/CI.yml delete mode 100644 .github/workflows/test.yml diff --git a/.forgejo/workflows/CI.yml b/.forgejo/workflows/CI.yml new file mode 100644 index 0000000..6ca5aa9 --- /dev/null +++ b/.forgejo/workflows/CI.yml @@ -0,0 +1,59 @@ +name: 'CI' + +on: + push: + branches: + - 'master' + pull_request: + +jobs: + test: + runs-on: docker + + strategy: + matrix: + lisp: + - sbcl-bin + + steps: + - uses: actions/checkout@v4 + + - name: Restore cache + id: restore-cache + uses: actions/cache/restore@v4 + with: + path: | + /usr/local/bin/ros + /usr/local/etc/roswell/ + ~/.roswell + ~/.config/common-lisp/source-registry.conf.d + ~/lisp + .qlot/ + key: roswell-${{ runner.os }}-${{ matrix.lisp }}-${{ hashFiles('qlfile.lock') }} + + - name: Install dependencies + if: steps.restore-cache.outputs.cache-hit != 'true' + env: + LISP: ${{ matrix.lisp }} + run: | + curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh + ros install fukamachi/qlot + PATH="~/.roswell/bin:$PATH" + qlot install + + - name: Save cache + id: save-cache + uses: actions/cache/save@v4 + if: steps.restore-cache.outputs.cache-hit != 'true' + with: + path: | + /usr/local/bin/ros + /usr/local/etc/roswell/ + ~/.roswell + ~/.config/common-lisp/source-registry.conf.d + ~/lisp + .qlot/ + key: ${{ steps.restore-cache.outputs.cache-primary-key }} + + - name: Run tests + run: .qlot/bin/rove hsx.asd diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index decfc7c..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: 'test' - -on: - push: - branches: - - 'master' - pull_request: - -jobs: - tests: - runs-on: ubuntu-latest - - strategy: - matrix: - lisp: - - sbcl-bin - - ccl-bin - - env: - LISP: ${{ matrix.lisp }} - - steps: - - uses: actions/checkout@v4 - - uses: 40ants/setup-lisp@v4 - with: - asdf-system: hsx - - uses: 40ants/run-tests@v2 - with: - asdf-system: hsx diff --git a/README.md b/README.md index b036ba3..d07a845 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # HSX -HSX (Hypertext S-expression) is a simple and powerful HTML (Living Standard) generation library for Common Lisp. +HSX (Hypertext S-expression) is a simple and powerful HTML (Living Standard) +generation library for Common Lisp. This project is a fork of [ailisp/flute](https://github.com/ailisp/flute/). @@ -8,13 +9,16 @@ This project is a fork of [ailisp/flute](https://github.com/ailisp/flute/). This software is still in ALPHA quality. The APIs are likely to change. -Please check the [release notes](https://github.com/skyizwhite/hsx/releases) for updates. +Please check the [release notes](https://code.skyizwhite.dev/paku/hsx/releases) +for updates. ## Getting Started ### Basic Usage -Use the `hsx` macro to create HTML elements. Attributes are specified using a property list after the element name, and child elements are nested directly inside. +Use the `hsx` macro to create HTML elements. Attributes are specified using a +property list after the element name, and child elements are nested directly +inside. ```lisp (hsx @@ -32,7 +36,8 @@ This generates: ``` -To convert an HSX object into an HTML string, use the `render-to-string` function: +To convert an HSX object into an HTML string, use the `render-to-string` +function: ```lisp (render-to-string @@ -43,7 +48,8 @@ To convert an HSX object into an HTML string, use the `render-to-string` functio HSX allows you to embed Common Lisp forms directly within your HTML structure. -When working with HSX elements inside embedded Lisp forms, you should use the `hsx` macro again. +When working with HSX elements inside embedded Lisp forms, you should use the +`hsx` macro again. ```lisp (hsx @@ -76,7 +82,8 @@ This might generate: ### Using Fragments -To group multiple elements without adding an extra wrapper, use the fragment `<>`. +To group multiple elements without adding an extra wrapper, use the fragment +`<>`. ```lisp (hsx @@ -96,7 +103,9 @@ This generates: ### Creating Components -You can define reusable components using the `defcomp` macro. Component names must begin with a tilde (`~`). Properties should be declared using `&key`, `&rest`, or both. The body must return an HSX element. +You can define reusable components using the `defcomp` macro. Component names +must begin with a tilde (`~`). Properties should be declared using `&key`, +`&rest`, or both. The body must return an HSX element. ```lisp (defcomp ~card (&key title children) @@ -140,5 +149,3 @@ This project is licensed under the MIT License. © 2024 skyizwhite © 2018 Bo Yao - -Feel free to contribute to the project and report any issues or feature requests on the [GitHub repository](https://github.com/skyizwhite/hsx). diff --git a/qlfile b/qlfile index 4f02666..6b6b356 100644 --- a/qlfile +++ b/qlfile @@ -1,6 +1,6 @@ ql alexandria ql cl-str -github rove fukamachi/rove -github dissect Shinmera/dissect ; workaround -ql mstrings +git rove https://github.com/fukamachi/rove +git dissect https://github.com/Shinmera/dissect ; workaround +git mstrings https://git.sr.ht/~shunter/mstrings diff --git a/qlfile.lock b/qlfile.lock index 8cadf24..41f11ce 100644 --- a/qlfile.lock +++ b/qlfile.lock @@ -1,24 +1,24 @@ ("quicklisp" . (:class qlot/source/dist:source-dist :initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest) - :version "2023-10-21")) + :version "2024-10-12")) ("alexandria" . (:class qlot/source/ql:source-ql :initargs (:%version :latest) - :version "ql-2023-10-21")) + :version "ql-2024-10-12")) ("cl-str" . (:class qlot/source/ql:source-ql :initargs (:%version :latest) - :version "ql-2023-10-21")) + :version "ql-2024-10-12")) ("rove" . - (:class qlot/source/github:source-github - :initargs (:repos "fukamachi/rove" :ref nil :branch nil :tag nil) - :version "github-cacea7331c10fe9d8398d104b2dfd579bf7ea353")) + (:class qlot/source/git:source-git + :initargs (:remote-url "https://github.com/fukamachi/rove") + :version "git-cacea7331c10fe9d8398d104b2dfd579bf7ea353")) ("dissect" . - (:class qlot/source/github:source-github - :initargs (:repos "Shinmera/dissect" :ref nil :branch nil :tag nil) - :version "github-a70cabcd748cf7c041196efd711e2dcca2bbbb2c")) + (:class qlot/source/git:source-git + :initargs (:remote-url "https://github.com/Shinmera/dissect") + :version "git-a70cabcd748cf7c041196efd711e2dcca2bbbb2c")) ("mstrings" . - (:class qlot/source/ql:source-ql - :initargs (:%version :latest) - :version "ql-2023-10-21")) + (:class qlot/source/git:source-git + :initargs (:remote-url "https://git.sr.ht/~shunter/mstrings") + :version "git-7a94c070141c7cd03bbd3648b17724c3bf143393"))