Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/missing algolia index config #582

Merged
merged 4 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blog/2016-12-16-a-step-by-step-guide-to-single-spa.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ While you are verifying that everything is working, keep in mind that each appli

Conclusion

As you get your feet wet, you’ll probably run into some (hopefully small) hiccups setting things up. When this tutorial is not enough, there are other resources on [Github](https://github.com/single-spa/single-spa) and here in the [docs](docs/building-applications.html).
As you get your feet wet, you’ll probably run into some (hopefully small) hiccups setting things up. When this tutorial is not enough, there are other resources on [Github](https://github.com/single-spa/single-spa) and here in the [docs](/docs/building-applications).

Single-spa is still a relatively new thing, and we’d love to hear your feedback and questions. We welcome contributions from everyone.

Expand Down
13 changes: 5 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ module.exports = {
appId: 'FWAC4N89WA',
apiKey: 'e9a2995a76ba1949a12513c566b0d87a',
indexName: 'single-spa-js',
contextualSearch: true,
searchParameters: {},
searchPagePath: 'search',
startUrls: ['https://single-spa.js.org/'],
},
footer: {
logo: {
Expand Down Expand Up @@ -142,14 +146,7 @@ module.exports = {
},
prismTheme: require('prism-react-renderer/themes/vsDark'),
},
plugins: [
[
path.resolve('./src/plugins/docusaurus-plugin-redirects'),
{
excludedPaths: ['/'],
},
],
],
plugins: [],
presets: [
[
'@docusaurus/preset-classic',
Expand Down
1,320 changes: 695 additions & 625 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve",
"eslint:check": "eslint src --ext .js,.jsx,.ts,.tsx --max-warnings 1",
"eslint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
"format": "prettier --config .prettierrc --write '**/*.{ts,js,tsx,jsx,scss,css,html,md}'",
Expand All @@ -20,8 +21,8 @@
"prettier": "^1.19.1"
},
"dependencies": {
"@docusaurus/core": "^2.2.0",
"@docusaurus/preset-classic": "^2.2.0",
"@docusaurus/core": "^2.4.0",
"@docusaurus/preset-classic": "^2.4.0",
"classnames": "^2.2.6",
"markdown-to-jsx": "^6.11.4",
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.x/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ Parcels do not automatically unmount. Unmounting will need to be triggered manua

<dl className="args-list">
<dt>Parcel object</dt>
<dd>See <a href="/docs/parcels-api.html">Parcels API</a> for more detail.</dd>
<dd>See <a href="/docs/parcels-api">Parcels API</a> for more detail.</dd>
</dl>

## ensureJQuerySupport
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.x/building-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Each lifecycle function is guranteed to be called with the following props:
- `singleSpa`: A reference to the singleSpa instance, itself. This is intended to allow applications and helper libraries to call singleSpa
APIs without having to import it. This is useful in situations where there are multiple webpack configs that are not set up to ensure
that only one instance of singleSpa is loaded.
- `mountParcel`: The [mountParcel function](/docs/parcels-api.html#mountparcel).
- `mountParcel`: The [mountParcel function](/docs/parcels-api#mountparcel).

#### Custom props

Expand Down
14 changes: 7 additions & 7 deletions versioned_docs/version-4.x/ecosystem-angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_label: Angular

[single-spa-angular](https://github.com/single-spa/single-spa-angular/) is a library for creating Angular microfrontends.

Each microfrontend ([single-spa application](/docs/building-applications.html)) is an Angular CLI project that can
Each microfrontend ([single-spa application](/docs/building-applications)) is an Angular CLI project that can
use its own version of Angular and be deployed separately from any other. They all come together into a single
web page where one or more single-spa applications is active at any time.

Expand All @@ -35,7 +35,7 @@ For instructions on how to test this locally before creating a pull request, see
### Angular 1 (AngularJS)

AngularJS is supported by [single-spa-angularjs](https://github.com/single-spa/single-spa-angularjs), instead of single-spa-angular.
See [AngularJS docs](/docs/ecosystem-angularjs.html).
See [AngularJS docs](/docs/ecosystem-angularjs).

### Angular 2

Expand Down Expand Up @@ -263,7 +263,7 @@ Run the following:
npm run serve:single-spa
```

This **will not** open up an HTML file, since single-spa applications all [share one HTML file](/docs/configuration.html). Instead, go to
This **will not** open up an HTML file, since single-spa applications all [share one HTML file](/docs/configuration). Instead, go to
http://single-spa-playground.org and follow the instructions there to verify everything is working and for instructions on creating the shared HTML file.

## Building
Expand All @@ -279,7 +279,7 @@ In order for the [webpack public path](https://webpack.js.org/guides/public-path
"single-spa helpers" refers to the in-browser portion of single-spa-angular. The helpers are used by all versions of Angular and
regardless of whether you are using Angular CLI or not. This is the core of the single-spa-angular library that makes it possible
for Angular applications to bootstrap, mount, and unmount. See
[single-spa lifecycles](/docs/building-applications.html#registered-application-lifecycle) for more information.
[single-spa lifecycles](/docs/building-applications#registered-application-lifecycle) for more information.

## Basic usage

Expand Down Expand Up @@ -316,7 +316,7 @@ Options are passed to single-spa-angular via the `opts` parameter when calling `
The following options are available:

- `bootstrapFunction`: (required) A function that is given custom props as an argument and returns a promise that resolves with a resolved Angular module that is bootstrapped. Usually, your implementation will look like this: `bootstrapFunction: (customProps) => platformBrowserDynamic().bootstrapModule()`.
See [custom props documentation](https://single-spa.js.org/docs/building-applications.html#custom-props) for more info on the argument passed to the function.
See [custom props documentation](https://single-spa.js.org/docs/building-applications#custom-props) for more info on the argument passed to the function.
- `template`: (required) An HTML string that will be put into the DOM Element returned by `domElementGetter`. This template can be anything,
but it is recommended that you keeping it simple by making it only one Angular component. For example, `<app-root />` is recommended,
but `<div><app-root /><span>Hello</span><another-component /></div>` is allowed. Note that `innerHTML` is used to put the template
Expand Down Expand Up @@ -370,7 +370,7 @@ See [issue thread](https://github.com/single-spa/single-spa-angular/issues/2#iss

### Custom Props

[Custom props](https://single-spa.js.org/docs/building-applications.html#custom-props) are a way of passing auth or other data to your single-spa
[Custom props](https://single-spa.js.org/docs/building-applications#custom-props) are a way of passing auth or other data to your single-spa
applications. The custom props are available inside of the [bootstrapFunction](#options) passed to singleSpaAngular(). Additionally, if you use the
angular cli schematic, you may subscribe to the singleSpaPropsSubject in your component, as shown below:

Expand Down Expand Up @@ -487,7 +487,7 @@ is the preferred way to do it.
#### Option 2

If you want the scripts to only be loaded when needed, you can add a custom
[bootstrap lifecycle](/docs/building-applications.html#bootstrap) to your code.
[bootstrap lifecycle](/docs/building-applications#bootstrap) to your code.

Note that lazy loading these scripts can actually be worse for performance _if you always need them_, since
they will start downloading later than if you put them right into the root HTML file.
Expand Down
6 changes: 3 additions & 3 deletions versioned_docs/version-4.x/ecosystem-angularjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const unmount = ngLifecycles.unmount;

## Without a bundler
If you're not using a bundler, you'll need to make your angularjs application a SystemJS module or a global variable. The SystemJS
module is preferred, and you can read about it more in the [recommended single-spa setup](/docs/faq.html#is-there-a-recommended-setup).
module is preferred, and you can read about it more in the [recommended single-spa setup](/docs/faq#is-there-a-recommended-setup).

### As a SystemJS module
Add the following to your AngularJS application. If you're using gulp/grunt to concatenate files together, just create a new file called
Expand All @@ -60,7 +60,7 @@ System.register([], function(_export) {
```

Once you do this, you can `System.import()` the bundle file and SystemJS + single-spa will know what to do with your module. Your
[loading function](/docs/configuration.html#loading-function-or-application) should be `System.import('name-of-app')`. Make sure to
[loading function](/docs/configuration#loading-function-or-application) should be `System.import('name-of-app')`. Make sure to
add `name-of-app` to your [import map](https://single-spa-playground.org/playground/import-map).

### As a global variable
Expand All @@ -74,7 +74,7 @@ window.myAngularApp = singleSpaAngularJS({
})
```

Your [loading function](/docs/configuration.html#loading-function-or-application) should just be the global variable itself. For example:
Your [loading function](/docs/configuration#loading-function-or-application) should just be the global variable itself. For example:
```js
singleSpa.registerApplication('my-angular-app', myAngularApp, () => true);
```
Expand Down
10 changes: 5 additions & 5 deletions versioned_docs/version-4.x/ecosystem-leaked-globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ that were popular when ES modules were not yet available.

## What single-spa-leaked-globals does
single-spa-leaked-globals will remove specific global variables from `window` during your application's
[unmount lifecycle](/docs/building-applications.html#unmount), and add them back to `window` during your application's
[mount lifecycle](/docs/building-applications.html#mount).
[unmount lifecycle](/docs/building-applications#unmount), and add them back to `window` during your application's
[mount lifecycle](/docs/building-applications#mount).

## Before using single-spa-leaked-globals
It might be okay for single-spa applications to leak some global variables. Those leaked global variables could be harmless. Below are some
Expand All @@ -20,7 +20,7 @@ situations where using single-spa-leaked-globals could be useful. If your situat
1. Your applications are accidentally sharing global variables and the order in which they are mounted matters. For example, the jQuery `$` variable
is available at the start, but app1 installs a jQuery plugin that app2 assumes is there. If app2 is mounted
before app1, you might get an error because the jQuery plugin is not installed. In that situation, the best solution is maybe to install
the jQuery plugin inside of your [single-spa config](/docs/configuration.html). But if that's not desireable, you can use single-spa-leaked-globals
the jQuery plugin inside of your [single-spa config](/docs/configuration). But if that's not desireable, you can use single-spa-leaked-globals
to manage two separate versions of jQuery -- one for app1 and one for app2.
2. Your applications require different versions of the same global variable. For example, consider when app1 depends on
an [underscorejs](https://underscorejs.org/) `_` global variable and app2 depends on a [lodash](https://lodash.com/) `_` global variable.
Expand All @@ -31,7 +31,7 @@ situations where using single-spa-leaked-globals could be useful. If your situat
## Limitations
single-spa-leaked-globals cannot change the global nature of global dependencies. Only one instance of the global variable can be on the
`window` at a time. **This means that you probably can only have one application mounted at a time that depends on that global variable.**
If two applications depend on the same global variable and are [active](docs/configuration.html#activity-function) at the same time,
If two applications depend on the same global variable and are [active](/docs/configuration#activity-function) at the same time,
single-spa-leaked-globals won't work for you.

## Installation
Expand All @@ -55,7 +55,7 @@ https://cdn.jsdelivr.net/npm/single-spa-leaked-globals/ to find the latest versi
## Usage
The single-spa-leaked-globals library is often used in conjunction with another helper library, such as
single-spa-angularjs or single-spa-backbone. As such, you'll want to
[export an array](/docs/building-applications.html#registered-application-lifecycle) for your lifecycle functions
[export an array](/docs/building-applications#registered-application-lifecycle) for your lifecycle functions
instead of exporting just a function.

```js
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.x/ecosystem-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ import * as parcelConfig from './my-parcel.js'
```

## Create React App
See [FAQ for CRA](https://single-spa.js.org/docs/faq.html#create-react-app)
See [FAQ for CRA](https://single-spa.js.org/docs/faq#create-react-app)
4 changes: 2 additions & 2 deletions versioned_docs/version-4.x/ecosystem-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ to each of the single-spa applications. Adding `vue` and other libraries to your
checkout [coexisting-vue-microfrontends' index.html file](https://github.com/joeldenning/coexisting-vue-microfrontends/blob/master/root-html-file/index.html).

Sharing a single instance of Vue and other common libraries is highly recommended. See the
[recommended setup for single-spa](https://single-spa.js.org/docs/faq.html#is-there-a-recommended-setup) for more details on why.
[recommended setup for single-spa](https://single-spa.js.org/docs/faq#is-there-a-recommended-setup) for more details on why.

### Shared deps with Vue CLI
```js
Expand Down Expand Up @@ -117,6 +117,6 @@ To create a single-spa parcel, simply omit the `el` option from your appOptions,
option should be provided exactly the same as in the example above.

## Custom Props
[single-spa custom props](/docs/building-applications.html#custom-props) are added to your App component as
[single-spa custom props](/docs/building-applications#custom-props) are added to your App component as
`appOptions.data`, and are accessible via `vm.$data`. See [this Vue documentation](https://vuejs.org/v2/api/#data)
for more information on `appOptions.data`.
4 changes: 2 additions & 2 deletions versioned_docs/version-4.x/migrating-angularJS-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Run `grunt` in the root directory to fire up a server at `http://localhost:8080`

## Step One: Create a single-spa config

The single spa config consists of all code that is not part of a [registered application](https://single-spa.js.org/docs/configuration.html#registeringapplications). Ideally, this only includes an HTML file and a JavaScript file that registers single-spa applications. It is best practice to keep your single spa config as small as possible and to simply defer to single-spa to manage all of the applications. The single spa config should not be doing client-side HTML rendering nor should it be responding to routing events such as `hashchange` or `popstate`. Instead, all of that functionality should be taken care of either by single-spa itself or by a single-spa application.
The single spa config consists of all code that is not part of a [registered application](https://single-spa.js.org/docs/configuration#registeringapplications). Ideally, this only includes an HTML file and a JavaScript file that registers single-spa applications. It is best practice to keep your single spa config as small as possible and to simply defer to single-spa to manage all of the applications. The single spa config should not be doing client-side HTML rendering nor should it be responding to routing events such as `hashchange` or `popstate`. Instead, all of that functionality should be taken care of either by single-spa itself or by a single-spa application.

It is required to [register applications](https://single-spa.js.org/docs/configuration.html#registering-applications) with single-spa. This enables single-spa to know how and when to bootstrap, mount and unmount an application. We will be creating a `single-spa.config.js` file to house all of our single-spa logic.
It is required to [register applications](https://single-spa.js.org/docs/configuration#registering-applications) with single-spa. This enables single-spa to know how and when to bootstrap, mount and unmount an application. We will be creating a `single-spa.config.js` file to house all of our single-spa logic.

Inside the _public/_ folder, create a _single-spa-config.js_ file.

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.x/migrating-react-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ registerServiceWorker();

## Step Two: Register the Application

Now that we have prepared _index.js_ to function as our **single-spa config**, we can begin to register the application. It is required to [register applications](https://single-spa.js.org/docs/configuration.html#registering-applications) with single-spa. This enables single-spa to know how and when to bootstrap, mount and unmount an application.
Now that we have prepared _index.js_ to function as our **single-spa config**, we can begin to register the application. It is required to [register applications](https://single-spa.js.org/docs/configuration#registering-applications) with single-spa. This enables single-spa to know how and when to bootstrap, mount and unmount an application.

In order to register an application with single-spa we call the `registerApplication()` api and include the application [name](configuration#application-name), a [loadingFunction](configuration#loading-function-or-application) and an [activityFunction](configuration#activity-function).

Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-4.x/single-spa-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_label: Configuring single-spa
The single-spa root config consists of the following:

1. The root HTML file that is shared by all single-spa applications.
2. The JavaScript that calls [`singleSpa.registerApplication()`](/docs/api.html#registerapplication).
2. The JavaScript that calls [`singleSpa.registerApplication()`](/docs/api#registerapplication).

Your root config exists only to start up the single-spa applications.

Expand All @@ -16,7 +16,7 @@ See [this example root config](http://single-spa-playground.org/playground/html-
Notice how it does not have any divs or buttons, but just calls `registerApplication()`.

**You do not have to use SystemJS when using single-spa**, but many examples and tutorials will encourage you to do so because
it allows you to [independently deploy](/docs/separating-applications.html) your applications.
it allows you to [independently deploy](/docs/separating-applications) your applications.

## Registering applications

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-5.x/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ Unmounting will need to be triggered manually.

<dl className="args-list">
<dt>Parcel object</dt>
<dd>See <a href="/docs/parcels-api.html">Parcels API</a> for more detail.</dd>
<dd>See <a href="/docs/parcels-api">Parcels API</a> for more detail.</dd>
</dl>

## pathToActiveWhen
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-5.x/building-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Each lifecycle function is guaranteed to be called with the following props:
- `singleSpa`: A reference to the singleSpa instance, itself. This is intended to allow applications and helper libraries to call singleSpa
APIs without having to import it. This is useful in situations where there are multiple webpack configs that are not set up to ensure
that only one instance of singleSpa is loaded.
- `mountParcel`: The [mountParcel function](/docs/parcels-api.html#mountparcel).
- `mountParcel`: The [mountParcel function](/docs/parcels-api#mountparcel).

#### Custom props

Expand Down
Loading