decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.67k stars 3.03k forks source link

Update Docs: Improve custom widgets documentation #7032

Closed zoetrope69 closed 5 months ago

zoetrope69 commented 5 months ago

https://deploy-preview-7032--decap-www.netlify.app/docs/custom-widgets/

  1. Fix the code example The code example for the registerEditorComponent is incorrect as the line name: 'details', should be name: 'detail',. I think this mistake has come about because we're naming the field name the same as the HTML element <details>. I'm proposing to rename it to contents to avoid this mistake in the future.

  2. Markup headings correctly We're currently marking up what look like headings with a ** bold to make it look like a heading. I'm proposing we use actual headings here.

  3. Remove 'results' section It seems to be from some previous code example where it referred to a Youtube widget. This doesn't seem to be relevant anymore.

  4. Remove unnecessary links Looks like Gatsby create the anchor links automatically for each heading so we don't need to define them for the 'Development' and 'Production & Publishing' headings

    A beaver

netlify[bot] commented 5 months ago

Deploy Preview for decap-www ready!

Name Link
Latest commit 9387b6b4e75b2f8974174fc3ccc049c3e24a2321
Latest deploy log https://app.netlify.com/sites/decap-www/deploys/65a3781cf5192e0008534a0e
Deploy Preview https://deploy-preview-7032--decap-www.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.