rSW/docs/content/quick_start.rst
2022-09-30 14:24:39 +03:00

71 lines
1.3 KiB
ReStructuredText
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:title: Quick Start
:date: 2022-09-22
===========
Quick Start
===========
After installation you must have these file structure::
./
├── content/
├── layouts/
├── Makefile
├── settings.toml
└── static/
Articles mst be placed into content/ dir and have .rst extension.
Also you can place article into subdirectory as following::
./
└── content/
   └── hello_world/
   └── index.rst
You need to create page template first.
Create **layouts/template.jinja2** with content:
.. code-block:: jinja
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
</head>
<body>
{{ html | safe }}
</body>
</html>
Now create first page **content/index.rst**:
.. code-block:: rst
:title: Hello, World!
:date: 1970-01-01
=============
Hello, World!
=============
Hello, there! This is my first site built with *re*\ **Structured**\ *Web*!
Build your site with command:
.. code-block:: shell
rsw build
# OR
make
build/ directory will be created. Run local HTTP-server to view site:
.. code-block:: text
make serve
Local server will be started at `http://127.0.0.1:8080/ <http://127.0.0.1:8080/>`_.