Skip to content

Latest commit

 

History

History
91 lines (61 loc) · 1.24 KB

README.md

File metadata and controls

91 lines (61 loc) · 1.24 KB

Nuf language

Commands

Generate

Converts nuf file into html

generate <input-file-pathname> <output-file-pathname> where:

  • <input-file-pathname> - .nuf file
  • <output-file-pathname> - .html file
go run main.go generate ./test_data/text.nuf ./test_data/text.html

Syntax

Paragraph

Input:

"Paragraph 1";
"Paragraph 2";

Output:

<p>Paragraph 1</p>
<p>Paragraph 2</p>

Heading

Input:

section_title("Heading 1");
section_title("Heading 2");

Output:

<h1>Heading 1</h1>
<h1>Heading 2</h1>

Sections

Input:

section("site_navigation");
section("main");

Output:

<nav></nav>
<main></main>

Adding elements inside other elements

Input:

section_title("Heading 1") inside --main;

section("main");

Output:

<main>
    <h1>Heading 1</h1>
</main>

Attribution

Builds on top of