@nera-static/nera 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nera-static/nera",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "The Nera CLI — scaffold, build, preview and update a Nera static site with one command over the @nera-static/core engine",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,12 +11,15 @@ imprint and privacy, with a menu on every page.
11
11
  live URL, e.g. `https://example.com`) once the domain is known.
12
12
  3. Write one Markdown page per topic, each with `layout: pages/default.pug`,
13
13
  a `title` and a `description`: `pages/index.md`, `pages/about.md`,
14
- `pages/services.md`, `pages/opening-hours.md`, `pages/contact.md`,
15
- `pages/imprint.md`, `pages/privacy.md`. Opening hours fit a Markdown
16
- table.
14
+ `pages/services.md`, `pages/opening-hours.md`, `pages/contact.md`.
15
+ Opening hours fit a Markdown table. A new site already has
16
+ `pages/imprint.md` and `pages/privacy.md` as placeholders, linked from
17
+ the layout's footer: replace their text, or write them if they are
18
+ missing.
17
19
  4. Menu: `npm install @nera-static/plugin-navigation`, list the pages in
18
20
  `config/navigation.yaml` (`href` ending in `.html`, `name`; groups such
19
- as `main:` and `footer:` for a footer menu with imprint and privacy), run
21
+ as `main:` and `footer:`; a footer menu replaces the layout's own
22
+ imprint and privacy links, so keep only one of the two), run
20
23
  `npx nera-navigation` and include a menu in
21
24
  `theme/views/layouts/layout.pug` (see the plugin README for the mixins).
22
25
  5. Contact form: follow [contact-form](contact-form.md).
@@ -61,10 +61,9 @@ finds pages the build would skip silently. Run it first.
61
61
  says nothing; `nera validate` warns (`layout-missing`). Renaming or deleting
62
62
  a layout breaks every page that uses it.
63
63
  - **The page body.** The rendered Markdown reaches the template as `content`.
64
- Without a theme, `theme/views/pages/default.pug` prints it with
65
- `main !{ content }` inside `block content`; with a theme, the theme's layout
66
- may already hold the `<main>`. A page has exactly one `<main>`: check the
67
- layout and the page template before adding one.
64
+ Without a theme, `theme/views/pages/default.pug` prints it in a `main`
65
+ element inside `block content`; with a theme, the theme's layout may hold
66
+ the `<main>`. A page has exactly one `<main>`: check before adding one.
68
67
  - **`public/` is wiped on every build.** Put source files in `pages/`,
69
68
  `theme/` or `config/`; anything written into `public/` by hand is lost.
70
69
  - **Site files override theme files.** If `config/app.yaml` sets `theme:`,
@@ -115,7 +114,8 @@ the URL.
115
114
  ## Getting online
116
115
 
117
116
  `npm run build` writes the finished site into `public/`. That folder is what
118
- gets deployed: upload its contents to any static web host.
117
+ gets deployed: upload its contents to any static web host. Replace the
118
+ imprint and privacy placeholders in `pages/` first, if the site has them.
119
119
 
120
120
  <!-- nera:site-notes — everything below this line belongs to the site owner; `nera update` keeps it as it is -->
121
121
  ## Notes for this site
@@ -6,3 +6,6 @@ translations:
6
6
  en:
7
7
  app_description: A static site built with Nera
8
8
  app_keywords: nera, static site generator
9
+ skip_to_content: Skip to content
10
+ imprint: Imprint
11
+ privacy: Privacy
@@ -0,0 +1,21 @@
1
+ ---
2
+ layout: pages/default.pug
3
+ title: Imprint
4
+ description: Imprint placeholder — replace it with your own legal notice
5
+ ---
6
+ # Imprint
7
+
8
+ **This is a placeholder.** It is not a legal notice. Replace this page with your
9
+ own imprint before you publish the site; if you are unsure what you need, ask a
10
+ lawyer.
11
+
12
+ ## To do
13
+
14
+ What an imprint typically names (the exact duty depends on your country and on
15
+ what the site does):
16
+
17
+ - who runs the site: full name, or company name and legal form
18
+ - a postal address where you can be reached
19
+ - fast ways to contact you: email address, and often a phone number
20
+ - the person responsible for the content, if the law asks for one
21
+ - register entries and VAT ID, if your business has them
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: pages/default.pug
3
+ title: Privacy
4
+ description: Privacy policy placeholder — replace it with your own privacy policy
5
+ ---
6
+ # Privacy
7
+
8
+ **This is a placeholder.** It is not a privacy policy. Replace this page with
9
+ your own privacy policy before you publish the site; if you are unsure what you
10
+ need, ask a lawyer.
11
+
12
+ ## To do
13
+
14
+ What a privacy policy typically covers (the exact duty depends on your country
15
+ and on what the site does):
16
+
17
+ - who is responsible for the data processing, and how to contact them
18
+ - what your hosting provider logs (such as IP addresses) and for how long
19
+ - every plugin, form, font, embed or analytics tool that processes visitor
20
+ data, its purpose and legal basis
21
+ - how long data is kept
22
+ - the visitor's rights (access, correction, deletion, objection) and where to
23
+ complain
@@ -9,6 +9,14 @@ html(lang=app.lang)
9
9
  meta(name="keywords", content=`${ meta.keywords || t('app_keywords') }`)
10
10
  meta(name="generator" content="nera")
11
11
  meta(name="robots" content=`${ meta.robots || app.robots }`)
12
+ style.
13
+ .skip-link { position: absolute; left: -9999px; }
14
+ .skip-link:focus { position: static; }
12
15
 
13
16
  body
17
+ a.skip-link(href="#main") #{ t('skip_to_content') }
14
18
  block content
19
+ footer
20
+ a(href="/imprint.html") #{ t('imprint') }
21
+ = ' · '
22
+ a(href="/privacy.html") #{ t('privacy') }
@@ -2,4 +2,4 @@
2
2
  extends ../layouts/layout
3
3
 
4
4
  block content
5
- main !{ content }
5
+ main#main !{ content }