Skip to content

Clean up documentation for website local view, add npm script for imagine page creation #21117

@iansltx

Description

@iansltx

Goal

User story
As a contributor to the website,
I want to have a shorter, more standardized process for landing page builds and viewing changes
so that I can more quickly perform these tasks, and thus have a higher probability of doing them for verifying even minor changes.

How?

  • Update Digital Experience documentation to drop "node_modules bin" commands in favor of npm run xyz, removing the mention of the latter later in the page
  • Update docs for local view to merge build and server-start steps, as they can be done with a single (&&'d in the case of Sails globally installed) command whether using sails or npm scripts
  • Bonus points: package landing page gen as an npm command that accepts an argument for page name
  • Extra bonus points: include codegen for the extra steps in landing page generation to precisely automate what's currently a somewhat fiddly manual checklist

Context

I'm reading through the handbook and, in addition to fxiing tpyos, I've noticed a few rather step-intensive processes that, while it's great that they're spelled out, look like they could be automated a bit more. Landing page generation seems to be one of those.

Additionally, coming from other environments relying on Node (React/Vue/Angular/Nest/NestJS), the convention at this point seems to be to have package.json contain commonly used scripts, rather than needing to globally install another tool. While this isn't my first Sails project I've touched, it's been awhile, and my guess is that semi-random contributors won't have that set up, so having a workflow that uses npm scripts instead will increase the chance that a potential contributor (internal primarily-Golang or external) validates things locally ("run npm i and then run npm run start-dev rather than "install sails globally or use this ugly command").

The first couple of checklist items should be quick handbook fixes...just wanted to make sure Digital Experience folks agree that they'd be a good idea...while the third item should likewise not be too bad even though it's more than just a docs update.

Fourth item should probably be split into a different issue but I'm including it here to show a natural progression of making life easier, depending on how often landing pages are/are expected to be created, as the customers for those changes are 100% internal so frequency of use may not be high enough for process cleanup to be relevant.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions