Skip to content

Commit

Permalink
First Package Release
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyanagimoto committed Apr 24, 2024
1 parent a8e176c commit be77625
Show file tree
Hide file tree
Showing 62 changed files with 10,189 additions and 5 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
# - {os: macos-latest, r: 'release'}
# - {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
# - {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
55 changes: 55 additions & 0 deletions .github/workflows/altdoc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: altdoc

jobs:
altdoc:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: altdoc-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: quarto-dev/quarto-actions/setup@v2

- name: Get Script
run: curl -OLs https://eddelbuettel.github.io/r-ci/run.sh && chmod 0755 run.sh

- name: Bootstrap
run: ./run.sh bootstrap

- name: Dependencies
run: ./run.sh install_all

- name: Build site
run: |
# If parallel = TRUE in render_docs()
# future::plan(future::multicore)
install.packages(".", repos = NULL, type = "source")
install.packages(c("pkgload", "remotes"))
pkgload::load_all()
remotes::install_github("etiennebacher/altdoc")
altdoc::render_docs(parallel = FALSE, freeze = TRUE, verbose = TRUE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
folder: docs
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: typstcv
Type: Package
Title: CV for Quarto & Typst
Version: 0.1.0
Version: 0.0.0.9000
Authors@R:
person(given = "Kazuharu",
family = "Yanagimoto",
Expand All @@ -12,6 +12,8 @@ Description:Provides functions to create a entry of CV for Quarto & Typst.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://github.com/kazuyanagimoto/typst-cv,
https://kazuyanagimoto/typst-cv/
Depends:
R (>= 4.1)
Roxygen: list(markdown = TRUE)
Expand Down
84 changes: 84 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,87 @@


# typstcv

![](vignettes/typstcv.svg)

This package provides helper functinons for
[kazuyanagimoto/quarto-awesomecv-typst](https://github.com/kazuyanagimoto/quarto-awesomecv-typst).
This work are inspired by these three works:

- Byungjin Park’s [Awesome-CV](https://github.com/posquit0/Awesome-CV)
- A beautiful $\LaTeX$ template of CV
- Paul Tsouchlos’s
[modern-cv](https://typst.app/universe/package/modern-cv/)
- A [Typst](https://typst.app) implementation of Awesome-CV
- Mitchell O’Hara-Wild and Rob Hyndman’s
[vitae](https://pkg.mitchelloharawild.com/vitae/)
- R package for modern CV, including Awesome-CV

## Installation

You can install the development version of quartomonothemer from
R-universe with:

``` r
install.packages("typstcv", repos = "https://kazuyanagimoto.r-universe.dev")
```

## Usage

You can find a simple [example](vignettes/typstcv.pdf) and
[qmd](https://github.com/kazuyanagimoto/typstcv/blob/main/vignettes/typstcv.qmd)
code.

### YAML

Set author information in YAML.

``` yaml
author:
firstname: Albert
lastname: Einstein
address: "Rämistrasse 101, CH-8092 Zürich, Switzerland, Zürich"
positions: ["Research Physicist", "Professor"]
contacts:
- icon: fa envelope
text: ae@example.com
url: "mailto:ae@example.com"
- icon: PATH_TO_ICON/icon.svg
text: example.com
url: https://example.com
```
- [fontawesome](https://fontawesome.com/search?m=free&o=r) icons are
supported via
[duskmoon314/typst-fontawesome](https://github.com/duskmoon314/typst-fontawesome)
with `fa` prefix.
- SVG icons can be used by specifying the path to the icon file

### Fonts & Color

You can set fonts and the accent color in YAML.

``` yaml
style:
color-accent: "516db0"
font-header: "Roboto"
font-text: "Source Sans Pro"
format:
awesomecv-typst:
font-paths: ["PATH_TO_FONT"]
```

### Resume Entries

`resume_entry()` is a helper function to create resume entryies from a
data frame.

``` r
df_educ |>
resume_entry(
title = "title",
location = "location",
date = "year",
description = "detail"
)
```
76 changes: 76 additions & 0 deletions README.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# typstcv

![](vignettes/typstcv.svg)

This package provides helper functinons for [kazuyanagimoto/quarto-awesomecv-typst](https://github.com/kazuyanagimoto/quarto-awesomecv-typst).
This work are inspired by these three works:

- Byungjin Park's [Awesome-CV](https://github.com/posquit0/Awesome-CV)
- A beautiful $\LaTeX$ template of CV
- Paul Tsouchlos's [modern-cv](https://typst.app/universe/package/modern-cv/)
- A [Typst](https://typst.app) implementation of Awesome-CV
- Mitchell O'Hara-Wild and Rob Hyndman's [vitae](https://pkg.mitchelloharawild.com/vitae/)
- R package for modern CV, including Awesome-CV

## Installation

You can install the development version of quartomonothemer from R-universe with:

```r
install.packages("typstcv", repos = "https://kazuyanagimoto.r-universe.dev")
```

## Usage

You can find a simple [example](vignettes/typstcv.pdf) and [qmd](https://github.com/kazuyanagimoto/typstcv/blob/main/vignettes/typstcv.qmd) code.

### YAML

Set author information in YAML.

```yaml
author:
firstname: Albert
lastname: Einstein
address: "Rämistrasse 101, CH-8092 Zürich, Switzerland, Zürich"
positions: ["Research Physicist", "Professor"]
contacts:
- icon: fa envelope
text: ae@example.com
url: "mailto:ae@example.com"
- icon: PATH_TO_ICON/icon.svg
text: example.com
url: https://example.com
```
- [fontawesome](https://fontawesome.com/search?m=free&o=r) icons are supported
via [duskmoon314/typst-fontawesome](https://github.com/duskmoon314/typst-fontawesome) with `fa` prefix.
- SVG icons can be used by specifying the path to the icon file

### Fonts & Color

You can set fonts and the accent color in YAML.

```yaml
style:
color-accent: "516db0"
font-header: "Roboto"
font-text: "Source Sans Pro"
format:
awesomecv-typst:
font-paths: ["PATH_TO_FONT"]
```

### Resume Entries

`resume_entry()` is a helper function to create resume entryies from a data frame.

```r
df_educ |>
resume_entry(
title = "title",
location = "location",
date = "year",
description = "detail"
)
```
41 changes: 41 additions & 0 deletions altdoc/quarto_website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
project:
type: website
output-dir: ../docs/

# Note: freeze functionality can be set at a project level or for individual .qmd files
# execute:
# freeze: false

website:
title: "$ALTDOC_PACKAGE_NAME"
navbar:
search: true
right:
- icon: github
href: $ALTDOC_PACKAGE_URL_GITHUB
aria-label: $ALTDOC_PACKAGE_NAME GitHub
sidebar:
collapse-level: 1
contents:
- text: Home
file: index.qmd
- text: Gallery
file: vignettes/gallery.qmd
- section: $ALTDOC_MAN_BLOCK
- text: News
file: $ALTDOC_NEWS
- text: Changelog
file: $ALTDOC_CHANGELOG
- text: License
file: $ALTDOC_LICENSE
- text: Licence
file: $ALTDOC_LICENCE
- text: Code of conduct
file: $ALTDOC_CODE_OF_CONDUCT
- text: Citation
file: $ALTDOC_CITATION

# format:
# html:
# theme: cosmo
# number-sections: false
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#let color-accent-default = rgb("#dc3522")

// Default fonts
#let font-header-default = "Roboto"
#let font-text-default = "Source Sans Pro"
#let font-header-default = ("Roboto", "Arial", "Helvetica", "Dejavu Sans")
#let font-text-default = ("Source Sans Pro", "Arial", "Helvetica", "Dejavu Sans")

/// Helpers

Expand Down Expand Up @@ -137,8 +137,9 @@
color-accent = rgb(style.color-accent)
}
let font-header = font-header-default
if "" in style.keys() {
font-header = style.font-header
if "font-header" in style.keys() {
// font-header = style.font-header
font-header = sans
}
let font-text = font-text-default
if "font-text" in style.keys() {
Expand Down
7 changes: 7 additions & 0 deletions vignettes/_extensions/quarto-ext/fontawesome/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Font Awesome support
author: Carlos Scheidegger
version: 1.1.0
quarto-required: ">=1.2.269"
contributes:
shortcodes:
- fontawesome.lua
Loading

0 comments on commit be77625

Please sign in to comment.