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:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@@ -10,13 +10,13 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
# 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 latest one is enough
|
||||
include:
|
||||
- typst-version: "0.12"
|
||||
- typst-version: "0.13"
|
||||
doc: 1
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -37,12 +37,10 @@ jobs:
|
||||
with:
|
||||
crate: just
|
||||
|
||||
- name: Install typst-test from github
|
||||
- name: Install tytanic from github
|
||||
uses: baptiste0928/cargo-install@v3
|
||||
with:
|
||||
crate: typst-test
|
||||
git: https://github.com/tingerrr/typst-test.git
|
||||
tag: ci-semi-stable
|
||||
crate: tytanic
|
||||
|
||||
- name: Setup typst
|
||||
uses: typst-community/setup-typst@v3
|
||||
@@ -55,6 +53,7 @@ jobs:
|
||||
sudo apt-get install fonts-roboto
|
||||
./scripts/install-fontawesome
|
||||
./scripts/install-source-sans
|
||||
typst fonts
|
||||
|
||||
- name: Install locally
|
||||
run: just install
|
||||
|
||||
34
Justfile
34
Justfile
@@ -7,39 +7,51 @@ default:
|
||||
@just --list --unsorted
|
||||
|
||||
# generate manual
|
||||
[doc('Generate package documentation')]
|
||||
[group('package')]
|
||||
doc:
|
||||
typst compile docs/manual.typ docs/manual.pdf
|
||||
|
||||
# run test suite
|
||||
test *args:
|
||||
typst-test run {{ args }}
|
||||
[doc('Run test suite. Requires tytanic.')]
|
||||
[group('dev')]
|
||||
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:
|
||||
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:
|
||||
./scripts/package "{{target}}"
|
||||
|
||||
# install the library with the "@local" prefix
|
||||
[doc('Install the library with the "@local" prefix')]
|
||||
[group('dev')]
|
||||
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")
|
||||
|
||||
[private]
|
||||
remove target:
|
||||
./scripts/uninstall "{{target}}"
|
||||
|
||||
# uninstalls the library from the "@local" prefix
|
||||
[doc('Uninstall the library from the "@local" prefix')]
|
||||
[group('dev')]
|
||||
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")
|
||||
|
||||
[doc('Format the source code. Requires typstyle.')]
|
||||
[group('dev')]
|
||||
format:
|
||||
./scripts/format
|
||||
|
||||
# run ci suite
|
||||
[doc('Run ci suite')]
|
||||
[group('dev')]
|
||||
ci: test doc
|
||||
|
||||
16
lib.typ
16
lib.typ
@@ -1,5 +1,5 @@
|
||||
#import "@preview/fontawesome:0.5.0": *
|
||||
#import "@preview/linguify:0.4.1": *
|
||||
#import "@preview/linguify:0.4.2": *
|
||||
|
||||
// const color
|
||||
#let color-darknight = rgb("#131A28")
|
||||
@@ -466,7 +466,6 @@
|
||||
}
|
||||
|
||||
body
|
||||
|
||||
}
|
||||
|
||||
/// The base item for resume entries.
|
||||
@@ -622,7 +621,11 @@
|
||||
show: body => context {
|
||||
set document(
|
||||
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
|
||||
}
|
||||
@@ -731,7 +734,7 @@
|
||||
let contacts = {
|
||||
set box(height: 9pt)
|
||||
|
||||
let separator = [ #box(sym.bar.v) ]
|
||||
let separator = [ #box(sym.bar.v) ]
|
||||
let author_list = ()
|
||||
|
||||
if ("phone" in author) {
|
||||
@@ -862,7 +865,10 @@
|
||||
|
||||
// TODO: Make this adaptable to content
|
||||
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)[
|
||||
#text(weight: "light", fill: color-gray)[
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#import "@local/modern-cv:0.8.0": *
|
||||
|
||||
// setup the document like we do for the resume
|
||||
#let font = ("Source Sans Pro", "Source Sans 3")
|
||||
#let font = ("Source Sans 3")
|
||||
#set text(
|
||||
font: font,
|
||||
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": *
|
||||
|
||||
// setup the document like we do for the resume
|
||||
#let font = ("Source Sans Pro", "Source Sans 3")
|
||||
#let font = ("Source Sans 3")
|
||||
#set text(
|
||||
font: font,
|
||||
size: 11pt,
|
||||
@@ -80,6 +80,8 @@
|
||||
#birth-icon
|
||||
#homepage-icon
|
||||
#website-icon
|
||||
#gitlab-icon
|
||||
#bitbucket-icon
|
||||
|
||||
#square(size: 1em, fill: color-darkgray)
|
||||
#square(size: 1em, fill: color-darknight)
|
||||
|
||||
Reference in New Issue
Block a user