diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a3f6b700..cc01f5b5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,12 +31,12 @@ jobs: - name: Install Rust (rustup) run: rustup update stable --no-self-update && rustup default stable - name: Build book - run: cargo run -- build book-example + run: cargo run -- build guide - name: Deploy to GitHub env: GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }} run: | - touch book-example/book/.nojekyll + touch guide/book/.nojekyll curl -LsSf https://raw.githubusercontent.com/rust-lang/simpleinfra/master/setup-deploy-keys/src/deploy.rs | rustc - -o /tmp/deploy - cd book-example/book + cd guide/book /tmp/deploy diff --git a/.gitignore b/.gitignore index c79fe427..36614264 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ target .DS_Store book-test -book-example/book +guide/book .vscode tests/dummy_book/book/ diff --git a/Cargo.toml b/Cargo.toml index 37a59a0e..e68a2235 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ authors = [ ] documentation = "http://rust-lang.github.io/mdBook/index.html" edition = "2018" -exclude = ["/book-example/*"] +exclude = ["/guide/*"] keywords = ["book", "gitbook", "rustbook", "markdown"] license = "MPL-2.0" readme = "README.md" diff --git a/book-example/book.toml b/guide/book.toml similarity index 100% rename from book-example/book.toml rename to guide/book.toml diff --git a/book-example/src/404.md b/guide/src/404.md similarity index 100% rename from book-example/src/404.md rename to guide/src/404.md diff --git a/book-example/src/README.md b/guide/src/README.md similarity index 100% rename from book-example/src/README.md rename to guide/src/README.md diff --git a/book-example/src/SUMMARY.md b/guide/src/SUMMARY.md similarity index 100% rename from book-example/src/SUMMARY.md rename to guide/src/SUMMARY.md diff --git a/book-example/src/cli/README.md b/guide/src/cli/README.md similarity index 100% rename from book-example/src/cli/README.md rename to guide/src/cli/README.md diff --git a/book-example/src/cli/build.md b/guide/src/cli/build.md similarity index 100% rename from book-example/src/cli/build.md rename to guide/src/cli/build.md diff --git a/book-example/src/cli/clean.md b/guide/src/cli/clean.md similarity index 100% rename from book-example/src/cli/clean.md rename to guide/src/cli/clean.md diff --git a/book-example/src/cli/init.md b/guide/src/cli/init.md similarity index 100% rename from book-example/src/cli/init.md rename to guide/src/cli/init.md diff --git a/book-example/src/cli/serve.md b/guide/src/cli/serve.md similarity index 100% rename from book-example/src/cli/serve.md rename to guide/src/cli/serve.md diff --git a/book-example/src/cli/test.md b/guide/src/cli/test.md similarity index 100% rename from book-example/src/cli/test.md rename to guide/src/cli/test.md diff --git a/book-example/src/cli/watch.md b/guide/src/cli/watch.md similarity index 100% rename from book-example/src/cli/watch.md rename to guide/src/cli/watch.md diff --git a/book-example/src/continuous-integration.md b/guide/src/continuous-integration.md similarity index 100% rename from book-example/src/continuous-integration.md rename to guide/src/continuous-integration.md diff --git a/book-example/src/for_developers/README.md b/guide/src/for_developers/README.md similarity index 100% rename from book-example/src/for_developers/README.md rename to guide/src/for_developers/README.md diff --git a/book-example/src/for_developers/backends.md b/guide/src/for_developers/backends.md similarity index 100% rename from book-example/src/for_developers/backends.md rename to guide/src/for_developers/backends.md diff --git a/book-example/src/for_developers/mdbook-wordcount/Cargo.toml b/guide/src/for_developers/mdbook-wordcount/Cargo.toml similarity index 100% rename from book-example/src/for_developers/mdbook-wordcount/Cargo.toml rename to guide/src/for_developers/mdbook-wordcount/Cargo.toml diff --git a/book-example/src/for_developers/mdbook-wordcount/src/main.rs b/guide/src/for_developers/mdbook-wordcount/src/main.rs similarity index 100% rename from book-example/src/for_developers/mdbook-wordcount/src/main.rs rename to guide/src/for_developers/mdbook-wordcount/src/main.rs diff --git a/book-example/src/for_developers/preprocessors.md b/guide/src/for_developers/preprocessors.md similarity index 100% rename from book-example/src/for_developers/preprocessors.md rename to guide/src/for_developers/preprocessors.md diff --git a/book-example/src/format/README.md b/guide/src/format/README.md similarity index 100% rename from book-example/src/format/README.md rename to guide/src/format/README.md diff --git a/book-example/src/format/config.md b/guide/src/format/config.md similarity index 100% rename from book-example/src/format/config.md rename to guide/src/format/config.md diff --git a/book-example/src/format/example.rs b/guide/src/format/example.rs similarity index 100% rename from book-example/src/format/example.rs rename to guide/src/format/example.rs diff --git a/book-example/src/format/mathjax.md b/guide/src/format/mathjax.md similarity index 100% rename from book-example/src/format/mathjax.md rename to guide/src/format/mathjax.md diff --git a/book-example/src/format/mdbook.md b/guide/src/format/mdbook.md similarity index 100% rename from book-example/src/format/mdbook.md rename to guide/src/format/mdbook.md diff --git a/book-example/src/format/summary.md b/guide/src/format/summary.md similarity index 100% rename from book-example/src/format/summary.md rename to guide/src/format/summary.md diff --git a/book-example/src/format/theme/README.md b/guide/src/format/theme/README.md similarity index 100% rename from book-example/src/format/theme/README.md rename to guide/src/format/theme/README.md diff --git a/book-example/src/format/theme/editor.md b/guide/src/format/theme/editor.md similarity index 100% rename from book-example/src/format/theme/editor.md rename to guide/src/format/theme/editor.md diff --git a/book-example/src/format/theme/index-hbs.md b/guide/src/format/theme/index-hbs.md similarity index 100% rename from book-example/src/format/theme/index-hbs.md rename to guide/src/format/theme/index-hbs.md diff --git a/book-example/src/format/theme/syntax-highlighting.md b/guide/src/format/theme/syntax-highlighting.md similarity index 100% rename from book-example/src/format/theme/syntax-highlighting.md rename to guide/src/format/theme/syntax-highlighting.md diff --git a/book-example/src/misc/contributors.md b/guide/src/misc/contributors.md similarity index 100% rename from book-example/src/misc/contributors.md rename to guide/src/misc/contributors.md diff --git a/book-example/src/misc/introduction.md b/guide/src/misc/introduction.md similarity index 100% rename from book-example/src/misc/introduction.md rename to guide/src/misc/introduction.md diff --git a/src/preprocess/cmd.rs b/src/preprocess/cmd.rs index 625c143b..f9c64e28 100644 --- a/src/preprocess/cmd.rs +++ b/src/preprocess/cmd.rs @@ -171,15 +171,15 @@ mod tests { use crate::MDBook; use std::path::Path; - fn book_example() -> MDBook { - let example = Path::new(env!("CARGO_MANIFEST_DIR")).join("book-example"); + fn guide() -> MDBook { + let example = Path::new(env!("CARGO_MANIFEST_DIR")).join("guide"); MDBook::load(example).unwrap() } #[test] fn round_trip_write_and_parse_input() { let cmd = CmdPreprocessor::new("test".to_string(), "test".to_string()); - let md = book_example(); + let md = guide(); let ctx = PreprocessorContext::new( md.root.clone(), md.config.clone(), diff --git a/tests/dummy_book/mod.rs b/tests/dummy_book/mod.rs index a395c2df..d9d9a068 100644 --- a/tests/dummy_book/mod.rs +++ b/tests/dummy_book/mod.rs @@ -135,11 +135,11 @@ fn recursive_copy, B: AsRef>(from: A, to: B) -> Result<()> } pub fn new_copy_of_example_book() -> Result { - let temp = TempFileBuilder::new().prefix("book-example").tempdir()?; + let temp = TempFileBuilder::new().prefix("guide").tempdir()?; - let book_example = Path::new(env!("CARGO_MANIFEST_DIR")).join("book-example"); + let guide = Path::new(env!("CARGO_MANIFEST_DIR")).join("guide"); - recursive_copy(book_example, temp.path())?; + recursive_copy(guide, temp.path())?; Ok(temp) } diff --git a/tests/rendered_output.rs b/tests/rendered_output.rs index 4f0568dc..6234c29b 100644 --- a/tests/rendered_output.rs +++ b/tests/rendered_output.rs @@ -345,7 +345,7 @@ fn create_missing_file_with_config() { } /// This makes sure you can include a Rust file with `{{#playground example.rs}}`. -/// Specification is in `book-example/src/format/rust.md` +/// Specification is in `guide/src/format/rust.md` #[test] fn able_to_include_playground_files_in_chapters() { let temp = DummyBook::new().build().unwrap();