@autobusal/providers 1.5.1 → 1.6.1
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 +23 -0
- package/Setup/Preload.tsx +38 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ All notable changes to `@autobusal/providers` are documented here. This project
|
|
|
4
4
|
adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.6.1] - 2026-07-30
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **`Organization`/`WebSite` JSON-LD `url` was wrong** (introduced in 1.6.0,
|
|
12
|
+
same day) - used `data.url` (`SettingsData.url`, from `Label::url()`),
|
|
13
|
+
which is deliberately the obtapi asset-storage path for this label's
|
|
14
|
+
uploaded files (`https://obtapi.../storage/labels/{label}`), not the
|
|
15
|
+
site's own public domain. Now uses `window.location.origin`.
|
|
16
|
+
|
|
17
|
+
## [1.6.0] - 2026-07-30
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **Sitewide `Organization` + `WebSite` JSON-LD** (`Setup/Preload.tsx`), via
|
|
22
|
+
the new `@autobusal/common` `JsonLd` component - the entity-grounding
|
|
23
|
+
signal AI assistants and Google's Knowledge Graph use to resolve "who is
|
|
24
|
+
this brand". `Organization.sameAs` is populated from
|
|
25
|
+
`preferences.social.*`. No `WebSite.potentialAction`/SearchAction -
|
|
26
|
+
that schema is for a single free-text query field (Google's sitelinks
|
|
27
|
+
searchbox); this app's search is two-field (from/to), so a SearchAction
|
|
28
|
+
here would be invalid structured data, not a working sitelinks box.
|
|
29
|
+
|
|
7
30
|
## [1.5.1] - 2026-07-30
|
|
8
31
|
|
|
9
32
|
### Fixed
|
package/Setup/Preload.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JsonLd } from '@autobusal/common';
|
|
1
2
|
import { SettingsData } from '../types/settings';
|
|
2
3
|
import { useSystemTheme } from '@autobusal/hooks';
|
|
3
4
|
|
|
@@ -22,6 +23,40 @@ const Preload = ({ data, children }: Props): JSX.Element => {
|
|
|
22
23
|
|
|
23
24
|
const primaryColor = data.colors[theme].primary.normal;
|
|
24
25
|
|
|
26
|
+
// sitewide Organization + WebSite structured data - the entity-grounding
|
|
27
|
+
// signal AI assistants and Google's Knowledge Graph use to resolve "who is
|
|
28
|
+
// this brand". Rendered once here rather than per-page since it describes
|
|
29
|
+
// the SITE, not a specific page. No WebSite `potentialAction`/SearchAction:
|
|
30
|
+
// that schema is meant for a single free-text query field (Google's
|
|
31
|
+
// sitelinks searchbox), and this app's search is inherently two-field
|
|
32
|
+
// (from/to) - forcing it into that shape would just be invalid structured
|
|
33
|
+
// data, not a working sitelinks box.
|
|
34
|
+
//
|
|
35
|
+
// NOTE: `data.url` (SettingsData.url, from Label::url()) is deliberately
|
|
36
|
+
// the obtapi ASSET STORAGE path for this label's uploaded files
|
|
37
|
+
// (https://obtapi.../storage/labels/{label}) - that's correct for the
|
|
38
|
+
// favicon/font hrefs below, which really do live there, but wrong for
|
|
39
|
+
// anything meaning "this site's own homepage" (Organization/WebSite.url).
|
|
40
|
+
// window.location.origin is the actual public domain, whatever it is for
|
|
41
|
+
// this brand/environment.
|
|
42
|
+
const siteUrl = window.location.origin;
|
|
43
|
+
|
|
44
|
+
const organizationLd = {
|
|
45
|
+
'@context': 'https://schema.org',
|
|
46
|
+
'@type': 'Organization',
|
|
47
|
+
name: data.preferences.company,
|
|
48
|
+
url: siteUrl,
|
|
49
|
+
logo: `${ data.url }/favicons/apple-touch-icon.png`,
|
|
50
|
+
sameAs: Object.values(data.preferences.social).filter(Boolean)
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const websiteLd = {
|
|
54
|
+
'@context': 'https://schema.org',
|
|
55
|
+
'@type': 'WebSite',
|
|
56
|
+
name: data.preferences.company,
|
|
57
|
+
url: siteUrl
|
|
58
|
+
};
|
|
59
|
+
|
|
25
60
|
return (
|
|
26
61
|
<>
|
|
27
62
|
<title>{ data.preferences.company }</title>
|
|
@@ -38,6 +73,9 @@ const Preload = ({ data, children }: Props): JSX.Element => {
|
|
|
38
73
|
|
|
39
74
|
<link href={ `https://fonts.googleapis.com/css2?family=${ fontTitle }:wght@700&family=${ fontContent }:wght@300;400;700&display=swap` } rel="stylesheet" />
|
|
40
75
|
|
|
76
|
+
<JsonLd data={ organizationLd } />
|
|
77
|
+
<JsonLd data={ websiteLd } />
|
|
78
|
+
|
|
41
79
|
{ children }
|
|
42
80
|
</>
|
|
43
81
|
);
|