Skip to content

Commit

Permalink
build: bump book package to 0.2.3 (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin authored Dec 14, 2023
1 parent a277bf9 commit be63d63
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async fn init(args: InitArgs) -> ZResult<()> {
dir.join("book.typ"),
format!(
r##"
#import "@preview/book:0.2.2": *
#import "@preview/book:0.2.3": *
#show: book
Expand Down Expand Up @@ -135,7 +135,7 @@ Sample page
write_file(
dir.join("ebook.typ"),
format!(
r##"#import "@preview/book:0.2.2": *
r##"#import "@preview/book:0.2.3": *
#import "{ebook_template}"
Expand Down
6 changes: 3 additions & 3 deletions cli/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ impl Project {

let package_meta = res
.first()
.ok_or_else(|| error_once!("no internal-package meta in book.typ (are you using old book package?, please import @preview/book:0.2.2; or do you forget the show rule `#show: book`?)"))?;
.ok_or_else(|| error_once!("no internal-package meta in book.typ (are you using old book package?, please import @preview/book:0.2.3; or do you forget the show rule `#show: book`?)"))?;

let InternalPackageMeta::Package { version } = &package_meta.value;
if version != "0.2.2" {
if version != "0.2.3" {
return Err(error_once!(
"outdated book package, please import @preview/book:0.2.2", importing_version: version,
"outdated book package, please import @preview/book:0.2.3", importing_version: version,
));
}
}
Expand Down
2 changes: 1 addition & 1 deletion contrib/typst/book/typst.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "book"
version = "0.2.2"
version = "0.2.3"
entrypoint = "lib.typ"
authors = ["Myriad-Dreamin"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion contrib/typst/gh-ebook.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "@preview/book:0.2.2": *
#import "@preview/book:0.2.3": *
#import "/contrib/typst/gh-pages.typ": project, part-style

#let _page-project = project
Expand Down
2 changes: 1 addition & 1 deletion contrib/typst/gh-pages.typ
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is important for typst-book to produce a responsive layout
// and multiple targets.
#import "@preview/book:0.2.2": get-page-width, target, is-web-target, is-pdf-target, plain-text
#import "@preview/book:0.2.3": get-page-width, target, is-web-target, is-pdf-target, plain-text

#let page-width = get-page-width()
#let is-pdf-target = is-pdf-target()
Expand Down
2 changes: 1 addition & 1 deletion github-pages/docs/book.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#import "@preview/book:0.2.2": *
#import "@preview/book:0.2.3": *

#show: book

Expand Down
2 changes: 1 addition & 1 deletion github-pages/docs/cli/init.typ
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ typst-book build my-book/ # memoryized dest-dir
The harder way, by creating the book without `init` command, your `book.typ` should at least provides a `book-meta`, as #cross-link("/guide/get-started.typ")[Get Started] shown.

```typ
#import "@preview/book:0.2.2": *
#import "@preview/book:0.2.3": *
#show: book

#book-meta(
Expand Down
2 changes: 1 addition & 1 deletion github-pages/docs/format/theme.typ
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Currently we have no much design on theme's html part. But you can still configu
Your `book.typ` should at least provides a `book-meta`, as #t shown.

```typ
#import "@preview/book:0.2.2": *
#import "@preview/book:0.2.3": *
#show: book

#book-meta(
Expand Down
2 changes: 1 addition & 1 deletion github-pages/docs/guide/get-started.typ
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Before a chapter can be viewed, it must be added to this list.
Here's a basic summary file with a few chapters:

```typ
#import "@preview/book:0.2.2": *
#import "@preview/book:0.2.3": *
#show: book

#book-meta( // put metadata of your book like book.toml of mdbook
Expand Down
2 changes: 1 addition & 1 deletion github-pages/docs/pdf.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "@preview/book:0.2.2": *
#import "@preview/book:0.2.3": *

#import "/contrib/typst/gh-ebook.typ"
#let ebook = gh-ebook
Expand Down

0 comments on commit be63d63

Please sign in to comment.