rSW/docs/content/quick_start.rst

71 lines
1.3 KiB
ReStructuredText
Raw Permalink Normal View History

2022-09-30 14:24:39 +03:00
: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/>`_.