Skip to content

Commit

Permalink
feat: bump version to v2.0.3 (#68)
Browse files Browse the repository at this point in the history
* chore: bump version

* chore: bump version in all files

* fix: change footer insert logic

Footer function now will be inserted via page footer property rather than manual invocation; this can make sure that every page has correctly a footer

* fix: make personal info items optional in metadata schema (#65)

* github: add release workflow

* github: organize workflows
  • Loading branch information
yunanwg authored Oct 9, 2024
1 parent ba8212f commit 2732951
Show file tree
Hide file tree
Showing 29 changed files with 84 additions and 83 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
workflow_dispatch:

jobs:
compile:
Expand All @@ -21,18 +20,6 @@ jobs:
name: docs
path: ./docs/docs.pdf

release:
runs-on: ubuntu-latest
needs: compile
steps:
- uses: actions/download-artifact@v4
with:
name: docs
- uses: softprops/action-gh-release@v2
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
files: ./docs/docs.pdf

deploy:
runs-on: ubuntu-latest
permissions:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
push:
tags:
- 'v*.*.*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ It is recommended to:
For the time being, upgrade can be achieved by manually "find and replace" the import statements in batch in your favorite IDE. For example:

```typst
#import "@preview/brilliant-cv:2.0.0" -> #import "@preview/brilliant-cv:2.0.2"
#import "@preview/brilliant-cv:2.0.0" -> #import "@preview/brilliant-cv:2.0.3"
```

**Make sure you read the release notes to notice any breaking changes. We estimate that there would still be some as Typst has not reached to a stable release neither.**
Expand Down
22 changes: 13 additions & 9 deletions cv.typ
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
/// - regularColors (array): the regular colors of the CV.
/// - awesomeColors (array): the awesome colors of the CV.
/// -> content
#let _cvHeader(metadata, profilePhoto, headerFont, regularColors, awesomeColors) = {
#let _cvHeader(
metadata,
profilePhoto,
headerFont,
regularColors,
awesomeColors,
) = {
// Parameters
let hasPhoto = metadata.layout.header.display_profile_photo
let align = eval(metadata.layout.header.header_align)
Expand Down Expand Up @@ -199,15 +205,13 @@
text(size: 8pt, fill: rgb("#999999"), smallcaps(str))
}

place(
bottom,
table(
columns: (1fr, auto),
inset: 0pt,
stroke: none,
footerStyle([#firstName #lastName]), footerStyle(footerText),
),
return table(
columns: (1fr, auto),
inset: -5pt,
stroke: none,
footerStyle([#firstName #lastName]), footerStyle(footerText),
)

}

/// Add the title of a section.
Expand Down
15 changes: 6 additions & 9 deletions letter.typ
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,11 @@
text(size: 8pt, fill: rgb("#999999"), smallcaps(str))
}

place(
bottom,
table(
columns: (1fr, auto),
inset: 0pt,
stroke: none,
footerStyle([#firstName #lastName]),
footerStyle(metadata.lang.at(metadata.language).letter_footer),
),
return table(
columns: (1fr, auto),
inset: 0pt,
stroke: none,
footerStyle([#firstName #lastName]),
footerStyle(metadata.lang.at(metadata.language).letter_footer),
)
}
27 changes: 13 additions & 14 deletions lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

/* Layout */
#let cv(
metadata,
metadata,
profilePhoto: image("./template/src/avatar.png"),
doc) = {
doc,
) = {
// Non Latin Logic
let lang = metadata.language
let fontList = latinFontList
Expand All @@ -31,11 +32,11 @@
set page(
paper: "a4",
margin: (left: 1.4cm, right: 1.4cm, top: .8cm, bottom: .4cm),
footer: _cvFooter(metadata),
)

_cvHeader(metadata, profilePhoto, headerFont, regularColors, awesomeColors)
doc
_cvFooter(metadata)
}

#let letter(
Expand Down Expand Up @@ -63,23 +64,21 @@
set page(
paper: "a4",
margin: (left: 1.4cm, right: 1.4cm, top: .8cm, bottom: .4cm),
footer: letterHeader(
myAddress: myAddress,
recipientName: recipientName,
recipientAddress: recipientAddress,
date: date,
subject: subject,
metadata: metadata,
awesomeColors: awesomeColors,
),
)
set text(size: 12pt)

letterHeader(
myAddress: myAddress,
recipientName: recipientName,
recipientAddress: recipientAddress,
date: date,
subject: subject,
metadata: metadata,
awesomeColors: awesomeColors,
)

doc

if signature != "" {
letterSignature(signature)
}
letterFooter(metadata)
}
3 changes: 1 addition & 2 deletions metadata.toml.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@
},
"additionalProperties": false
}
},
"required": ["github", "phone", "email", "linkedin"]
}
}
},
"required": ["first_name", "last_name", "info"]
Expand Down
5 changes: 3 additions & 2 deletions template/cv.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cv
#import "@preview/brilliant-cv:2.0.3": cv
#let metadata = toml("./metadata.toml")
#let importModules(modules, lang: metadata.language) = {
for module in modules {
Expand All @@ -12,11 +12,12 @@

#show: cv.with(
metadata,
profilePhoto: image("./src/avatar.png")
profilePhoto: image("./src/avatar.png"),
)
#importModules((
"education",
"professional",
"professional",
"projects",
"certificates",
"publications",
Expand Down
2 changes: 1 addition & 1 deletion template/letter.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": letter
#import "@preview/brilliant-cv:2.0.3": letter
#let metadata = toml("./metadata.toml")


Expand Down
4 changes: 2 additions & 2 deletions template/modules_en/certificates.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvHonor
#import "@preview/brilliant-cv:2.0.3": cvSection, cvHonor
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvHonor = cvHonor.with(metadata: metadata)
Expand All @@ -22,5 +22,5 @@
#cvHonor(
date: [],
title: [SQL Fundamentals Track],
issuer: [Datacamp]
issuer: [Datacamp],
)
2 changes: 1 addition & 1 deletion template/modules_en/education.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry, hBar
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry, hBar
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand Down
6 changes: 2 additions & 4 deletions template/modules_en/professional.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand Down Expand Up @@ -38,7 +38,5 @@
logo: image("../src/logos/pqr_corp.png"),
date: [Summer 2017],
location: [Chicago, IL],
description: list(
[Assisted with data cleaning, processing, and analysis using Python and Excel, participated in team meetings and contributed to project planning and execution],
),
description: list([Assisted with data cleaning, processing, and analysis using Python and Excel, participated in team meetings and contributed to project planning and execution]),
)
2 changes: 1 addition & 1 deletion template/modules_en/projects.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand Down
2 changes: 1 addition & 1 deletion template/modules_en/publications.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvPublication
#import "@preview/brilliant-cv:2.0.3": cvSection, cvPublication
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)

Expand Down
2 changes: 1 addition & 1 deletion template/modules_en/skills.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvSkill, hBar
#import "@preview/brilliant-cv:2.0.3": cvSection, cvSkill, hBar
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)

Expand Down
4 changes: 2 additions & 2 deletions template/modules_fr/certificates.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvHonor
#import "@preview/brilliant-cv:2.0.3": cvSection, cvHonor
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvHonor = cvHonor.with(metadata: metadata)
Expand All @@ -22,5 +22,5 @@
#cvHonor(
date: [],
title: [Bases de données et requêtes SQL],
issuer: [OpenClassrooms]
issuer: [OpenClassrooms],
)
2 changes: 1 addition & 1 deletion template/modules_fr/education.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry, hBar
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry, hBar
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand Down
8 changes: 3 additions & 5 deletions template/modules_fr/professional.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand All @@ -17,7 +17,7 @@
[Diriger une équipe de scientifiques et d'analystes de données pour développer et mettre en œuvre des stratégies axées sur les données, développer des modèles prédictifs et des algorithmes pour soutenir la prise de décisions dans toute l'organisation],
[Collaborer avec la direction pour identifier les opportunités d'affaires et stimuler la croissance, mettre en œuvre les meilleures pratiques en matière de gouvernance, de qualité et de sécurité des données],
),
tags : ("Exemple de tags ici", "Dataiku", "Snowflake", "SparkSQL")
tags: ("Exemple de tags ici", "Dataiku", "Snowflake", "SparkSQL"),
)

#cvEntry(
Expand All @@ -38,7 +38,5 @@
date: [été 2017],
location: [Chicago, IL],
logo: image("../src/logos/pqr_corp.png"),
description: list(
[Aider à la préparation, au traitement et à l'analyse de données à l'aide de Python et Excel, participer aux réunions d'équipe et contribuer à la planification et à l'exécution de projets],
),
description: list([Aider à la préparation, au traitement et à l'analyse de données à l'aide de Python et Excel, participer aux réunions d'équipe et contribuer à la planification et à l'exécution de projets]),
)
2 changes: 1 addition & 1 deletion template/modules_fr/projects.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand Down
4 changes: 2 additions & 2 deletions template/modules_fr/publications.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvPublication
#import "@preview/brilliant-cv:2.0.3": cvSection, cvPublication
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)

Expand All @@ -11,7 +11,7 @@
keyList: (
"smith2020",
"jones2021",
"wilson2022"
"wilson2022",
),
refStyle: "apa",
)
2 changes: 1 addition & 1 deletion template/modules_fr/skills.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvSkill, hBar
#import "@preview/brilliant-cv:2.0.3": cvSection, cvSkill, hBar
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)

Expand Down
2 changes: 1 addition & 1 deletion template/modules_zh/certificates.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvHonor
#import "@preview/brilliant-cv:2.0.3": cvSection, cvHonor
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvHonor = cvHonor.with(metadata: metadata)
Expand Down
2 changes: 1 addition & 1 deletion template/modules_zh/education.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry, hBar
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry, hBar
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand Down
6 changes: 2 additions & 4 deletions template/modules_zh/professional.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand Down Expand Up @@ -38,7 +38,5 @@
logo: image("../src/logos/pqr_corp.png"),
date: [2017年夏季],
location: [芝加哥, IL],
description: list(
[协助使用 Python 和 Excel 进行数据清洗、处理和分析,参与团队会议并为项目规划和执行做出贡献],
),
description: list([协助使用 Python 和 Excel 进行数据清洗、处理和分析,参与团队会议并为项目规划和执行做出贡献]),
)
2 changes: 1 addition & 1 deletion template/modules_zh/projects.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry
#import "@preview/brilliant-cv:2.0.3": cvSection, cvEntry
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)
#let cvEntry = cvEntry.with(metadata: metadata)
Expand Down
2 changes: 1 addition & 1 deletion template/modules_zh/publications.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
#import "@preview/brilliant-cv:2.0.2": cvSection, cvPublication
#import "@preview/brilliant-cv:2.0.3": cvSection, cvPublication
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)

Expand Down
2 changes: 1 addition & 1 deletion template/modules_zh/skills.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import
#import "@preview/brilliant-cv:2.0.2": cvSection, cvSkill, hBar
#import "@preview/brilliant-cv:2.0.3": cvSection, cvSkill, hBar
#let metadata = toml("../metadata.toml")
#let cvSection = cvSection.with(metadata: metadata)

Expand Down
Loading

0 comments on commit 2732951

Please sign in to comment.