Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Latest commit

 

History

History
88 lines (81 loc) · 1.63 KB

File metadata and controls

88 lines (81 loc) · 1.63 KB
create a document named "Example"
with meta data named "description" with a value "A simple website in DNL"
create a container and
	create a heading "Example" and
	create a paragraph "This is an example text.".

Faz uma primeira conversão para JSON

{
  "type": "html",
  "children": [
    {
      "type": "head",
      "children": [
        {
          "type": "meta",
          "attributes": [
            {
              "charset": "UTF-8"
            }
          ]
        },
        {
          "type": "meta",
          "attributes": [
            {
              "name": "description",
              "content": "A simple website in DNL"
            }
          ]
        },
        {
          "type": "title",
          "content": "Example"
        },
        {
          "type": "body",
          "children": [
            {
              "type": "div",
              "attributes": [
                {
                  "class": "container"
                }
              ],
              "children": [
                {
                  "type": "h1",
                  "content": "Example"
                },
                {
                  "type": "p",
                  "content": "This is an example text."
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Na segunda passagem converte para HTML

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<meta name="description" content="A simple website in DNL" />

		<title>Example</title>
	</head>

	<body>
		<div class="container">
			<h1>Example</h1>

			<p>This is an example text.</p>
		</div>
	</body>
</html>