diff --git a/.github/assets/example.png b/.github/assets/example.png new file mode 100644 index 0000000..3fa7189 Binary files /dev/null and b/.github/assets/example.png differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56f95f6..dd54729 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,3 +15,17 @@ jobs: uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 - name: pre-commit run: pixi run pre-commit-run --color=always --show-diff-on-failure + + compile: + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v4 + - name: Set up pixi + uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 + - name: Link packages + run: | + mkdir -p ~/.local/share/typst/packages/preview/moderner-cv + ln -s $(pwd) ~/.local/share/typst/packages/preview/moderner-cv/0.1.0 + - name: compile + run: pixi run compile diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a3c46a5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Pavel Zwerschke + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6dac0f8 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# moderner-cv + +This is a typst adaptation of LaTeX's [moderncv](https://github.com/moderncv/moderncv), a modern curriculum vitae class. + +## Requirements + +This template uses FontAwesome icons via the [fontawesome typst package](https://typst.app/universe/package/fontawesome). +In order to properly use it, you need to have fontawesome installed on your system or have typst configured (via `--font-path`) to use the fontawesome font files. +You can download fontawesome [here](https://fontawesome.com/download). + +## Usage + +```typst +#import "moderner-cv.typ": * + +#show: moderner-cv.with( + name: "Jane Doe", + lang: "en", + social: ( + email: "jane.doe@example.com", + github: "jane-doe", + linkedin: "jane-doe", + ), +) + +// ... +``` + +## Examples + +![Jane Doe's CV](.github/assets/example.png) + +## Building and Testing Locally + +To build and test the template locally, you can run `pixi run watch` in the root of this repository. +Please ensure to have linked this package to your local typst packages, see [here](https://github.com/typst/packages#local-packages): + +```bash +# linux +mkdir -p ~/.local/share/typst/packages/preview/moderner-cv +ln -s $(pwd) ~/.local/share/typst/packages/preview/moderner-cv/0.1.0 + +# macos +mkdir -p ~/Library/Application\ Support/typst/packages/preview/moderner-cv +ln -s $(pwd) ~/Library/Application\ Support/typst/packages/preview/moderner-cv/0.1.0 +``` diff --git a/moderner-cv.typ b/lib.typ similarity index 99% rename from moderner-cv.typ rename to lib.typ index fa6e264..cfbb601 100644 --- a/moderner-cv.typ +++ b/lib.typ @@ -154,7 +154,6 @@ ) } -// TODO: adjust list style #let cv-list-item(item) = { _cv-line( [], diff --git a/pixi.toml b/pixi.toml index 27f0ac7..ac65726 100644 --- a/pixi.toml +++ b/pixi.toml @@ -4,8 +4,8 @@ channels = ["conda-forge"] platforms = ["osx-arm64", "linux-64", "win-64"] [tasks] -watch = "typst watch --font-path=fonts example.typ" -compile = "typst compile --font-path=fonts example.typ" +watch = "typst watch --font-path=fonts template/example.typ" +compile = "typst compile --font-path=fonts template/example.typ" pre-commit-run = "pre-commit run -a" [dependencies] diff --git a/example.typ b/template/example.typ similarity index 96% rename from example.typ rename to template/example.typ index d659979..1209266 100644 --- a/example.typ +++ b/template/example.typ @@ -1,4 +1,4 @@ -#import "moderner-cv.typ": * +#import "@preview/moderner-cv:0.1.0": * #show: moderner-cv.with( name: "Jane Doe", diff --git a/typst.toml b/typst.toml new file mode 100644 index 0000000..efb4bc7 --- /dev/null +++ b/typst.toml @@ -0,0 +1,19 @@ +[package] +name = "moderner-cv" +version = "0.1.0" +compiler = "0.11.1" +entrypoint = "lib.typ" +authors = ["Pavel Zwerschke <@pavelzw>"] +license = "MIT" +description = "A resume template based on the moderncv LaTeX package." +keywords = ["CV", "Curriculum Vitae", "Resume", "Minimalistic", "Professional", "Modern"] +categories = ["cv"] +disciplines = [] +exclude = ["pixi.*", ".pixi"] +homepage = "https://github.com/pavelzw/moderner-cv" +repository = "https://github.com/pavelzw/moderner-cv" + +[template] +path = "template" +entrypoint = "example.typ" +thumbnail = ".github/assets/example.png"