fix: render full bibliography
This commit is contained in:
parent
4446ca744d
commit
4889ce541e
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -898,6 +898,7 @@ dependencies = [
|
||||||
"tree-sitter-python",
|
"tree-sitter-python",
|
||||||
"tree-sitter-regex",
|
"tree-sitter-regex",
|
||||||
"tree-sitter-rust",
|
"tree-sitter-rust",
|
||||||
|
"tree-sitter-scheme",
|
||||||
"tree-sitter-toml",
|
"tree-sitter-toml",
|
||||||
"tree-sitter-typescript",
|
"tree-sitter-typescript",
|
||||||
]
|
]
|
||||||
|
@ -1117,6 +1118,15 @@ dependencies = [
|
||||||
"tree-sitter",
|
"tree-sitter",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tree-sitter-scheme"
|
||||||
|
version = "0.6.0"
|
||||||
|
source = "git+https://github.com/6cdh/tree-sitter-scheme?rev=85b6188fb77c03dfb01d13e58e2844450506860c#85b6188fb77c03dfb01d13e58e2844450506860c"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"tree-sitter",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tree-sitter-toml"
|
name = "tree-sitter-toml"
|
||||||
version = "0.20.0"
|
version = "0.20.0"
|
||||||
|
|
|
@ -34,5 +34,6 @@ tree-sitter-md = "0.1"
|
||||||
tree-sitter-python = "0.20"
|
tree-sitter-python = "0.20"
|
||||||
tree-sitter-regex = "0.20"
|
tree-sitter-regex = "0.20"
|
||||||
tree-sitter-rust = "0.20"
|
tree-sitter-rust = "0.20"
|
||||||
|
tree-sitter-scheme = { git = "https://github.com/6cdh/tree-sitter-scheme", rev = "85b6188fb77c03dfb01d13e58e2844450506860c" }
|
||||||
tree-sitter-toml = "0.20"
|
tree-sitter-toml = "0.20"
|
||||||
tree-sitter-typescript = "0.20"
|
tree-sitter-typescript = "0.20"
|
||||||
|
|
|
@ -11,22 +11,22 @@ date: 2023-12-17T12:47:29.753Z
|
||||||
あくる日、親に引かれている橇で乗っている嬉しそうな子供を見た。
|
あくる日、親に引かれている橇で乗っている嬉しそうな子供を見た。
|
||||||
あらゆる公園が白くなって、白すぎて見えた。
|
あらゆる公園が白くなって、白すぎて見えた。
|
||||||
|
|
||||||
![白すぎる公園](@assets/posts/hisasiburi-no-toukou/IMG_20231204_105929.jpg)
|
![白すぎる公園](IMG_20231204_105929.jpg)
|
||||||
|
|
||||||
その時から雪が全部解けちゃった。
|
その時から雪が全部解けちゃった。
|
||||||
|
|
||||||
最近、ヴロツワフではクリスマスマーケットが始まっているので、見に行った。
|
最近、ヴロツワフではクリスマスマーケットが始まっているので、見に行った。
|
||||||
そこでたくさんの人がいて、いろんな出店もあり、色々なものを買って楽しむことができた。
|
そこでたくさんの人がいて、いろんな出店もあり、色々なものを買って楽しむことができた。
|
||||||
|
|
||||||
![眩しいクリスマスライト](@assets/posts/hisasiburi-no-toukou/IMG_20231209_182036.jpg)
|
![眩しいクリスマスライト](IMG_20231209_182036.jpg)
|
||||||
|
|
||||||
もっと進んでいくと、大きなレストランみたいなビルに出くわしたんだ。
|
もっと進んでいくと、大きなレストランみたいなビルに出くわしたんだ。
|
||||||
あのビルでは、「グジャニエッツ」という飲み物を買って楽しむことができた。
|
あのビルでは、「グジャニエッツ」という飲み物を買って楽しむことができた。
|
||||||
|
|
||||||
![グジャニエッツのビル](@assets/posts/hisasiburi-no-toukou/IMG_20231209_183410.jpg)
|
![グジャニエッツのビル](IMG_20231209_183410.jpg)
|
||||||
|
|
||||||
グジャニエッツとは、ポーランドの伝統的な温かいスパイス入りの飲み物。
|
グジャニエッツとは、ポーランドの伝統的な温かいスパイス入りの飲み物。
|
||||||
通常は赤ワインやオレンジ、シナモン、クローブが使われる。
|
通常は赤ワインやオレンジ、シナモン、クローブが使われる。
|
||||||
|
|
||||||
クリスマスマーケットってとても素晴らしいイベントの一つだけど、値段が高く過ぎるからあんまり買い物しなかったwww
|
クリスマスマーケットってとても素晴らしいイベントの一つだけど、
|
||||||
|
値段が高く過ぎるからあんまり買い物しなかったwww
|
|
@ -241,41 +241,3 @@ scala
|
||||||
### Rust
|
### Rust
|
||||||
|
|
||||||
rust
|
rust
|
||||||
|
|
||||||
|
|
||||||
## Bibliography
|
|
||||||
|
|
||||||
:::bibtex
|
|
||||||
@inproceedings{10.1145/1238844.1238856,
|
|
||||||
author = {Hudak, Paul and Hughes, John and Peyton Jones, Simon and Wadler, Philip},
|
|
||||||
title = {A History of Haskell: Being Lazy with Class},
|
|
||||||
year = {2007},
|
|
||||||
isbn = {9781595937667},
|
|
||||||
publisher = {Association for Computing Machinery},
|
|
||||||
address = {New York, NY, USA},
|
|
||||||
url = {https://doi.org/10.1145/1238844.1238856},
|
|
||||||
doi = {10.1145/1238844.1238856},
|
|
||||||
abstract = {This paper describes the history of Haskell, including its genesis and principles, technical contributions, implementations and tools, and applications and impact.},
|
|
||||||
booktitle = {Proceedings of the Third ACM SIGPLAN Conference on History of Programming Languages},
|
|
||||||
pages = {12–1–12–55},
|
|
||||||
location = {San Diego, California},
|
|
||||||
series = {HOPL III}
|
|
||||||
}
|
|
||||||
|
|
||||||
@online{youtube,
|
|
||||||
title = {Escape from the ivory tower: the Haskell journey},
|
|
||||||
date = {2017},
|
|
||||||
organization = {Youtube},
|
|
||||||
author = {Simon {Peyton Jones}},
|
|
||||||
url = {https://youtu.be/re96UgMk6GQ},
|
|
||||||
}
|
|
||||||
|
|
||||||
@book{skinner2023effective,
|
|
||||||
title = {Effective Haskell: Solving Real-World Problems with Strongly Typed Functional Programming},
|
|
||||||
author = {Skinner, R.},
|
|
||||||
isbn = {9781680509342},
|
|
||||||
series = {Pragmatic Bookshelf},
|
|
||||||
year = {2023},
|
|
||||||
publisher = {O'Reilly Media}
|
|
||||||
}
|
|
||||||
:::
|
|
32
content/posts/typeclasses/ref.bib
Normal file
32
content/posts/typeclasses/ref.bib
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
@inproceedings{10.1145/1238844.1238856,
|
||||||
|
author = {Hudak, Paul and Hughes, John and Peyton Jones, Simon and Wadler, Philip},
|
||||||
|
title = {A History of Haskell: Being Lazy with Class},
|
||||||
|
year = {2007},
|
||||||
|
isbn = {9781595937667},
|
||||||
|
publisher = {Association for Computing Machinery},
|
||||||
|
address = {New York, NY, USA},
|
||||||
|
url = {https://doi.org/10.1145/1238844.1238856},
|
||||||
|
doi = {10.1145/1238844.1238856},
|
||||||
|
abstract = {This paper describes the history of Haskell, including its genesis and principles, technical contributions, implementations and tools, and applications and impact.},
|
||||||
|
booktitle = {Proceedings of the Third ACM SIGPLAN Conference on History of Programming Languages},
|
||||||
|
pages = {12–1–12–55},
|
||||||
|
location = {San Diego, California},
|
||||||
|
series = {HOPL III}
|
||||||
|
}
|
||||||
|
|
||||||
|
@online{youtube,
|
||||||
|
title = {Escape from the ivory tower: the Haskell journey},
|
||||||
|
date = {2017},
|
||||||
|
organization = {Youtube},
|
||||||
|
author = {Simon {Peyton Jones}},
|
||||||
|
url = {https://youtu.be/re96UgMk6GQ},
|
||||||
|
}
|
||||||
|
|
||||||
|
@book{skinner2023effective,
|
||||||
|
title = {Effective Haskell: Solving Real-World Problems with Strongly Typed Functional Programming},
|
||||||
|
author = {Skinner, R.},
|
||||||
|
isbn = {9781680509342},
|
||||||
|
series = {Pragmatic Bookshelf},
|
||||||
|
year = {2023},
|
||||||
|
publisher = {O'Reilly Media}
|
||||||
|
}
|
|
@ -1,4 +1,6 @@
|
||||||
use std::{collections::HashSet, fs::{self, File}, io::Write} ;
|
use std::collections::HashSet;
|
||||||
|
use std::fs::{self, File};
|
||||||
|
use std::io::Write;
|
||||||
|
|
||||||
use camino::{Utf8Path, Utf8PathBuf};
|
use camino::{Utf8Path, Utf8PathBuf};
|
||||||
use glob::glob;
|
use glob::glob;
|
||||||
|
|
|
@ -183,9 +183,7 @@ fn to_index<T>(item: PipelineItem) -> PipelineItem
|
||||||
_ => return item,
|
_ => return item,
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: clean this up
|
let dir = meta.path.parent().unwrap().strip_prefix("content").unwrap();
|
||||||
let dir = meta.path.parent().unwrap();
|
|
||||||
let dir = dir.strip_prefix("content").unwrap();
|
|
||||||
let dir = match meta.path.file_stem().unwrap() {
|
let dir = match meta.path.file_stem().unwrap() {
|
||||||
"index" => dir.to_owned(),
|
"index" => dir.to_owned(),
|
||||||
name => dir.join(name),
|
name => dir.join(name),
|
||||||
|
@ -223,8 +221,7 @@ fn to_bundle(item: PipelineItem) -> PipelineItem {
|
||||||
_ => return item,
|
_ => return item,
|
||||||
};
|
};
|
||||||
|
|
||||||
let dirs = meta.path.strip_prefix("content").unwrap().parent().unwrap();
|
let path = meta.path.strip_prefix("content").unwrap().to_owned();
|
||||||
let path = dirs.join(meta.path.file_name().unwrap()).to_owned();
|
|
||||||
|
|
||||||
match meta.path.extension() {
|
match meta.path.extension() {
|
||||||
// any image
|
// any image
|
||||||
|
@ -308,7 +305,7 @@ fn main() {
|
||||||
kind: Asset {
|
kind: Asset {
|
||||||
kind: gen::AssetKind::Html(Box::new(|_| {
|
kind: gen::AssetKind::Html(Box::new(|_| {
|
||||||
let data = std::fs::read_to_string("content/index.md").unwrap();
|
let data = std::fs::read_to_string("content/index.md").unwrap();
|
||||||
let (_, html, bib) = text::md::parse(&data, None);
|
let (_, html, _) = text::md::parse(&data, None);
|
||||||
html::home(Raw(html)).render().to_owned().into()
|
html::home(Raw(html)).render().to_owned().into()
|
||||||
})).into(),
|
})).into(),
|
||||||
meta: gen::FileItem {
|
meta: gen::FileItem {
|
||||||
|
|
|
@ -88,6 +88,9 @@ fn make_bib<'a, 'b>(stream: Vec<Event<'a>>, lib: &'b Library) -> (Vec<Event<'a>>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add fake citation to make all entries show up
|
||||||
|
driver.citation(CitationRequest::from_items(lib.iter().map(CitationItem::with_entry).collect(), &STYLE, &LOCALE));
|
||||||
|
|
||||||
let res = driver.finish(BibliographyRequest { style: &STYLE, locale: None, locale_files: &LOCALE });
|
let res = driver.finish(BibliographyRequest { style: &STYLE, locale: None, locale_files: &LOCALE });
|
||||||
|
|
||||||
let mut n = 0;
|
let mut n = 0;
|
||||||
|
|
|
@ -24,14 +24,15 @@ pub static EXTENSIONS: Lazy<HashMap<&'static str, &'static str>> = Lazy::new(||
|
||||||
("md", "markdown"),
|
("md", "markdown"),
|
||||||
("mdx", "markdown"),
|
("mdx", "markdown"),
|
||||||
("py", "python"),
|
("py", "python"),
|
||||||
("query", "query"),
|
("query", "scheme"),
|
||||||
// ("scm", "scheme"),
|
("scm", "scheme"),
|
||||||
("scss", "scss"),
|
("scss", "css"),
|
||||||
("ts", "javascript"),
|
("ts", "javascript"),
|
||||||
("typescript", "javascript")
|
("typescript", "javascript")
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
fn config_for(
|
fn config_for(
|
||||||
lang: Language,
|
lang: Language,
|
||||||
highlights: &str,
|
highlights: &str,
|
||||||
|
@ -142,6 +143,15 @@ pub static CONFIGS: Lazy<HashMap<&'static str, HighlightConfiguration>> = Lazy::
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"scheme",
|
||||||
|
config_for(
|
||||||
|
tree_sitter_scheme::language(),
|
||||||
|
tree_sitter_scheme::HIGHLIGHTS_QUERY,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
)
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"toml",
|
"toml",
|
||||||
config_for(
|
config_for(
|
||||||
|
|
Loading…
Reference in a new issue