feat(blog): enable live likes and first-party views
This commit is contained in:
1 parent
89cdb00765
commit
8c19266760
13 files changed
+631
-30
No files matched your search
+17
-3
@@ -83,6 +83,8 @@ The default values are:
|
||||
|
||||
```txt
|
||||
PUBLIC_AIA_API_BASE=https://api.azinstitute4autism.com
|
||||
PUBLIC_COUNTERS_MODE=off
|
||||
PUBLIC_COUNTERS_LIVE_APPROVED=false
|
||||
PUBLIC_ALLOW_INDEXING=false
|
||||
```
|
||||
|
||||
@@ -94,6 +96,16 @@ not deploy anything or change environment files. Run `npm run build` afterward
|
||||
to restore staging output. Only explicitly authorized production deployments
|
||||
should publish indexing-enabled artifacts.
|
||||
|
||||
Ordinary local builds keep counters off. `npm run deploy` deliberately and
|
||||
non-overridably builds the production artifact with live counters, the approved
|
||||
API origin and `PUBLIC_COUNTERS_LIVE_APPROVED=true`. Article pages post one
|
||||
first-party view per real navigation; Library cards only batch-read statistics.
|
||||
Likes use the existing POST/DELETE API and store only the visitor's chosen slug
|
||||
set in localStorage. No view cookies or visitor identifiers are created. Run
|
||||
`npm run test:counters`, then build in live mode and run `npm run
|
||||
verify:counters -- --browser=chromium` (or `firefox`) for a fully intercepted
|
||||
browser regression that cannot write production counters.
|
||||
|
||||
## View And Build
|
||||
|
||||
### Development Server
|
||||
@@ -600,16 +612,18 @@ Use `PUBLIC_AIA_FORMS_MODE=off npm run build` for an offline artifact, or
|
||||
`PUBLIC_AIA_FORMS_MODE=mock npm run dev` for synthetic fixtures. Missing/empty
|
||||
mode means live; obsolete `isolated-test` and other invalid values produce an
|
||||
explicit configuration error. Remove old approval/environment variables from
|
||||
local settings. Indexing is independent of forms; counters remain off by default.
|
||||
local settings. Indexing and form mode remain independent of counter mode.
|
||||
|
||||
See the [current Form A guide](integrations/jotform/README.md) for the exact
|
||||
registry, safeguards, rollback and owner acceptance requirements. Form C remains
|
||||
inactive. Employee-portal private input retains its own separate gates.
|
||||
|
||||
Verify matching output with
|
||||
`node tools/phase10-artifact-verify.mjs --mode=staging --forms=live`;
|
||||
`node tools/phase10-artifact-verify.mjs --mode=staging --forms=live --counters=off`;
|
||||
use `--mode=indexing` for indexing output and `--forms=off` or `--forms=mock`
|
||||
for those explicit builds. No actual submissions run in automated tests.
|
||||
for those explicit builds. Production counter artifacts require
|
||||
`--counters=live`. No actual submissions or production counter writes run in
|
||||
automated tests.
|
||||
|
||||
## Static releases and employee portal
|
||||
|
||||
|
||||
Reference in new issue
Block a user