chore: typst 0.13 updates (#113)
* chore: upgrade linguify * chore: update tests * fix: remove deprecated type checks * chore: improve Justfile docs * chore: compile with typst 0.12 and 0.13 in CI * chore: use tytanic for testing * chore: use tytanic in CI * fix: don't use ubuntu-latest * fix: test runner issues * chore: trying to fix CI issues * fix: remove unused font in tests * fix: update references
This commit is contained in:
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -14,7 +14,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@@ -10,13 +10,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# add any other Typst versions that your package should support
|
# add any other Typst versions that your package should support
|
||||||
typst-version: ["0.12"]
|
typst-version: ["0.12", "0.13"]
|
||||||
# the docs don't need to build with all versions supported by the package;
|
# the docs don't need to build with all versions supported by the package;
|
||||||
# the latest one is enough
|
# the latest one is enough
|
||||||
include:
|
include:
|
||||||
- typst-version: "0.12"
|
- typst-version: "0.13"
|
||||||
doc: 1
|
doc: 1
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -37,12 +37,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
crate: just
|
crate: just
|
||||||
|
|
||||||
- name: Install typst-test from github
|
- name: Install tytanic from github
|
||||||
uses: baptiste0928/cargo-install@v3
|
uses: baptiste0928/cargo-install@v3
|
||||||
with:
|
with:
|
||||||
crate: typst-test
|
crate: tytanic
|
||||||
git: https://github.com/tingerrr/typst-test.git
|
|
||||||
tag: ci-semi-stable
|
|
||||||
|
|
||||||
- name: Setup typst
|
- name: Setup typst
|
||||||
uses: typst-community/setup-typst@v3
|
uses: typst-community/setup-typst@v3
|
||||||
@@ -55,6 +53,7 @@ jobs:
|
|||||||
sudo apt-get install fonts-roboto
|
sudo apt-get install fonts-roboto
|
||||||
./scripts/install-fontawesome
|
./scripts/install-fontawesome
|
||||||
./scripts/install-source-sans
|
./scripts/install-source-sans
|
||||||
|
typst fonts
|
||||||
|
|
||||||
- name: Install locally
|
- name: Install locally
|
||||||
run: just install
|
run: just install
|
||||||
|
|||||||
34
Justfile
34
Justfile
@@ -7,39 +7,51 @@ default:
|
|||||||
@just --list --unsorted
|
@just --list --unsorted
|
||||||
|
|
||||||
# generate manual
|
# generate manual
|
||||||
|
[doc('Generate package documentation')]
|
||||||
|
[group('package')]
|
||||||
doc:
|
doc:
|
||||||
typst compile docs/manual.typ docs/manual.pdf
|
typst compile docs/manual.typ docs/manual.pdf
|
||||||
|
|
||||||
# run test suite
|
[doc('Run test suite. Requires tytanic.')]
|
||||||
test *args:
|
[group('dev')]
|
||||||
typst-test run {{ args }}
|
test *args: install
|
||||||
|
tt run {{ args }} --use-system-fonts --no-fail-fast
|
||||||
|
|
||||||
# update test cases
|
[doc('Update test cases. Requires tytanic.')]
|
||||||
|
[group('dev')]
|
||||||
update *args:
|
update *args:
|
||||||
typst-test update {{ args }}
|
tt update {{ args }} --use-system-fonts
|
||||||
|
|
||||||
# package the library into the specified destination folder
|
[doc('Package the library into the specified destination folder')]
|
||||||
|
[group('package')]
|
||||||
package target:
|
package target:
|
||||||
./scripts/package "{{target}}"
|
./scripts/package "{{target}}"
|
||||||
|
|
||||||
# install the library with the "@local" prefix
|
[doc('Install the library with the "@local" prefix')]
|
||||||
|
[group('dev')]
|
||||||
install: (package "@local")
|
install: (package "@local")
|
||||||
|
|
||||||
# install the library with the "@preview" prefix (for pre-release testing)
|
[doc('Install the library with the "@preview" prefix (for pre-release testing)')]
|
||||||
|
[group('dev')]
|
||||||
install-preview: (package "@preview")
|
install-preview: (package "@preview")
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
remove target:
|
remove target:
|
||||||
./scripts/uninstall "{{target}}"
|
./scripts/uninstall "{{target}}"
|
||||||
|
|
||||||
# uninstalls the library from the "@local" prefix
|
[doc('Uninstall the library from the "@local" prefix')]
|
||||||
|
[group('dev')]
|
||||||
uninstall: (remove "@local")
|
uninstall: (remove "@local")
|
||||||
|
|
||||||
# uninstalls the library from the "@preview" prefix (for pre-release testing)
|
[doc('Uninstall the library from the "@preview" prefix (for pre-release testing)')]
|
||||||
|
[group('dev')]
|
||||||
uninstall-preview: (remove "@preview")
|
uninstall-preview: (remove "@preview")
|
||||||
|
|
||||||
|
[doc('Format the source code. Requires typstyle.')]
|
||||||
|
[group('dev')]
|
||||||
format:
|
format:
|
||||||
./scripts/format
|
./scripts/format
|
||||||
|
|
||||||
# run ci suite
|
[doc('Run ci suite')]
|
||||||
|
[group('dev')]
|
||||||
ci: test doc
|
ci: test doc
|
||||||
|
|||||||
14
lib.typ
14
lib.typ
@@ -1,5 +1,5 @@
|
|||||||
#import "@preview/fontawesome:0.5.0": *
|
#import "@preview/fontawesome:0.5.0": *
|
||||||
#import "@preview/linguify:0.4.1": *
|
#import "@preview/linguify:0.4.2": *
|
||||||
|
|
||||||
// const color
|
// const color
|
||||||
#let color-darknight = rgb("#131A28")
|
#let color-darknight = rgb("#131A28")
|
||||||
@@ -466,7 +466,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body
|
body
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The base item for resume entries.
|
/// The base item for resume entries.
|
||||||
@@ -622,7 +621,11 @@
|
|||||||
show: body => context {
|
show: body => context {
|
||||||
set document(
|
set document(
|
||||||
author: author.firstname + " " + author.lastname,
|
author: author.firstname + " " + author.lastname,
|
||||||
title: lflib._linguify("cover-letter", lang: language, from: lang_data).ok,
|
title: lflib._linguify(
|
||||||
|
"cover-letter",
|
||||||
|
lang: language,
|
||||||
|
from: lang_data,
|
||||||
|
).ok,
|
||||||
)
|
)
|
||||||
body
|
body
|
||||||
}
|
}
|
||||||
@@ -862,7 +865,10 @@
|
|||||||
|
|
||||||
// TODO: Make this adaptable to content
|
// TODO: Make this adaptable to content
|
||||||
underline(evade: false, stroke: 0.5pt, offset: 0.3em)[
|
underline(evade: false, stroke: 0.5pt, offset: 0.3em)[
|
||||||
#text(weight: "bold", size: 12pt)[#linguify("letter-position-pretext", from: lang_data) #job-position]
|
#text(weight: "bold", size: 12pt)[#linguify(
|
||||||
|
"letter-position-pretext",
|
||||||
|
from: lang_data,
|
||||||
|
) #job-position]
|
||||||
]
|
]
|
||||||
pad(top: 1em, bottom: 1em)[
|
pad(top: 1em, bottom: 1em)[
|
||||||
#text(weight: "light", fill: color-gray)[
|
#text(weight: "light", fill: color-gray)[
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#import "@local/modern-cv:0.8.0": *
|
#import "@local/modern-cv:0.8.0": *
|
||||||
|
|
||||||
// setup the document like we do for the resume
|
// setup the document like we do for the resume
|
||||||
#let font = ("Source Sans Pro", "Source Sans 3")
|
#let font = ("Source Sans 3")
|
||||||
#set text(
|
#set text(
|
||||||
font: font,
|
font: font,
|
||||||
size: 11pt,
|
size: 11pt,
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@@ -1,7 +1,7 @@
|
|||||||
#import "@local/modern-cv:0.8.0": *
|
#import "@local/modern-cv:0.8.0": *
|
||||||
|
|
||||||
// setup the document like we do for the resume
|
// setup the document like we do for the resume
|
||||||
#let font = ("Source Sans Pro", "Source Sans 3")
|
#let font = ("Source Sans 3")
|
||||||
#set text(
|
#set text(
|
||||||
font: font,
|
font: font,
|
||||||
size: 11pt,
|
size: 11pt,
|
||||||
@@ -80,6 +80,8 @@
|
|||||||
#birth-icon
|
#birth-icon
|
||||||
#homepage-icon
|
#homepage-icon
|
||||||
#website-icon
|
#website-icon
|
||||||
|
#gitlab-icon
|
||||||
|
#bitbucket-icon
|
||||||
|
|
||||||
#square(size: 1em, fill: color-darkgray)
|
#square(size: 1em, fill: color-darkgray)
|
||||||
#square(size: 1em, fill: color-darknight)
|
#square(size: 1em, fill: color-darknight)
|
||||||
|
|||||||
Reference in New Issue
Block a user