Skip to content

Commit 131e2c2

Browse files
committed
Fix incorrect relative links to external modules
1 parent 06f8070 commit 131e2c2

12 files changed

Lines changed: 29 additions & 27 deletions

File tree

scripts/sync-modules.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ const replacements = [
1111
{ search: 'https://github.com/skiptools', replace: 'https://source.skip.dev' },
1212
{ search: '](https://skip.dev/', replace: '](/' },
1313
{ search: '](https://skip.tools/', replace: '](/' },
14-
{ search: '](https://source.skip.dev/skip-', replace: '](/docs/modules/skip-' },
15-
{ search: '](https://source.skip.dev/skipapp-', replace: '](/docs/samples/skipapp-' },
1614
{ search: 'href="https://skip.dev/docs/', replace: 'href="/docs/' },
1715
{ search: '[Skip](https://skip.dev)', replace: 'Skip' }, // strip out bare links to the skip.dev root page
1816
{ search: '[Skip Lite](https://skip.dev)', replace: 'Skip Lite' },
@@ -54,6 +52,10 @@ async function processRepositories() {
5452
content = content.replaceAll('src="Android/fastlane', `src="${rawBaseUrl}/Android/fastlane`);
5553
content = content.replaceAll('src="Darwin/fastlane', `src="${rawBaseUrl}/Darwin/fastlane`);
5654

55+
// replace external links to module and sample roots with the local doc
56+
content = content.replace(/\]\(https:\/\/source\.skip\.dev\/(skip-[^\/]+)[\/]?\)/g, "](/docs/modules/$1)");
57+
content = content.replace(/\]\(https:\/\/source\.skip\.dev\/(skipapp-[^\/]+)[\/]?\)/g, "](/docs/samples/$1)");
58+
5759
// trim everything after the repo license
5860
content = content.replace(/## License[\s\S]*/i, '');
5961

src/content/docs/docs/modules/skip-firebase/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ with the various `SkipFirebase*` modules passing the transpiled calls
1616
through to the Firebase Android SDK.
1717

1818
For an example of using Firebase in a [Skip Fuse](/docs/status/#skip_fuse) app, see the
19-
[FiresideFuse Sample](/docs/samples/skipapp-fireside-fuse/). For a [Skip Lite](/docs/status/#skip_fuse) app, see the [Fireside Sample](/docs/samples/skipapp-fireside/).
19+
[FiresideFuse Sample](/docs/samples/skipapp-fireside-fuse). For a [Skip Lite](/docs/status/#skip_fuse) app, see the [Fireside Sample](/docs/samples/skipapp-fireside).
2020

2121
## Package
2222

@@ -25,7 +25,7 @@ modules in the Firebase iOS SDK (at [https://github.com/firebase/firebase-ios-sd
2525
which is also mirrored in the division of the Firebase Kotlin Android gradle modules (at [https://github.com/firebase/firebase-android-sdk.git](https://github.com/firebase/firebase-android-sdk.git)).
2626

2727
See the `Package.swift` files in the
28-
[FiresideFuse](/docs/samples/skipapp-fireside-fuse/) and [Fireside](/docs/samples/skipapp-fireside/) apps for examples of integrating Firebase dependencies.
28+
[FiresideFuse](/docs/samples/skipapp-fireside-fuse) and [Fireside](/docs/samples/skipapp-fireside) apps for examples of integrating Firebase dependencies.
2929

3030
<!--
3131
An example of a Skip Lite app projects using the `Firestore` API at the model layer and the `Messaging` API at the app layer can be seen from the command:
@@ -106,7 +106,7 @@ plugins {
106106
}
107107
```
108108

109-
For concrete examples, see the [FireSideFuse Sample](/docs/samples/skipapp-fireside-fuse/) project.
109+
For concrete examples, see the [FireSideFuse Sample](/docs/samples/skipapp-fireside-fuse) project.
110110
{: class="callout info"}
111111

112112
Once Firebase has been added to your project, you need to configure the `FirebaseApp` on app startup. This is typically done in the `onInit()` callback of the `*AppDelegate` in your `*App.swift` file. Here is a snippet from the FireSideFuse sample app:
@@ -333,7 +333,7 @@ open class MainActivity: AppCompatActivity {
333333

334334
1. See Firebase's [iOS instructions](https://firebase.google.com/docs/cloud-messaging/ios/client) and [Android instructions](https://firebase.google.com/docs/cloud-messaging/android/client) for additional details and options, including how to send test messages to your apps!
335335

336-
The [FiresideFuse](/docs/samples/skipapp-fireside-fuse/) and [Fireside](/docs/samples/skipapp-fireside/) projects are great references for seeing complete, working Skip Fuse and Skip Lite apps using Firebase push notifications.
336+
The [FiresideFuse](/docs/samples/skipapp-fireside-fuse) and [Fireside](/docs/samples/skipapp-fireside) projects are great references for seeing complete, working Skip Fuse and Skip Lite apps using Firebase push notifications.
337337
{: class="callout info"}
338338

339339
## Error handling

src/content/docs/docs/modules/skip-foundation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ To help fill in unimplemented API in SkipFoundation:
4747
1. Find unimplemented API.
4848
1. Write an appropriate Kotlin implementation. See [Implementation Strategy](#implementation-strategy) below.
4949
1. Edit the corresponding tests to make sure they are no longer skipped, and that they pass. If there aren't existing tests, write some. See [Tests](#tests).
50-
1. [Submit a PR.](/docs/modules/skip-foundation/pulls)
50+
1. [Submit a PR.](https://source.skip.dev/skip-foundation/pulls)
5151

5252
Other forms of contributions such as test cases, comments, and documentation are also welcome!
5353

src/content/docs/docs/modules/skip-lib/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The module is transparently adopted through the automatic addition of `import sk
3030

3131
## Status
3232

33-
- SkipLib's Swift symbol files (see [Implementation Strategy](#implementation-strategy)) are nominally complete. They should declare all Swift standard library API. This is difficult to validate, however, so if you find anything missing, please [report it](/docs/modules/skip-lib/issues) to us.
33+
- SkipLib's Swift symbol files (see [Implementation Strategy](#implementation-strategy)) are nominally complete. They should declare all Swift standard library API. This is difficult to validate, however, so if you find anything missing, please [report it](https://source.skip.dev/skip-lib/issues) to us.
3434
- Unimplemented API is appropriately marked with `@available(*, unavailable)` annotations. Skip will generate an error when you attempt to use an unimplemented API.
3535
- In particular, a significant portion of the [collections](#collections) API is not yet implemented.
3636
- Unit testing is not comprehensive.
@@ -46,7 +46,7 @@ The most pressing need is to reduce the amount of unimplemented API. To help fil
4646
1. Find unimplemented API. Unimplemented API should be marked with `@available(*, unavailable)` in the Swift symbol files.
4747
1. Write an appropriate Kotlin implementation. See [Implementation Strategy](#implementation-strategy) below. For [collections](#collections) API, make sure your implementation is duplicated for `String` as well.
4848
1. Write unit tests.
49-
1. [Submit a PR.](/docs/modules/skip-lib/pulls)
49+
1. [Submit a PR.](https://source.skip.dev/skip-lib/pulls)
5050

5151
Other forms of contributions such as test cases, comments, and documentation are also welcome!
5252

src/content/docs/docs/modules/skip-model/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Much of Skip's model support is implemented directly in the Skip transpiler. The
5656

5757
## Contributing
5858

59-
We welcome contributions to SkipModel. The Skip product [documentation](/docs/contributing/) includes helpful instructions and tips on local Skip library development. When submitting code, please include unit tests in your [PR](/docs/modules/skip-model/pulls).
59+
We welcome contributions to SkipModel. The Skip product [documentation](/docs/contributing/) includes helpful instructions and tips on local Skip library development. When submitting code, please include unit tests in your [PR](https://source.skip.dev/skip-model/pulls).
6060

6161
## Model Objects
6262

src/content/docs/docs/modules/skip-motion/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ SkipMotion is in a very early stage, and lack any playback
7676
controls or other customization of the animations.
7777

7878
You are encouraged to contribute to the project or
79-
file an [issue](/docs/modules/skip-motion/issues)
79+
file an [issue](https://source.skip.dev/skip-motion/issues)
8080
with needs and requests.
8181

8282
## Size
@@ -86,7 +86,7 @@ size of the release `.ipa` and `.apk` artifacts for your project.
8686

8787
## Example
8888

89-
See the [LottieDemo](/docs/samples/skipapp-lottiedemo/releases)
89+
See the [LottieDemo](https://source.skip.dev/skipapp-lottiedemo/releases)
9090
project for an example of using `SkipMotion` in a Skip App project.
9191

9292
## Building

src/content/docs/docs/modules/skip-script/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ as a dependency and a Swift source file imports the `JavaScriptCore` framework.
4545

4646
In this case, a subset of the the Objective-C JavaScriptAPI is mimicked on the
4747
Kotlin side, passing the calls through to the underlying C interface to the
48-
JavaScriptCore API using JNA and [SkipFFI](/docs/modules/skip-ffi/).
48+
JavaScriptCore API using JNA and [SkipFFI](/docs/modules/skip-ffi).
4949

5050

5151
An example of evaluating some JavaScript:

src/content/docs/docs/modules/skip-supabase/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The current Supabase API coverage is currently very limited, and mostly used as
4444
:::
4545

4646
Browse the test cases at
47-
[SkipSupabaseTests.swift](/docs/modules/skip-supabase/blob/main/Tests/SkipSupabaseTests/SkipSupabaseTests.swift)
47+
[SkipSupabaseTests.swift](https://source.skip.dev/skip-supabase/blob/main/Tests/SkipSupabaseTests/SkipSupabaseTests.swift)
4848
to see what API is supported.
4949

5050
:::note
@@ -60,13 +60,13 @@ which is generally mirrored in the division of the Supabase Kotlin Android gradl
6060
## Status
6161

6262
This project is in a very early stage, but some amount of Auth and Database API is implemented.
63-
For examples of what is working, see the [SkipSupabaseTests.swift](/docs/modules/skip-supabase/blob/main/Tests/SkipSupabaseTests/SkipSupabaseTests.swift)
63+
For examples of what is working, see the [SkipSupabaseTests.swift](https://source.skip.dev/skip-supabase/blob/main/Tests/SkipSupabaseTests/SkipSupabaseTests.swift)
6464
test case, which also shows how setup can be performed.
6565

66-
Please file an [issue](/docs/modules/skip-supabase/issues)
66+
Please file an [issue](https://source.skip.dev/skip-supabase/issues)
6767
if there is a particular API that you need for you project, or if something isn't working right.
6868
And please consider contributing to this project by filing
69-
[pull requests](/docs/modules/skip-supabase/pulls).
69+
[pull requests](https://source.skip.dev/skip-supabase/pulls).
7070

7171
### Implementation Details
7272

@@ -80,6 +80,6 @@ were designed and implemented separately, and so their API shapes differ drastic
8080

8181
For an example of some of the gymnastics that are required to achieve the goal is a single unified API,
8282
see the implementation of
83-
[SkipSupabase.swift](/docs/modules/skip-supabase/blob/main/Sources/SkipSupabase/SkipSupabase.swift).
83+
[SkipSupabase.swift](https://source.skip.dev/skip-supabase/blob/main/Sources/SkipSupabase/SkipSupabase.swift).
8484

8585

src/content/docs/docs/modules/skip-ui/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2563,7 +2563,7 @@ For Android, Skip only uses named colors that you've set for "Universal" devices
25632563

25642564
### ColorScheme
25652565

2566-
SkipUI fully supports the `.preferredColorScheme` modifier. If you created your app with the `skip` tool prior to v0.8.26, however, you will have to update the included `Android/app/src/main/kotlin/.../Main.kt` file in order for the modifier to work correctly. Using the latest [`Main.kt`](/docs/samples/skipapp-hello/blob/main/Android/app/src/main/kotlin/hello/skip/Main.kt) as your template, please do the following:
2566+
SkipUI fully supports the `.preferredColorScheme` modifier. If you created your app with the `skip` tool prior to v0.8.26, however, you will have to update the included `Android/app/src/main/kotlin/.../Main.kt` file in order for the modifier to work correctly. Using the latest [`Main.kt`](https://source.skip.dev/skipapp-hello/blob/main/Android/app/src/main/kotlin/hello/skip/Main.kt) as your template, please do the following:
25672567

25682568
1. Replace the all of the import statements with ones from latest `Main.kt`
25692569
1. Replace the contents of the `setContent { ... }` block with the content from the latest `Main.kt`
@@ -3020,7 +3020,7 @@ Remember that you can use `#if SKIP` blocks to confine your `.ignoresSafeArea` c
30203020

30213021
#### Enabling or Disabling Edge-to-Edge
30223022

3023-
Modern SkipUI versions enable Jetpack Compose's "edgeToEdge" mode by default. If you created your app with the `skip` tool prior to v0.8.32, however, you will have to update the included `Android/app/src/main/kotlin/.../Main.kt` file to render content behind system bars. Using the latest [`Main.kt`](/docs/samples/skipapp-hello/blob/main/Android/app/src/main/kotlin/hello/skip/Main.kt) as your template, please do the following:
3023+
Modern SkipUI versions enable Jetpack Compose's "edgeToEdge" mode by default. If you created your app with the `skip` tool prior to v0.8.32, however, you will have to update the included `Android/app/src/main/kotlin/.../Main.kt` file to render content behind system bars. Using the latest [`Main.kt`](https://source.skip.dev/skipapp-hello/blob/main/Android/app/src/main/kotlin/hello/skip/Main.kt) as your template, please do the following:
30243024

30253025
1. Add the following import: `import androidx.activity.enableEdgeToEdge`
30263026
1. Add the following line to the `MainActivity.onCreate(savedInstanceState:)` function:
@@ -3091,7 +3091,7 @@ To help fill in unimplemented API in SkipUI:
30913091
1. Write an appropriate Compose implementation. See [Implementation Strategy](#implementation-strategy) below.
30923092
1. Add a compiled Swift wrapper to SkipFuseUI.
30933093
1. Write Showcase code to exercise your component. See [Tests](#tests).
3094-
1. [Submit a PR](/docs/modules/skip-ui/pulls).
3094+
1. [Submit a PR](https://source.skip.dev/skip-ui/pulls).
30953095

30963096
Other forms of contributions such as test cases, comments, and documentation are also welcome!
30973097

src/content/docs/docs/modules/skip-web/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ struct EmbeddedWebView : View {
3232

3333
## Customization
3434

35-
The [`WebView`](/docs/modules/skip-web/blob/main/Sources/SkipWeb/WebView.swift) is backed by a
36-
[`WebEngine`](/docs/modules/skip-web/blob/main/Sources/SkipWeb/WebEngine.swift).
37-
It can be configured with a [`WebEngineConfiguration`](/docs/modules/skip-web/blob/main/Sources/SkipWeb/WebEngine.swift) instance. For example:
35+
The [`WebView`](https://source.skip.dev/skip-web/blob/main/Sources/SkipWeb/WebView.swift) is backed by a
36+
[`WebEngine`](https://source.skip.dev/skip-web/blob/main/Sources/SkipWeb/WebEngine.swift).
37+
It can be configured with a [`WebEngineConfiguration`](https://source.skip.dev/skip-web/blob/main/Sources/SkipWeb/WebEngine.swift) instance. For example:
3838

3939
```swift
4040
import Foundation
@@ -189,7 +189,7 @@ Many delegates that are provided by `WKWebView` are not yet implemented in this
189189
and so deeper customization may require custom implementation work.
190190
To implement these, you may need to fork the repository and add it to your workspace,
191191
as described in the [Contributing guide](/docs/contributing/).
192-
Please consider creating a [Pull Request](/docs/modules/skip-web/pulls)
192+
Please consider creating a [Pull Request](https://source.skip.dev/skip-web/pulls)
193193
with features and fixes that you create, as this benefits the entire Skip community.
194194

195195
## Building

0 commit comments

Comments
 (0)