sveltejs / sveltejs/kit

Redirect automatically to the page/content you just saved.

Open
#4,808 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p2-nice-to-have
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the problem

While editing site contents I often jump right into a particular file in routes, or jump around between files and make edits as I go.
There is a really nice feature in Hugo that will redirect automatically to the page/content you just saved.

https://gohugo.io/getting-started/usage/#redirect-automatically-to-the-page-you-just-saved

This is very useful as it takes me to view the page I am working on without navigating to that page through the website.

Describe the proposed solution

For Hugo you pass this as a configuration parameter in the config.toml file, or as a command line flag when running hugo server --navigateToChanged.

Something similar to this functionality would be nice, where I can enable this feature intentionally.

svelte-kit dev --navigateToChanged

Or, as a parameter in the svelte.config.js file ( https://kit.svelte.dev/docs/configuration ).

Alternatives considered

Manually navigating to the preview of whatever file I am working on at the time.

Importance

would make my life easier

Additional Information

I am coming to Svelte/SvelteKit from Hugo, and there are a lot of little nice to have features in Hugo that would improve the SvelteKit dev/editing experience.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Hugo redirect-automatically-to-the-page-you-just-saved reference and SvelteKit's configuration documentation. Identify the development-server entry point and determine how a saved route or content file maps to its preview URL. Done means an intentionally enabled option redirects the browser to the page corresponding to the file just saved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
developer-experience, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.