routify.dev icon indicating copy to clipboard operation
routify.dev copied to clipboard

Organizing Documentation

Open kevmodrome opened this issue 5 years ago • 11 comments
trafficstars

Needs to get documented:

Functionality:

  • [ ] Plugins
  • [x] bundling

Helpers:

  • [x] $redirect()
  • [x] $afterPageLoad() (#122)
  • [ ] $meta()
  • [ ] $precache()
  • [x] $prefetch()
  • [x] $metatags()
  • [ ] scroll-lock https://github.com/sveltech/routify/issues/86#issuecomment-580312171 Needs expanding:
  • [x] Query strings
  • [x] Deployment (Now and Netlify)
  • [ ] Structure section on docs page (explain _reset, _fallback, _layout)

Examples:

  • [x] Link to example app. https://github.com/sveltech/routify/issues/219

  • [x] Migrating from other templates

    • [x] Standard svelte-template (#132)
    • [x] Sapper (#132)

Other:

  • [x] Troubleshooting Page
  • [x] Improve introduction/structure
  • [ ] Rephrase prerendering as static export or similar

kevmodrome avatar May 24 '20 10:05 kevmodrome

I added bundling to the list

In a project with dynamic imports, setting /admin/_layout.svelte to be bundled would create an admin.js bundle.

If you then also set /admin/crud to be bundled, the content of this folder would then have it's own bundle, called admin_crud.js

jakobrosenberg avatar May 24 '20 11:05 jakobrosenberg

$afterPageLoad is worked on in #122 .

Wolfr avatar May 24 '20 15:05 Wolfr

@kevmodrome Not sure why you think _layout and _reset needs expanding. The docs are here: https://routify.dev/guide/introduction/structure . Isn't this already covered?

Wolfr avatar May 24 '20 16:05 Wolfr

I wrote a guide on how to migrate from svelte-template in #132 .

Wolfr avatar May 24 '20 16:05 Wolfr

Should we make a clear distinction between migrating to the starter template and migrating to Routify? Some people just want the routes, so for them it's just a matter of npm installing Routify, running Routify and adding it to App.svelte. (I know we have install instructions, but they seem to be lost on some people. Maybe they could use some clarification.)

jakobrosenberg avatar May 24 '20 16:05 jakobrosenberg

I guess at some level what we already have in the docs can be combined with #132 into a section "How to add Routify to your project".

Wolfr avatar May 24 '20 16:05 Wolfr

@kevmodrome Not sure why you think _layout and _reset needs expanding. The docs are here: https://routify.dev/guide/introduction/structure . Isn't this already covered?

Expanding might be the wrong word. I think that you should be able to go to the Docs and see all features even if they are in the Guide section. Sometime a user might come and just want to see how _layout works without having to hunt around in the guide where it might not even exist (in the eyes of the user)

kevmodrome avatar May 24 '20 17:05 kevmodrome

Added Rephrase prerendering as static export or similar

jakobrosenberg avatar May 26 '20 20:05 jakobrosenberg

Two points we have to document:

  • $redirect() functions the same as $goto(), but uses replacestate instead of pushstate (the original page doesn't get added to browser history)
  • You can change the directory Routify uses for its files with a flag: routify --routify-dir routify-files. This is useful when using Electron.

Wolfr avatar May 28 '20 20:05 Wolfr

Structure section on docs page (explain _reset, _fallback, _layout)

How should we handle this one?

It's already in the guide, so we have to consider the pitfalls of duplicate information

  • it can be confusing, since either the information on page A and B are identical or they're not and you don't know which page you should be reading.
  • it can cause inconsistencies in documentation
  • it can increase navigation clutter

jakobrosenberg avatar Jun 02 '20 09:06 jakobrosenberg

  • I removed FunctionDoc styling #140 from the OP as it is a design issue, not a documentation issue
  • I marked "Troubleshooting" section as done since we now have a FAQ page that could serve for this

Wolfr avatar Jun 30 '20 21:06 Wolfr