diff --git a/.github/workflows/docs-preview-create.yml b/.github/workflows/docs-preview-create.yml new file mode 100644 index 0000000000..ece0c2abdb --- /dev/null +++ b/.github/workflows/docs-preview-create.yml @@ -0,0 +1,75 @@ +name: Docs preview create + +on: + workflow_dispatch: + inputs: + repo: + description: 'Repository name (not fully-qualified, eg. `svelte` or `kit`)' + required: true + type: string + pr: + description: 'PR number' + required: true + type: string + owner: + description: 'Owner (eg. sveltejs)' + required: true + type: string + branch: + description: 'Branch (eg. my-feature-branch)' + required: true + type: string + +permissions: + contents: write + +env: + BRANCH: preview-${{ inputs.repo }}-${{ inputs.pr }} + +jobs: + Sync: + name: Sync + runs-on: ubuntu-latest + + concurrency: + group: preview-${{ inputs.repo }}-${{ inputs.pr }} # can't reference env here + cancel-in-progress: true + + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + ref: main # Explicitly checkout main branch first + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + - run: pnpm install --frozen-lockfile + + - name: Create or reset branch from main + run: | + git fetch origin + git checkout -B ${{ env.BRANCH }} # Force create/reset branch based on current main + + - name: Sync + run: cd apps/svelte.dev && pnpm sync-docs --owner="${{ inputs.owner }}" -p "${{ inputs.repo }}#${{ inputs.branch }}" + + - name: Configure Git + run: | + git config --global user.name "GitHub Actions Bot" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Push + id: push + run: git add -A && git commit -m "sync docs" && git push -u origin ${{ env.BRANCH }} --force + + - name: Request preview comment + uses: peter-evans/repository-dispatch@v3 + with: + event-type: 'request-preview-comment' + client-payload: |- + { + "repo": "${{ inputs.repo }}", + "pr": "${{ inputs.pr }}" + } diff --git a/.github/workflows/docs-preview-delete.yml b/.github/workflows/docs-preview-delete.yml new file mode 100644 index 0000000000..faa13fbade --- /dev/null +++ b/.github/workflows/docs-preview-delete.yml @@ -0,0 +1,27 @@ +name: Docs preview delete + +on: + workflow_dispatch: + inputs: + repo: + description: 'Repository name (not fully-qualified, eg. `svelte` or `kit`)' + required: true + type: string + pr: + description: 'PR number' + required: true + type: string + +env: + BRANCH: preview-${{ inputs.repo }}-${{ inputs.pr }} + +jobs: + Sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + - name: Delete branch + run: git push origin :${{ env.BRANCH }} diff --git a/.github/workflows/sync-docs.yml b/.github/workflows/sync-docs.yml new file mode 100644 index 0000000000..79b5a9727f --- /dev/null +++ b/.github/workflows/sync-docs.yml @@ -0,0 +1,37 @@ +name: Sync docs + +on: + workflow_dispatch: + inputs: + repo: + description: 'Repository name (not fully-qualified, eg. `svelte` or `kit`)' + required: true + type: string + +permissions: + contents: write + pull-requests: write + +jobs: + Sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + - run: pnpm install --frozen-lockfile + + - name: Sync + run: cd apps/svelte.dev && pnpm sync-docs -p ${{ inputs.repo }} + + - name: Create or update pull request + uses: peter-evans/create-pull-request@v7 + with: + commit-message: sync ${{ inputs.repo }} docs + title: Sync `${{ inputs.repo }}` docs + body: This is an automated pull request. See the [README](../tree/main/apps/svelte.dev/scripts/sync-docs/README.md) for more information + branch: sync-${{ inputs.repo }} + base: main diff --git a/apps/kit.svelte.dev/vercel.json b/apps/kit.svelte.dev/vercel.json index 4df4ecb39f..6b9ecfbe6e 100644 --- a/apps/kit.svelte.dev/vercel.json +++ b/apps/kit.svelte.dev/vercel.json @@ -16,10 +16,6 @@ "destination": "https://svelte.dev/docs/kit/load", "permanent": true }, - { - "source": "/docs/modules", - "destination": "https://svelte.dev/docs/kit/@sveltejs-kit" - }, { "source": "/docs/types", "destination": "https://svelte.dev/docs/kit/@sveltejs-kit" diff --git a/apps/learn.svelte.dev/vercel.json b/apps/learn.svelte.dev/vercel.json index 0d622fbe27..806baa00c2 100644 --- a/apps/learn.svelte.dev/vercel.json +++ b/apps/learn.svelte.dev/vercel.json @@ -95,7 +95,7 @@ }, { "source": "/tutorial/event-forwarding", - "destination": "https://svelte.dev/tutorial/svelte/event-forwarding" + "destination": "https://github.com/sveltejs/svelte/blob/ac6d8c0bf4534221818c634286c7c9b1b7fd91d3/documentation/tutorial/05-events/05-event-forwarding/app-b/App.svelte" }, { "source": "/tutorial/dom-event-forwarding", @@ -131,47 +131,47 @@ }, { "source": "/tutorial/marked", - "destination": "https://svelte.dev/tutorial/svelte/marked" + "destination": "https://svelte.dev/tutorial/svelte/textarea-inputs" }, { "source": "/tutorial/onmount", - "destination": "https://svelte.dev/tutorial/svelte/onmount" + "destination": "https://svelte.dev/docs/svelte/lifecycle-hooks" }, { "source": "/tutorial/update", - "destination": "https://svelte.dev/tutorial/svelte/update" + "destination": "https://svelte.dev/docs/svelte/lifecycle-hooks" }, { "source": "/tutorial/elizabot", - "destination": "https://svelte.dev/tutorial/svelte/elizabot" + "destination": "https://github.com/sveltejs/svelte/blob/ac6d8c0bf4534221818c634286c7c9b1b7fd91d3/documentation/tutorial/07-lifecycle/03-update/text.md" }, { "source": "/tutorial/tick", - "destination": "https://svelte.dev/tutorial/svelte/tick" + "destination": "https://svelte.dev/docs/svelte/lifecycle-hooks#tick" }, { "source": "/tutorial/writable-stores", - "destination": "https://svelte.dev/tutorial/svelte/writable-stores" + "destination": "https://svelte.dev/tutorial/svelte/introducing-stores" }, { "source": "/tutorial/auto-subscriptions", - "destination": "https://svelte.dev/tutorial/svelte/auto-subscriptions" + "destination": "https://svelte.dev/docs/svelte/stores" }, { "source": "/tutorial/readable-stores", - "destination": "https://svelte.dev/tutorial/svelte/readable-stores" + "destination": "https://svelte.dev/docs/svelte/stores" }, { "source": "/tutorial/derived-stores", - "destination": "https://svelte.dev/tutorial/svelte/derived-stores" + "destination": "https://svelte.dev/docs/svelte/stores" }, { "source": "/tutorial/custom-stores", - "destination": "https://svelte.dev/tutorial/svelte/custom-stores" + "destination": "https://svelte.dev/docs/svelte/stores" }, { "source": "/tutorial/store-bindings", - "destination": "https://svelte.dev/tutorial/svelte/store-bindings" + "destination": "https://github.com/sveltejs/svelte/blob/ac6d8c0bf4534221818c634286c7c9b1b7fd91d3/documentation/tutorial/08-stores/06-store-bindings/text.md" }, { "source": "/tutorial/tweens", @@ -219,7 +219,7 @@ }, { "source": "/tutorial/animate", - "destination": "https://svelte.dev/tutorial/svelte/animate" + "destination": "https://svelte.dev/tutorial/svelte/animations" }, { "source": "/tutorial/actions", @@ -229,10 +229,6 @@ "source": "/tutorial/adding-parameters-to-actions", "destination": "https://svelte.dev/tutorial/svelte/adding-parameters-to-actions" }, - { - "source": "/tutorial/core", - "destination": "https://svelte.dev/tutorial/svelte/core" - }, { "source": "/tutorial/tippy.js", "destination": "https://svelte.dev/tutorial/svelte/tippy.js" @@ -283,23 +279,23 @@ }, { "source": "/tutorial/slots", - "destination": "https://svelte.dev/tutorial/svelte/slots" + "destination": "https://svelte.dev/docs/svelte/legacy-slots" }, { "source": "/tutorial/named-slots", - "destination": "https://svelte.dev/tutorial/svelte/named-slots" + "destination": "https://svelte.dev/docs/svelte/legacy-slots" }, { "source": "/tutorial/slot-fallbacks", - "destination": "https://svelte.dev/tutorial/svelte/slot-fallbacks" + "destination": "https://svelte.dev/docs/svelte/legacy-slots" }, { "source": "/tutorial/slot-props", - "destination": "https://svelte.dev/tutorial/svelte/slot-props" + "destination": "https://svelte.dev/docs/svelte/legacy-slots" }, { "source": "/tutorial/optional-slots", - "destination": "https://svelte.dev/tutorial/svelte/optional-slots" + "destination": "https://svelte.dev/docs/svelte/legacy-$slots" }, { "source": "/tutorial/context-api", @@ -307,11 +303,11 @@ }, { "source": "/tutorial/svelte-self", - "destination": "https://svelte.dev/tutorial/svelte/svelte-self" + "destination": "https://svelte.dev/docs/svelte/legacy-svelte-self" }, { "source": "/tutorial/svelte-component", - "destination": "https://svelte.dev/tutorial/svelte/svelte-component" + "destination": "https://svelte.dev/docs/svelte/legacy-svelte-component" }, { "source": "/tutorial/svelte-element", @@ -339,11 +335,11 @@ }, { "source": "/tutorial/svelte-options", - "destination": "https://svelte.dev/tutorial/svelte/svelte-options" + "destination": "https://svelte.dev/docs/svelte/svelte-options" }, { "source": "/tutorial/svelte-fragment", - "destination": "https://svelte.dev/tutorial/svelte/svelte-fragment" + "destination": "https://svelte.dev/docs/svelte/legacy-svelte-fragment" }, { "source": "/tutorial/sharing-code", @@ -355,7 +351,7 @@ }, { "source": "/tutorial/debug", - "destination": "https://svelte.dev/tutorial/svelte/debug" + "destination": "https://svelte.dev/docs/svelte/@debug" }, { "source": "/tutorial/congratulations", @@ -457,10 +453,6 @@ "source": "/tutorial/redirects", "destination": "https://svelte.dev/tutorial/kit/redirects" }, - { - "source": "/tutorial/xx-custom-error-messages", - "destination": "https://svelte.dev/tutorial/kit/xx-custom-error-messages" - }, { "source": "/tutorial/handle", "destination": "https://svelte.dev/tutorial/kit/handle" diff --git a/apps/svelte.dev/.env b/apps/svelte.dev/.env index 9b1319a6f1..43b6ea5cb7 100644 --- a/apps/svelte.dev/.env +++ b/apps/svelte.dev/.env @@ -3,3 +3,6 @@ SUPABASE_KEY= GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= + +# disable prerendering with `PRERENDER=false pnpm build` — this is useful for speeding up builds when previewing locally +PRERENDER=true diff --git a/apps/svelte.dev/.gitignore b/apps/svelte.dev/.gitignore index 321615eddf..a3079a3c21 100644 --- a/apps/svelte.dev/.gitignore +++ b/apps/svelte.dev/.gitignore @@ -6,9 +6,13 @@ /src/routes/_home/Supporters/contributors.js /src/routes/_home/Supporters/donors.jpg /src/routes/_home/Supporters/donors.js +/scripts/svelte-template +/static/svelte-template.json # git-repositories of synced docs go here /repos/ # TODO remove this after https://github.com/sveltejs/kit/pull/12718 is merged /content/docs/kit/50-reference +.vercel +.env*.local diff --git a/apps/svelte.dev/README.md b/apps/svelte.dev/README.md index eab3acafcd..9658426470 100644 --- a/apps/svelte.dev/README.md +++ b/apps/svelte.dev/README.md @@ -35,3 +35,11 @@ When writing content for the tutorial, you need to be aware of the differences o ### Dependencies If you look in the site's package.json you'll notice several dependencies that don't appear to be used, such as `@testing-library/svelte`. These are present because they're referenced in the docs, and Twoslash needs to be able to find type definitions in order to typecheck snippets. Installing the dependencies was deemed preferable to faking it with `declare module`, since we're liable to end up with fictional types that way. + +### Prerendering + +Most of the site is prerendered. Since that involves some fairly expensive work, it can take a while. To build the site _without_ prerendering — for example, because you need to debug an issue that's affecting production builds — set the `PRERENDER` environment variable to `false`: + +```bash +PRERENDER=false pnpm build +``` diff --git a/apps/svelte.dev/content/blog/2016-11-26-frameworks-without-the-framework.md b/apps/svelte.dev/content/blog/2016-11-26-frameworks-without-the-framework.md index de7a227082..7756f3135a 100644 --- a/apps/svelte.dev/content/blog/2016-11-26-frameworks-without-the-framework.md +++ b/apps/svelte.dev/content/blog/2016-11-26-frameworks-without-the-framework.md @@ -2,7 +2,7 @@ title: "Frameworks without the framework: why didn't we think of this sooner?" description: You can't write serious applications in vanilla JavaScript without hitting a complexity wall. But a compiler can do it for you. author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- > Wait, this new framework has a _runtime_? Ugh. Thanks, I'll pass. @@ -12,7 +12,7 @@ We're shipping too much code to our users. Like a lot of front end developers, I But I was wrong. 100kb of .js isn't equivalent to 100kb of .jpg. It's not just the network time that'll kill your app's startup performance, but the time spent parsing and evaluating your script, during which time the browser becomes completely unresponsive. On mobile, those milliseconds rack up very quickly. -If you're not convinced that this is a problem, follow [Alex Russell](https://twitter.com/slightlylate) on Twitter. Alex [hasn't been making many friends in the framework community lately](https://twitter.com/slightlylate/status/728355959022587905), but he's not wrong. But the proposed alternative to using frameworks like Angular, React and Ember – [Polymer](https://www.polymer-project.org/1.0/) – hasn't yet gained traction in the front end world, and it's certainly not for a lack of marketing. +If you're not convinced that this is a problem, follow [Alex Russell](https://bsky.app/profile/infrequently.org) on BlueSky. Alex [hasn't been making many friends in the framework community lately](https://twitter.com/slightlylate/status/728355959022587905), but he's not wrong. But the proposed alternative to using frameworks like Angular, React and Ember – [Polymer](https://www.polymer-project.org/1.0/) – hasn't yet gained traction in the front end world, and it's certainly not for a lack of marketing. Perhaps we need to rethink the whole thing. @@ -30,9 +30,9 @@ Svelte is a new framework that does exactly that. You write your components usin The [Svelte implementation of TodoMVC](https://svelte-todomvc.surge.sh/) weighs 3.6kb zipped. For comparison, React plus ReactDOM _without any app code_ weighs about 45kb zipped. It takes about 10x as long for the browser just to evaluate React as it does for Svelte to be up and running with an interactive TodoMVC. -And once your app _is_ up and running, according to [js-framework-benchmark](https://github.com/krausest/js-framework-benchmark) **Svelte is fast as heck**. It's faster than React. It's faster than Vue. It's faster than Angular, or Ember, or Ractive, or Preact, or Riot, or Mithril. It's competitive with Inferno, which is probably the fastest UI framework in the world, for now, because [Dominic Gannaway](https://twitter.com/trueadm) is a wizard. (Svelte is slower at removing elements. We're [working on it](https://github.com/sveltejs/svelte/issues/26).) +And once your app _is_ up and running, according to [js-framework-benchmark](https://github.com/krausest/js-framework-benchmark) **Svelte is fast as heck**. It's faster than React. It's faster than Vue. It's faster than Angular, or Ember, or Ractive, or Preact, or Riot, or Mithril. It's competitive with Inferno, which is probably the fastest UI framework in the world, for now, because [Dominic Gannaway](https://bsky.app/profile/trueadm.dev) is a wizard. (Svelte is slower at removing elements. We're [working on it](https://github.com/sveltejs/svelte/issues/26).) -It's basically as fast as vanilla JS, which makes sense because it _is_ vanilla JS – just vanilla JS that you didn't have to write. +It's basically as fast as vanilla JS, which makes sense because it _is_ vanilla JS – just vanilla JS that you didn't have to write. ## But that's not the important thing diff --git a/apps/svelte.dev/content/blog/2017-09-06-the-zen-of-just-writing-css.md b/apps/svelte.dev/content/blog/2017-09-06-the-zen-of-just-writing-css.md index f06a4aaac0..678e178ee8 100644 --- a/apps/svelte.dev/content/blog/2017-09-06-the-zen-of-just-writing-css.md +++ b/apps/svelte.dev/content/blog/2017-09-06-the-zen-of-just-writing-css.md @@ -2,7 +2,7 @@ title: The zen of Just Writing CSS description: I would say this is the future, but we're already doing it. author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- It's fashionable to dislike CSS. There are lots of reasons why that's the case, but it boils down to this: CSS is _unpredictable_. If you've never had the experience of tweaking a style rule and accidentally breaking some layout that you thought was completely unrelated — usually when you're trying to ship — then you're either new at this or you're a much better programmer than the rest of us. @@ -19,7 +19,7 @@ Everything in CSS is global. Because of that, styles intended for one bit of mar It gets worse when you're working on a team. No-one dares touch styles authored by someone else, because it's often unclear what they're doing, what markup they apply to, and what disasters will unfold if you remove them. -The consequence of all this is the **append-only stylesheet**. There's no way of knowing which code can safely be removed, so it's common to undo some existing style with another, more specific style — even on relatively small projects. +The consequence of all this is the **append-only stylesheet**. There's no way of knowing which code can safely be removed, so it's common to undo some existing style with another, more specific style — even on relatively small projects. ## Single File Components change all that diff --git a/apps/svelte.dev/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md b/apps/svelte.dev/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md index 86514fc279..228c149ddd 100644 --- a/apps/svelte.dev/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md +++ b/apps/svelte.dev/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md @@ -2,7 +2,7 @@ title: 'Sapper: Towards the ideal web app framework' description: Taking the next-plus-one step author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- > Quickstart for the impatient: [the Sapper docs](https://sapper.svelte.dev), and the [starter template](https://github.com/sveltejs/sapper-template) @@ -77,4 +77,4 @@ I believe the next frontier of web performance is 'whole-app optimisation'. Curr Speaking of Glimmer, the idea of compiling components to bytecode is one that we'll probably steal in 2018. A framework like Sapper could conceivably determine which compilation mode to use based on the characteristics of your app. It could even serve JavaScript for the initial route for the fastest possible startup time, then lazily serve a bytecode interpreter for subsequent routes, resulting in the optimal combination of startup size and total app size. -Mostly, though, we want the direction of Sapper to be determined by its users. If you're the kind of developer who enjoys life on the bleeding edge and would like to help shape the future of how we build web apps, please join us on [GitHub](https://github.com/sveltejs/svelte) and [Discord](https://svelte.dev/chat). +Mostly, though, we want the direction of Sapper to be determined by its users. If you're the kind of developer who enjoys life on the bleeding edge and would like to help shape the future of how we build web apps, please join us on [GitHub](https://github.com/sveltejs/svelte) and [Discord](/chat). diff --git a/apps/svelte.dev/content/blog/2018-04-18-version-2.md b/apps/svelte.dev/content/blog/2018-04-18-version-2.md index 58f420fcd6..ef1c1aa9d9 100644 --- a/apps/svelte.dev/content/blog/2018-04-18-version-2.md +++ b/apps/svelte.dev/content/blog/2018-04-18-version-2.md @@ -2,7 +2,7 @@ title: Svelte v2 is out! description: Here's what you need to know author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- @@ -11,7 +11,7 @@ Almost a year after we first started talking about version 2 on the Svelte issue ## tl;dr -Each of these items is described in more depth below. If you get stuck, ask for help in our friendly [Discord chatroom](https://svelte.dev/chat). +Each of these items is described in more depth below. If you get stuck, ask for help in our friendly [Discord chatroom](/chat). - Install Svelte v2 from npm - Upgrade your templates with [svelte-upgrade](https://github.com/sveltejs/svelte-upgrade) @@ -198,4 +198,4 @@ Before, there was a `svelte.validate` method which checked your component was va ## My app is broken! Help! -Hopefully this covers everything, and the update should be easier for you than it was for us. But if you find bugs, or discover things that aren't mentioned here, swing by [Discord chatroom](https://svelte.dev/chat) or raise an issue on the [tracker](https://github.com/sveltejs/svelte/issues). +Hopefully this covers everything, and the update should be easier for you than it was for us. But if you find bugs, or discover things that aren't mentioned here, swing by [Discord chatroom](/chat) or raise an issue on the [tracker](https://github.com/sveltejs/svelte/issues). diff --git a/apps/svelte.dev/content/blog/2018-12-26-svelte-css-in-js.md b/apps/svelte.dev/content/blog/2018-12-26-svelte-css-in-js.md index 0eb2d0a19e..394d3cc339 100644 --- a/apps/svelte.dev/content/blog/2018-12-26-svelte-css-in-js.md +++ b/apps/svelte.dev/content/blog/2018-12-26-svelte-css-in-js.md @@ -2,7 +2,7 @@ title: Using CSS-in-JS with Svelte description: You don't need to, but you can author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- CSS is a core part of any web app. By extension, a UI framework that doesn't have a built-in way to add styles to your components is unfinished. diff --git a/apps/svelte.dev/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md b/apps/svelte.dev/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md index 066e758e81..9aece76947 100644 --- a/apps/svelte.dev/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md +++ b/apps/svelte.dev/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md @@ -2,7 +2,7 @@ title: Virtual DOM is pure overhead description: Let's retire the 'virtual DOM is fast' myth once and for all author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- If you've used JavaScript frameworks in the last few years, you've probably heard the phrase 'the virtual DOM is fast', often said to mean that it's faster than the _real_ DOM. It's a surprisingly resilient meme — for example people have asked how Svelte can be fast when it doesn't use a virtual DOM. diff --git a/apps/svelte.dev/content/blog/2019-01-31-svelte-on-the-changelog.md b/apps/svelte.dev/content/blog/2019-01-31-svelte-on-the-changelog.md index ca5805ac6d..084bea6d01 100644 --- a/apps/svelte.dev/content/blog/2019-01-31-svelte-on-the-changelog.md +++ b/apps/svelte.dev/content/blog/2019-01-31-svelte-on-the-changelog.md @@ -2,7 +2,7 @@ title: Svelte on The Changelog description: Listen to the interview here author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- Earlier this month, I had the privilege of appearing on [The Changelog](https://changelog.com/podcast), a podcast about software development. We had a fun (for me) and wide-ranging conversation: @@ -14,8 +14,8 @@ Earlier this month, I had the privilege of appearing on [The Changelog](https:// ...and, most importantly, Svelte 3. -Unless you hang out in our [Discord server](https://svelte.dev/chat) or follow [@sveltejs](https://twitter.com/sveltejs) on Twitter, you might not know that Svelte 3 is just around the corner, and it's going to be a huge release. We've rethought the developer experience from the ground up, and while it _will_ be a nuisance if you need to upgrade a Svelte 2 app (more on that soon) we think you're going to love it. +Unless you hang out in our [Discord server](/chat) or follow [@sveltejs](https://bsky.app/profile/svelte.dev) on BlueSky, you might not know that Svelte 3 is just around the corner, and it's going to be a huge release. We've rethought the developer experience from the ground up, and while it _will_ be a nuisance if you need to upgrade a Svelte 2 app (more on that soon) we think you're going to love it. -On the podcast [Adam](https://twitter.com/adamstac), [Jerod](https://twitter.com/jerodsanto) and I talk about some of the changes and why we're making them. You can listen here or on the [podcast page](https://changelog.com/podcast/332). +On the podcast [Adam](https://bsky.app/profile/adamstac.bsky.social), [Jerod](https://bsky.app/profile/jerod.bsky.social) and I talk about some of the changes and why we're making them. You can listen here or on the [podcast page](https://changelog.com/podcast/332).

The Changelog 332: A UI framework without the framework – Listen on Changelog.com

diff --git a/apps/svelte.dev/content/blog/2019-04-15-setting-up-your-editor.md b/apps/svelte.dev/content/blog/2019-04-15-setting-up-your-editor.md index 6456397a41..1eceb756e9 100644 --- a/apps/svelte.dev/content/blog/2019-04-15-setting-up-your-editor.md +++ b/apps/svelte.dev/content/blog/2019-04-15-setting-up-your-editor.md @@ -2,7 +2,7 @@ title: Setting up your editor description: Instructions for configuring linting and syntax highlighting author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev draft: true --- diff --git a/apps/svelte.dev/content/blog/2019-04-16-svelte-for-new-developers.md b/apps/svelte.dev/content/blog/2019-04-16-svelte-for-new-developers.md index c0ad2add2b..7682c06646 100644 --- a/apps/svelte.dev/content/blog/2019-04-16-svelte-for-new-developers.md +++ b/apps/svelte.dev/content/blog/2019-04-16-svelte-for-new-developers.md @@ -2,14 +2,14 @@ title: Svelte for new developers description: Never used Node.js or the command line? No problem author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- This short guide is designed to help you — someone who has looked at the [tutorial](/tutorial) and wants to start creating Svelte apps, but doesn't have a ton of experience using JavaScript build tooling — get up and running. If there are things that don't make sense, or that we're glossing over, feel free to [raise an issue](https://github.com/sveltejs/svelte/issues) or [suggest edits to this page](https://github.com/sveltejs/svelte/blob/master/site/content/blog/2019-04-16-svelte-for-new-developers.md) that will help us help more people. -If you get stuck at any point following this guide, the best place to ask for help is in the [chatroom](https://svelte.dev/chat). +If you get stuck at any point following this guide, the best place to ask for help is in the [chatroom](/chat). ## First things first diff --git a/apps/svelte.dev/content/blog/2019-04-20-write-less-code.md b/apps/svelte.dev/content/blog/2019-04-20-write-less-code.md index 27a8e88c8c..edb8796d45 100644 --- a/apps/svelte.dev/content/blog/2019-04-20-write-less-code.md +++ b/apps/svelte.dev/content/blog/2019-04-20-write-less-code.md @@ -2,7 +2,7 @@ title: Write less code description: The most important metric you're not paying attention to author: Rich Harris -authorURL: https://twitter.com/Rich_Harris +authorURL: https://bsky.app/profile/rich-harris.dev --- All code is buggy. It stands to reason, therefore, that the more code you have to write the buggier your apps will be. @@ -110,7 +110,7 @@ It's unusual for the difference to be _quite_ so obvious — in my experience, a ### Top-level elements -In Svelte, a component can have as many top-level elements as you like. In React and Vue, a component must have a single top-level element — in React's case, trying to return two top-level elements from a component function would result in syntactically invalid code. (You can use a fragment — `<>` — instead of a `
`, but it's the same basic idea, and still results in an extra level of indentation). +In Svelte, a component can have as many top-level elements as you like. In React and Vue, a component must have a single top-level element — in React's case, trying to return two top-level elements from a component function would result in syntactically invalid code. (You can use a fragment — `<>` — instead of a `
`, but it's the same basic idea, and still results in an extra level of indentation). In Vue, your markup must be wrapped in a `