Skip to content

Commit 14a4b86

Browse files
author
Marek Suchánek
committed
Move templates to the data directory and add readmes
1 parent 747f263 commit 14a4b86

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

data/generated/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# generated
2+
3+
This directory contains static, fully generated module files created by a released version of `newdoc`. These files serve mainly as test targets to check that `newdoc` continues to generate the exact same output.
4+

data/templates/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# templates
2+
3+
This directory contains the templates that `newdoc` uses at runtime to generate new files.
4+
5+
The templates are AsciiDoc files with additional directives for `newdoc` to replace certain parts of the content with generated text. Currently, the directives do not comply to any templating standard, and instead, they are simple replaceable strings.
6+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/module.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ pub struct Module {
3636
}
3737

3838
// Load the AsciiDoc templates at build time
39-
const ASSEMBLY_TEMPLATE: &str = include_str!("../templates/assembly.adoc");
40-
const CONCEPT_TEMPLATE: &str = include_str!("../templates/concept.adoc");
41-
const PROCEDURE_TEMPLATE: &str = include_str!("../templates/procedure.adoc");
42-
const REFERENCE_TEMPLATE: &str = include_str!("../templates/reference.adoc");
39+
const ASSEMBLY_TEMPLATE: &str = include_str!("../data/templates/assembly.adoc");
40+
const CONCEPT_TEMPLATE: &str = include_str!("../data/templates/concept.adoc");
41+
const PROCEDURE_TEMPLATE: &str = include_str!("../data/templates/procedure.adoc");
42+
const REFERENCE_TEMPLATE: &str = include_str!("../data/templates/reference.adoc");
4343

4444
/// Construct a basic builder for `Module`, storing information from the user input.
4545
impl Input {

0 commit comments

Comments
 (0)