avitex / mdbook-tera Goto Github PK
View Code? Open in Web Editor NEWTera preprocessor for mdBook
License: MIT License
Tera preprocessor for mdBook
License: MIT License
[ERROR] (mdbook::utils): Error: Unable to parse the preprocessed book from "tera" processor
[ERROR] (mdbook::utils): Caused By: missing field `__non_exhaustive` at line 1 column 1594502
I believe a field __non_exhaustive
has been added to mdBook
...
Hello James (?) @avitex ,
thank you for the great tool "mdbook-tera".
Unfortunately it worked only if I call it from ./src/file.md
.
When I call it from ./src/DIR/file.md
, the variables are not replaced.
Am I doing something wrong or is this a limitation of the tool?
Many greetings
rufus42
PS: Please excuse me for abusing this "channel" for my question, I didn't find any forum or similar.
Somehow, suddenly, template variables are not being expanded.
Would be nice to have built binaries so one does not have to spend cycles compiling
Hello, and thank you for making mdbook-tera
, it is really powerful to be able to combine mdbook with tera.
While cargo install mdbook-tera
, I encountered the following errors reported at the end of this message. It appears to be caused by the new update of Tera (released Nov 1 2021) that changes the definition of the Context
struct to add a type parameter, which AFAICT is a breaking change.
The issue has also been raised upstream.
That being said, I see the following options:
Optionally, once the issue is resolved, we could add Cargo.lock
into git
, so that the build remains fully reproductible in the future, as is recommended for binary applications in the cargo book
Thank you again for mdbook-tera!
Compiling mdbook-tera v0.4.0
error[E0107]: missing generics for struct `tera::Context`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-tera-0.4.0/src/lib.rs:89:66
|
89 | fn render_book_items(book: &mut Book, tera: &mut Tera, context: &Context) -> Result<(), Error> {
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/tera-1.14.0/src/context.rs:57:12
|
57 | pub struct Context<S: ContextSafety> {
| ^^^^^^^ -
help: add missing generic argument
|
89 | fn render_book_items(book: &mut Book, tera: &mut Tera, context: &Context<S>) -> Result<(), Error> {
| ^^^^^^^^^^
error[E0107]: missing generics for struct `tera::Context`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-tera-0.4.0/src/lib.rs:122:15
|
122 | context: &Context,
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/tera-1.14.0/src/context.rs:57:12
|
57 | pub struct Context<S: ContextSafety> {
| ^^^^^^^ -
help: add missing generic argument
|
122 | context: &Context<S>,
| ^^^^^^^^^^
error[E0107]: missing generics for struct `tera::Context`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-tera-0.4.0/src/context.rs:20:14
|
20 | context: Context,
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/tera-1.14.0/src/context.rs:57:12
|
57 | pub struct Context<S: ContextSafety> {
| ^^^^^^^ -
help: add missing generic argument
|
20 | context: Context<S>,
| ^^^^^^^^^^
error[E0107]: missing generics for struct `tera::Context`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-tera-0.4.0/src/context.rs:14:26
|
14 | fn context(&self) -> Context;
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/tera-1.14.0/src/context.rs:57:12
|
57 | pub struct Context<S: ContextSafety> {
| ^^^^^^^ -
help: add missing generic argument
|
14 | fn context(&self) -> Context<S>;
| ^^^^^^^^^^
error[E0107]: missing generics for struct `tera::Context`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-tera-0.4.0/src/context.rs:24:26
|
24 | fn context(&self) -> Context {
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/tera-1.14.0/src/context.rs:57:12
|
57 | pub struct Context<S: ContextSafety> {
| ^^^^^^^ -
help: add missing generic argument
|
24 | fn context(&self) -> Context<S> {
| ^^^^^^^^^^
error[E0107]: missing generics for struct `tera::Context`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-tera-0.4.0/src/context.rs:31:25
|
31 | pub fn new(context: Context) -> Self {
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /home/tetrane/.cargo/registry/src/github.com-1ecc6299db9ec823/tera-1.14.0/src/context.rs:57:12
|
57 | pub struct Context<S: ContextSafety> {
| ^^^^^^^ -
help: add missing generic argument
|
31 | pub fn new(context: Context<S>) -> Self {
| ^^^^^^^^^^
For more information about this error, try `rustc --explain E0107`.
error: could not compile `mdbook-tera` due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `mdbook-tera v0.4.0`, intermediate artifacts can be found at `/tmp/cargo-installvyhKA6`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.