@nera-static/starter-business 1.0.1 → 1.1.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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.1.0] - 2026-11-22
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Schema.org structured data: a scaffolded site depends on `@nera-static/plugin-structured-data` ^1.1.0 and writes one JSON-LD block into the `<head>` of every page, describing the business as a `LocalBusiness` (name, address, phone, opening hours, image, price range) and the site as a `WebSite` in the site's language. `nera build --check` and `nera validate` stay without findings, also with every check rule promoted to error and with `--lang de`.
|
|
13
|
+
- `config/structured-data.yaml`: the business's placeholder facts, the same as under `business:` in `config/app.yaml`, which the plugin does not read; no `entity.name`, so the entity and the `WebSite` are named after `name` in `config/app.yaml` and `nera new --name` renames both; `config/plugin-order.yaml` runs the plugin last, as its README asks.
|
|
14
|
+
- `theme/views/partials/head-extra.pug` fills the theme's `head-extra` seam with the plugin's view; `theme/views/vendor/plugin-structured-data/` is its published template, unchanged.
|
|
15
|
+
- README: a First steps item naming the values of `config/structured-data.yaml` to replace and keep in step with `business:`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- The package and starter description mention the structured data.
|
|
20
|
+
|
|
8
21
|
## [1.0.1] - 2026-10-18
|
|
9
22
|
|
|
10
23
|
### Changed
|
package/README.md
CHANGED
|
@@ -9,9 +9,9 @@ A ready-to-edit site for a small business, built with the
|
|
|
9
9
|
[Nera](https://github.com/seebaermichi/nera) static site generator on
|
|
10
10
|
[`@nera-static/theme-business`](https://www.npmjs.com/package/@nera-static/theme-business):
|
|
11
11
|
home with a hero image and service cards, about, services, opening hours, a
|
|
12
|
-
contact form, navigation, responsive images, social links, a sitemap
|
|
13
|
-
imprint and privacy placeholders. One small
|
|
14
|
-
third-party requests; a fresh site passes `nera build --check` and
|
|
12
|
+
contact form, navigation, responsive images, social links, a sitemap,
|
|
13
|
+
schema.org structured data and imprint and privacy placeholders. One small
|
|
14
|
+
script for the contact form, no third-party requests; a fresh site passes `nera build --check` and
|
|
15
15
|
`nera validate` without a single finding.
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
@@ -34,12 +34,16 @@ language gets a copy of the English `translations:` entry to translate.
|
|
|
34
34
|
and plugin texts
|
|
35
35
|
- `config/theme.yaml`, `contact-form.yaml`, `navigation.yaml`, `images.yaml`,
|
|
36
36
|
`social-media-links.yaml`
|
|
37
|
+
- `config/structured-data.yaml`: the business as a schema.org `LocalBusiness`,
|
|
38
|
+
written as JSON-LD into the `<head>` of every page; `config/plugin-order.yaml`
|
|
39
|
+
runs that plugin last
|
|
37
40
|
- `theme/views/partials/`: the theme's seams, filled with the plugins' output
|
|
38
41
|
- `theme/views/vendor/`: the plugins' published templates
|
|
39
42
|
- `theme/assets/js/contact-form.js`: the contact form's script, which opens
|
|
40
43
|
the visitor's own mail program (the form has no backend)
|
|
41
44
|
- `theme/assets/images/hero.jpg`: the home page's hero image
|
|
42
|
-
- plugins: contact-form, images, navigation, social-media-links, sitemap
|
|
45
|
+
- plugins: contact-form, images, navigation, social-media-links, sitemap,
|
|
46
|
+
structured-data
|
|
43
47
|
|
|
44
48
|
## German texts for `--lang de`
|
|
45
49
|
|
|
@@ -91,17 +95,24 @@ MIT
|
|
|
91
95
|
## First steps
|
|
92
96
|
|
|
93
97
|
After `nera new` the files are yours: a starter has no update path. Each
|
|
94
|
-
file named in steps 1 to
|
|
98
|
+
file named in steps 1 to 6 marks its placeholders as such.
|
|
95
99
|
|
|
96
100
|
1. Replace `origin: https://example.com` in `config/app.yaml` with your
|
|
97
|
-
site's real address. The sitemap
|
|
101
|
+
site's real address. The sitemap and the structured data's URLs are
|
|
102
|
+
built from it.
|
|
98
103
|
2. Replace the business's facts under `business:` in `config/app.yaml`:
|
|
99
104
|
street, postal code, city, country, phone and opening hours. A row's
|
|
100
105
|
`days` and the `hours_note` are translation keys: add new ones to
|
|
101
106
|
`translations:`.
|
|
102
|
-
3. Replace
|
|
107
|
+
3. Replace the same facts in `config/structured-data.yaml`, which does not
|
|
108
|
+
read `business:`: `type` (`LocalBusiness` or a subtype such as `Bakery`),
|
|
109
|
+
`address`, `telephone`, `opening_hours`, `image` and `priceRange`. The
|
|
110
|
+
business's name is `name` in `config/app.yaml`.
|
|
111
|
+
Keep them in step with `business:`, so the page and its structured data
|
|
112
|
+
say the same.
|
|
113
|
+
4. Replace `recipient: hello@example.com` in `config/contact-form.yaml` with
|
|
103
114
|
the address the contact form writes to.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
5. Replace the social link in `config/social-media-links.yaml`.
|
|
116
|
+
6. Replace `pages/imprint.md` and `pages/privacy.md` with your own legal texts.
|
|
117
|
+
7. Replace the sample copy of the pages, `theme/assets/images/hero.jpg` and
|
|
107
118
|
the grey placeholder icon `theme/assets/favicon.ico` with your own.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @nera-static/plugin-structured-data: the schema.org JSON-LD in the <head> of
|
|
2
|
+
# every page, which tells search engines and AI assistants who runs the site.
|
|
3
|
+
# Placeholders: replace every value before you deploy, together with the
|
|
4
|
+
# matching ones in `business:` in config/app.yaml (this file does not read
|
|
5
|
+
# them). The full list of keys is in the plugin's README.
|
|
6
|
+
#
|
|
7
|
+
# The site URL comes from `origin` in config/app.yaml; relative URLs below
|
|
8
|
+
# are made absolute against it.
|
|
9
|
+
|
|
10
|
+
entity:
|
|
11
|
+
# A schema.org type: LocalBusiness, or a more precise subtype such as
|
|
12
|
+
# Bakery, Restaurant, HairSalon or ProfessionalService.
|
|
13
|
+
type: LocalBusiness
|
|
14
|
+
# No `name`: the entity is named after `name` in config/app.yaml, which
|
|
15
|
+
# `nera new --name` sets. Add one only if the two names differ.
|
|
16
|
+
image: /images/hero.jpg
|
|
17
|
+
telephone: '+49 30 1234567'
|
|
18
|
+
address:
|
|
19
|
+
streetAddress: Bergstraße 12
|
|
20
|
+
postalCode: '10115'
|
|
21
|
+
addressLocality: Berlin
|
|
22
|
+
addressCountry: Germany
|
|
23
|
+
# Days Mo Tu We Th Fr Sa Su, times hh:mm; days not listed are closed.
|
|
24
|
+
opening_hours:
|
|
25
|
+
- Mo-Fr 07:00-18:00
|
|
26
|
+
- Sa 08:00-14:00
|
|
27
|
+
# Copied verbatim into the entity node.
|
|
28
|
+
properties:
|
|
29
|
+
priceRange: €€
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nera-static/starter-business",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "A ready-to-edit Nera site for a small business on @nera-static/theme-business: home, about, services, opening hours, a contact form, navigation, responsive images, social links, a sitemap and imprint and privacy placeholders. One small script for the contact form.",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "A ready-to-edit Nera site for a small business on @nera-static/theme-business: home, about, services, opening hours, a contact form, navigation, responsive images, social links, a sitemap, schema.org structured data and imprint and privacy placeholders. One small script for the contact form.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"lint": "eslint .",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"nera": {
|
|
25
25
|
"starter": {
|
|
26
26
|
"label": "Business",
|
|
27
|
-
"description": "A ready-to-edit Nera site for a small business on @nera-static/theme-business: home, about, services, opening hours, a contact form, navigation, responsive images, social links, a sitemap and imprint and privacy placeholders. One small script for the contact form."
|
|
27
|
+
"description": "A ready-to-edit Nera site for a small business on @nera-static/theme-business: home, about, services, opening hours, a contact form, navigation, responsive images, social links, a sitemap, schema.org structured data and imprint and privacy placeholders. One small script for the contact form."
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"author": "Michael Becker",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"@nera-static/plugin-navigation": "^3.1.1",
|
|
50
50
|
"@nera-static/plugin-sitemap": "^1.1.0",
|
|
51
51
|
"@nera-static/plugin-social-media-links": "^2.3.0",
|
|
52
|
+
"@nera-static/plugin-structured-data": "^1.1.0",
|
|
52
53
|
"@nera-static/theme-business": "^1.0.2"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//- The page's schema.org JSON-LD, for the <head> of a layout:
|
|
2
|
+
//- include /vendor/plugin-structured-data/index
|
|
3
|
+
//- meta.structuredData is already serialised and escaped by the plugin
|
|
4
|
+
//- (no `<`, `>` or `&` left in it), so the unescaped `!=` cannot end the
|
|
5
|
+
//- script element. Pages without it get no tag at all.
|
|
6
|
+
if meta && meta.structuredData
|
|
7
|
+
script(type="application/ld+json")!= meta.structuredData
|