Fixed README documentation.

This commit is contained in:
Nicolás Ortega Froysa 2020-10-25 10:24:44 +01:00
parent fc82364449
commit 5e99d49dee

19
README
View File

@ -31,8 +31,8 @@ generated site directories, looking for includes of templates and
parsing variables.
## Templates
To include a template into an HTML file, you would simply add
`#{<file>}` to the HTML document, where `<file>` is the name of the
To include a template into an HTML file, you would simply add the line
`#/<file>` to the HTML document where `<file>` is the name of the
template file relative to the `_templates/` directory. For example,
supposing the following file structure:
@ -41,7 +41,7 @@ supposing the following file structure:
/_templates/header.html
In order to include `header.html` into the `index.html` document, one
would write `#{header.html}` within `index.html`, and likewise could be
would write `#/header.html` within `index.html`, and likewise could be
done with `footer.html`.
## Variables
@ -52,15 +52,14 @@ be defined in each individual page, and referenced in the templates. All
variables are strings.
To define a variable in an HTML file, a section must be declared at the
beginning of the file which starts and ends with `%%%`. Within this
section, variables are declared and defined by the syntax
`<name>=<string>`. Note that there is no need to use quotes, as
everything after the `=` is considered part of the string until the end
of the line. These variables can then be used in the template files
which are imported with the syntax `${<name>}`. For example:
beginning of the file which ends with `%%%`. Within this section,
variables are declared and defined by the syntax `<name>=<string>`. Note
that there is no need to use quotes, as everything after the `=` is
considered part of the string until the end of the line. These variables
can then be used in the template files which are imported with the
syntax `${<name>}`. For example:
index.html:
%%%
my-title=Home Page
%%%
#{header.html}