rumkin / pill

Add dynamic content loading to static sites with only 1 KiB of JS
https://rumkin.github.io/pill/
MIT License
383 stars 18 forks source link

Update Readme to reflect custom events #38

Closed tamb closed 3 years ago

tamb commented 4 years ago

Current custom events should be added to API section.

I propose we define the structure for docs like:

API

rumkin commented 4 years ago

I think the standard here is to add Events section into the API's and to add links to events into hooks and vice versa. Like MDN does (example HTMLFormElement).

tamb commented 4 years ago

@rumkin Gotcha. So a separate section but hooks and events should link to each other. 👍

rumkin commented 4 years ago

This is a proposal from #32 issue. To restructure documentation originally provided by @tamb:

I believe the API sections needs to be restructured as such:

API

Hooks

pillOptions.onReady() etc...

Custom Events (when merged)


And it might look like so:

I believe the API sections needs to be restructured as such:


API

Hooks

onReady() Hook

(ref to pill:ready event)

Events

pill:ready Event

(ref to onReady() hook)

Options

PillOptions.onReady()

Option description.

(ref to onReady() hook)