mdbook-environment

Crates.iomdbook-environment
lib.rsmdbook-environment
version0.0.4
created_at2025-03-21 13:39:02.656089+00
updated_at2025-03-24 16:12:35.63809+00
descriptionA preprocessor for MdBook for working with environment variables.
homepage
repositoryhttps://github.com/keygenqt/mdbook-environment
max_upload_size
id1600513
size142,775
Vitaliy Zarubin (keygenqt)

documentation

README

MdBook environment preprocessor

A preprocessor for MdBook for working with environment variables.

Feature

  • Set environment variables.
  • Set environment with execute command.
  • Replace variables in the book.

Example

book.toml

[preprocessor.environment]
# Just set environment
ENV_MDBOOK_VERSION1 = "0.0.1"
# Set environment with execute command
ENV_MDBOOK_VERSION2 = "$(curl -s 'https://api.github.com/repos/rust-lang/mdBook/tags' | jq -r '.[0].name' | sed 's/v//')"

chapter_1.md

Just set environment: {{ENV_MDBOOK_VERSION1}}.

Set environment with execute command: {{ENV_MDBOOK_VERSION2}}.

Preview

preview

License

Copyright 2025 Vitaliy Zarubin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Commit count: 9

cargo fmt