diff --git a/_data/builds/swiftly_release.yml b/_data/builds/swiftly_release.yml
index 10df08a34..a1d084d11 100644
--- a/_data/builds/swiftly_release.yml
+++ b/_data/builds/swiftly_release.yml
@@ -1,8 +1,8 @@
-version: "0.4.0"
+version: "1.0.0"
platforms:
- platform: Linux
- x86_64: "https://download.swift.org/swiftly/linux/swiftly-0.4.0-x86_64.tar.gz"
- arm64: "https://download.swift.org/swiftly/linux/swiftly-0.4.0-aarch64.tar.gz"
+ x86_64: "https://download.swift.org/swiftly/linux/swiftly-1.0.0-x86_64.tar.gz"
+ arm64: "https://download.swift.org/swiftly/linux/swiftly-1.0.0-aarch64.tar.gz"
- platform: Darwin
- x86_64: "https://download.swift.org/swiftly/darwin/swiftly-0.4.0.pkg"
- arm64: "https://download.swift.org/swiftly/darwin/swiftly-0.4.0.pkg"
+ x86_64: "https://download.swift.org/swiftly/darwin/swiftly-1.0.0.pkg"
+ arm64: "https://download.swift.org/swiftly/darwin/swiftly-1.0.0.pkg"
\ No newline at end of file
diff --git a/_includes/install/_linux_platforms_tabs.md b/_includes/install/_linux_platforms_tabs.md
index 81b17f179..fd8972220 100644
--- a/_includes/install/_linux_platforms_tabs.md
+++ b/_includes/install/_linux_platforms_tabs.md
@@ -1,3 +1,34 @@
+## Latest Release
+
diff --git a/_includes/install/_os_tabs.md b/_includes/install/_os_tabs.md
index 103c8486d..0ed775013 100644
--- a/_includes/install/_os_tabs.md
+++ b/_includes/install/_os_tabs.md
@@ -3,7 +3,7 @@ Follow the instructions below to install the latest version of Swift on a [suppo
diff --git a/assets/javascripts/application.js b/assets/javascripts/application.js
index 5a3841eca..f807674bf 100644
--- a/assets/javascripts/application.js
+++ b/assets/javascripts/application.js
@@ -87,5 +87,24 @@ layout: source
}
})
}
+
+ if (navigator && navigator.clipboard) {
+ const copyCodeButtons = document.querySelectorAll('[class^="language-"] button');
+
+ copyCodeButtons.forEach(function(button) {
+ const codeElement = button.parentElement.querySelector('code');
+ const originalText = button.innerText;
+
+ button.addEventListener('mousedown', async function() {
+ await navigator.clipboard.writeText(codeElement.innerText);
+
+ button.innerText = 'Copied!';
+
+ setTimeout(() => {
+ button.innerText = originalText;
+ }, 1000);
+ });
+ });
+ }
});
})();
diff --git a/assets/stylesheets/elements/_grid.scss b/assets/stylesheets/elements/_grid.scss
index fb2d1fd59..45506c9ee 100644
--- a/assets/stylesheets/elements/_grid.scss
+++ b/assets/stylesheets/elements/_grid.scss
@@ -9,7 +9,7 @@
background-color: var(--color-fill-secondary);
border: 1px solid var(--color-fill-tertiary);
border-radius: var(--border-radius);
-
+
padding: 1rem;
display: flex;
flex-direction: column;
@@ -77,7 +77,7 @@
}
// Button typically embedded in a grid-level-1
-a.cta-secondary {
+a.cta-secondary, [class^="language-"] button {
background-color: var(--color-fill-tertiary);
border: 1px solid var(--color-fill-quaternary);
border-radius: var(--border-radius);
@@ -99,7 +99,7 @@ a.cta-secondary {
&:hover {
color: var(--color-link);
background-color: var(--color-fill-quaternary);
-
+
text-decoration: none;
@media (prefers-contrast: more) {
@@ -112,3 +112,22 @@ a.cta-secondary {
content: " ↗";
}
}
+
+div.highlight {
+ position: relative;
+
+ &:hover button {
+ display: block;
+ }
+}
+
+[class^="language-"] button {
+ cursor: pointer;
+ padding: 0.1rem 0.4rem;
+ font-size: 0.8rem;
+ position: absolute;
+ right: 0.4rem;
+ top: 0.4rem;
+ margin: 0;
+ display: none;
+}
diff --git a/install/linux/index.md b/install/linux/index.md
index f741e8b5f..9687fd51a 100644
--- a/install/linux/index.md
+++ b/install/linux/index.md
@@ -4,5 +4,4 @@ title: Install Swift
---
{% include install/_os_tabs.md linux="true" %}
-
{% include install/_linux_platforms_tabs.md %}
diff --git a/install/linux/swiftly/index.md b/install/linux/swiftly/index.md
new file mode 100644
index 000000000..e45dbf3ae
--- /dev/null
+++ b/install/linux/swiftly/index.md
@@ -0,0 +1,69 @@
+---
+layout: page
+title: Getting Started with Swiftly on Linux
+---
+
+Download swiftly for [Linux (Intel)](https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-x86_64.tar.gz), or [Linux (ARM)](https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-aarch64.tar.gz).
+
+```
+curl -O https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz
+```
+
+You can verify the integrity of the archive using the PGP signature. This will download the signature, install the swift.org signatures into your keychain, and verify the signature.
+
+```
+curl https://www.swift.org/keys/all-keys.asc | gpg --import -
+curl -O https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz.sig
+gpg --verify swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz.sig swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz
+```
+
+Extract the archive.
+
+```
+tar -zxf swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz
+```
+
+Run the following command in your terminal, to configure swiftly for your account, and automatically download the latest swift toolchain.
+
+```
+./swiftly init
+```
+
+Note: You can set the SWIFTLY_HOME_DIR and SWIFTLY_BIN_DIR environment variables to customize your install location.
+
+Your current shell may need some additional steps to update your session. Follow the guidance at the end of the installation for a smooth install experience, such as sourcing the environment file, and rehashing your shell's PATH.
+
+There can be certain packages that need to be installed on your system so that the Swift toolchain can function. The swiftly initialization routine will show you how to install any missing packages.
+
+Now that swiftly and swift are installed, you can access the `swift` command from the latest Swift release:
+
+```
+swift --version
+--
+Swift version {{ site.data.builds.swift_releases.last.name }} (swift-{{ site.data.builds.swift_releases.last.name }}-RELEASE)
+Target: x86_64-unknown-linux-gnu
+```
+
+Or, you can install (and use) another swift release:
+
+```
+swiftly install --use 5.10
+swift --version
+--
+Swift version 5.10 (swift-5.10-RELEASE)
+Target: x86_64-unknown-linux-gnu
+```
+
+There's also an option to install the latest snapshot release and get access to the latest features:
+
+```
+swiftly install --use main-snapshot
+```
+
+Check for updates to swiftly and install them by running the self-update command:
+
+```
+swiftly self-update
+```
+
+You can discover more about swiftly in the [documentation](https://www.swift.org/swiftly/documentation/swiftlydocs/)
diff --git a/install/macos/index.md b/install/macos/index.md
index 8370da5f2..393ff542d 100644
--- a/install/macos/index.md
+++ b/install/macos/index.md
@@ -5,27 +5,45 @@ title: Install Swift
{% include install/_os_tabs.md macos="true" %}
-## Latest Release (Swift {{ site.data.builds.swift_releases.last.name }})
-
-
+## Latest Release
+
+
-
Xcode
- For targeting Darwin platforms, download the latest version of Xcode, which is regularly refreshed with the latest Swift toolchain.
+ To develop with Swift for Apple platforms, download the latest version of Xcode, which is regularly refreshed with the latest Swift toolchain.
Install Xcode
+
+
+
+## Other Install Options
+
-
-
{% include install/_static_sdk_release.md %}
@@ -40,6 +58,8 @@ title: Install Swift
Swift snapshots are prebuilt binaries that are automatically created from the branch. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.
+The easiest way to install development snapshots is with the Swiftly tool. Read more on the [instructions page](/install/macos/swiftly).
+
{% assign xcode_dev_builds = site.data.builds.development.xcode | sort: 'date' | reverse %}
{% assign xcode_6_1_builds = site.data.builds.swift-6_1-branch.xcode | sort: 'date' | reverse %}
diff --git a/install/macos/swiftly/index.md b/install/macos/swiftly/index.md
new file mode 100644
index 000000000..84ba83e25
--- /dev/null
+++ b/install/macos/swiftly/index.md
@@ -0,0 +1,57 @@
+---
+layout: page
+title: Getting Started with Swiftly on macOS
+---
+
+Download the [swiftly package for macOS](https://download.swift.org/swiftly/darwin/swiftly-{{ site.data.builds.swiftly_release.version }}.pkg).
+
+Install the package in your user account:
+
+```
+installer -pkg swiftly-{{ site.data.builds.swiftly_release.version }}.pkg -target CurrentUserHomeDirectory
+```
+
+Run the following command in your terminal, to configure swiftly for your account, and automatically download the latest swift toolchain.
+
+```
+~/.swiftly/bin/swiftly init
+```
+
+Note: You can set the SWIFTLY_HOME_DIR and SWIFTLY_BIN_DIR environment variables to customize the install location.
+
+
+Your current shell may need some additional steps to update your session. Follow the guidance at the end of the installation for a smooth install experience, such as sourcing the environment file, and rehashing your shell's PATH.
+
+
+Now that swiftly and swift are installed, you can access the `swift` command from the latest Swift release:
+
+```
+swift --version
+--
+Apple Swift version {{ site.data.builds.swift_releases.last.name }} (swift-{{ site.data.builds.swift_releases.last.name }}-RELEASE)
+Target: arm64-apple-macosx15.0
+```
+
+Or, you can install (and use) another swift release:
+
+```
+swiftly install --use 5.10
+swift --version
+--
+Apple Swift version 5.10 (swift-5.10-RELEASE)
+Target: arm64-apple-macosx15.0
+```
+
+There's also an option to install the latest snapshot release and get access to the latest features:
+
+```
+swiftly install --use main-snapshot
+```
+
+Check for updates to swiftly and install them by running the self-update command:
+
+```
+swiftly self-update
+```
+
+You can discover more about swiftly in the [documentation](https://www.swift.org/swiftly/documentation/swiftlydocs/)