Skip to content

Commit

Permalink
Fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
fskreuz committed May 13, 2017
1 parent b304cb3 commit 92da795
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 23 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ deactivate

## Finding and fixing broken links

Normally, mkdocs will warn you of links that point to nowhere. However, as an extra precaution, links must be checked on the actual pages.

```sh
# Install broken-link checker
npm install -g broken-link-checker

# Run broken-link checker while mkdocs is running
blc -egorv http://localhost:8000
blc -egor http://localhost:8000
```

## Conventions
Expand Down
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ The registry of globally available [decorators](extend.md#decorators).

`(Object<string, any>)`

Global defaults for [initialisation options](api.md) with the exception of [plugin registries](integrations/plugins.md).
Global defaults for [initialisation options](api.md) with the exception of [plugin registries](integrations.md#plugins).

```js
// Change the default mustache delimiters to [[ ]] globally
Expand Down Expand Up @@ -3967,7 +3967,7 @@ Ractive({
// Hello World!
```

Ractive can automatically update properties on `@global` via two-way binding. However, for changes caused externally, [`ractive.update()`](./instance-methods#ractiveupdate) must be called to re-render the UI.
Ractive can automatically update properties on `@global` via two-way binding. However, for changes caused externally, [`ractive.update()`](#ractiveupdate) must be called to re-render the UI.

<div data-playground="N4IgFiBcoE5QdgVwDbIL4BoQGcogO4CW8AJgPb4B0AtgKbbYCGA5rQAQC8bA5ABK2oybAOpkYyEgEJuAHXhyASowDGAF0IA3WgApgctmwGQeAIzIkAntwz62q2tQAOyRveMADWzNXBgbAALMyGQmjMg09EysbGhotgYAPMSOiKp2Fo60HDIg9gAeqjlsGmGIWTm+AUEhYREMLOyxOQB88WwJJqmqZPDpmdkgnard8iBsPQC0ysiEygDWA-6qYITYlMHMCrQAZrQwtPDKOgCULQAyZMxs+7v7h+wlyGUJAPRDI629Bu3vPX3lgy6PSKk2mswWOSWKzWGwA4sFQshtKcQM0LldqojiqVaK9fvBPt8fkDeqoMgD8SD4FMZvNFstVpRsLRVAAxMhkABCjBg3IAXsiWgBhMCMeDRbpsHLbDlsUIwOWMPlFEiEfZqZAWPEkwnfDok-4DSljUG0iEgKGMxCOEiuHTcQII2p0eqsbgo5pCs12ITW232bXDHqfNoJMjIXVEhIzT3enLo647PYHI7Yp60IpikhsYJkOZsVx2MDsZQ9bDh3EvGNtRIxr3gqUgBOYsJpsqZ0g5jn5wvLEtliuvatfKN10Xi9h9tjJVJt9hZxOZQvYeyObBsACMBc7ACYh4RI3q63GQCKxRKhNwZUJ5Yq+dw2Kr1apNTl94fawetku0ivaGvN23bMdyAth4DIdRU2WZdV0A-BGHXcC0kYeD9nGbYi3YJ9aDUNhlHHVh3xrdpjwbHJ63mH02D9O03yrA9iOjL9-1oGD-3XLcFxAhckNmSdRTSMxljYP8AJ5dhwPwAtUMrYcoxecNdXcGwvg2LZbhTE49BHPCB2QWh1kubQGTWVhVG0B0W3CF0olod1Ti+TBbDhJ0kWObSiVLeBy30wzmG0IhSAoOpbOOABuWwnK+Zk2Q5bleSVZEPO+QLyCoGyGk4Rtr0VBVQmVEBIrkNBwpALBVDwBJsGUGBCEcX8YGUAYwGGNdIBeF5EHgRw5mYShS2oF4YBUdQtBaV5qtq+rmhANAgA"></div>

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/data-binding/observers.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ But the normal pub/sub mechanism won't work for monitoring data changes with Rac

So instead, we introduce the concept of *observers*.

An observer observes a particular [keypath](), and is *notified* when the value of its keypath changes, whether directly or indirectly (because an *upstream* or *downstream* keypath changed). You create one with `ractive.observe()` (see [`ractive.observe()`](../../api/instance-properties#ractiveobserve) for full method
An observer observes a particular [keypath](), and is *notified* when the value of its keypath changes, whether directly or indirectly (because an *upstream* or *downstream* keypath changed). You create one with `ractive.observe()` (see [`ractive.observe()`](../../api.md#ractiveobserve) for full method
API).

Here's an example:
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/data-binding/two-way-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ As with `twoway`, laziness may be specified on a per-element basis. Besides `tru

# Observing changes

To use user input elsewhere in your app, you'll need to observe it using [`ractive.observe()`](../../api/instance-properties#ractive.observe()):
To use user input elsewhere in your app, you'll need to observe it using [`ractive.observe()`](../../api.md#ractiveobserve):

```html
<input placeholder='Type your name' value='{{user.name}}'>
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/events/method-calls.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ As an alternative to [event directive](./directives.md), right from your templat
<button on-click='@this.toggle("foo")'>toggle foo</button>
```

In this case, because [`ractive.toggle()`](../../api/instance-properties#ractivetoggle) is a built-in method, clicking the button will toggle the value of `foo` between `true` and `false` ([demo](http://jsfiddle.net/rich_harris/xxg93vw8/)).
In this case, because [`ractive.toggle()`](../../api.md#ractivetoggle) is a built-in method, clicking the button will toggle the value of `foo` between `true` and `false` ([demo](http://jsfiddle.net/rich_harris/xxg93vw8/)).

This also works with custom methods:

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/events/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The [publish-subscribe]() event handling in Ractive allows you to consistently h
* [Proxy events](), mentioned above, proxy DOM and custom events defined in your template
* [Method calls]() are a more powerful alternative to proxy events that allow you to execute one or more expressions when an event fires.
* [Lifecycle events]() generated by each ractive instance - such as `init`, `render` and `teardown`
* [Custom events]() fired in code using [`ractive.fire()`](../../api/instance-properties#ractive.fire()), which can be anything you like
* [Custom events]() fired in code using [`ractive.fire()`](../../api.md#ractivefire), which can be anything you like

# Hygiene

Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/events/proxy-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ractive.on( 'activate', function ( event ) {
});
```

In this example, it is `activate` (and not `click`!) that is the name of the handler event that will be fired for any registered handlers created via [`ractive.on()`](../../api/instance-properties#ractiveon).
In this example, it is `activate` (and not `click`!) that is the name of the handler event that will be fired for any registered handlers created via [`ractive.on()`](../../api.md#ractiveon).

# Event arguments

Expand All @@ -28,7 +28,7 @@ The first argument to a proxy event handler is always a Ractive `event` object.
* `event.keypath` - the [keypath](../templates/keypaths.md) of the current context
* `event.context` - the value of `this.get(event.keypath)`
* `event.index` - a map of index references
* `event.component` - the component that raised the event, only present on [bubbled events](./bubbling)
* `event.component` - the component that raised the event, only present on [bubbled events](bubbling.md)
* `event.original` - the original DOM event, if available

In the example above, `event.keypath` might be `items.0` for the first item in the list, `items.1` for the second, and so on. The `event.index` map would have a property `i`, which would correspond to those indices.
Expand Down
10 changes: 5 additions & 5 deletions docs/concepts/events/publish-subscribe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Like many libraries, Ractive implements the [publish/subscribe](http://addyosman

# Subscribe

To subscribe to an event, use [`ractive.on()`](../../api/instance-properties#ractive.on()):
To subscribe to an event, use [`ractive.on()`](../../api.md#ractiveon:

```js
ractive = new Ractive({
Expand All @@ -19,7 +19,7 @@ This can be used to subscribe to any of the following type of events:

* [Proxy events]() for DOM and custom events defined in your template
* [Lifecycle events]() generated by each ractive instance - such as `init`, `render` and `teardown`
* [Custom events]() fired in code using [`ractive.fire()`](../../api/instance-properties#ractive.fire()), which can be anything you like, see below.
* [Custom events]() fired in code using [`ractive.fire()`](../../api.md#ractivefire, which can be anything you like, see below.

## Multiple events to one handler

Expand Down Expand Up @@ -86,7 +86,7 @@ Note that returning `false` has a dual purpose of both cancelling the view hiera

# Unsubscribe

Event handlers are automatically removed if the instance is torn down (e.g. with [`ractive.teardown()`](../../api/instance-properties#ractive.teardown())) (which also happens as components are removed due to template/data logic).
Event handlers are automatically removed if the instance is torn down (e.g. with [`ractive.teardown()`](../../api.md#ractiveteardown)) (which also happens as components are removed due to template/data logic).

You can also unsubscribe event handlers manually using one of two approaches:

Expand All @@ -112,7 +112,7 @@ ractive.on( 'activate', handler );
ractive.off( 'activate', handler );
```

In the second case, note that if you don't specify a handler, all 'activate' handlers will be removed. If you don't specify an event name, **all** event handlers will be removed from the instance. See [`ractive.off()`](../../api/instance-properties#ractive.off()) for more detail.
In the second case, note that if you don't specify a handler, all 'activate' handlers will be removed. If you don't specify an event name, **all** event handlers will be removed from the instance. See [`ractive.off()`](../../api.md#ractiveoff) for more detail.

The `ractive.off()` method is chainable for easily replacing subscribtions:

Expand All @@ -122,7 +122,7 @@ ractive.off( 'activate' ).on( 'activate', function () {...} );

# Publish

In addition to the built-in [lifecycle events]() and [proxy events](), you can fire your own events with [`ractive.fire()`](../../api/instance-properties#ractive.fire()).
In addition to the built-in [lifecycle events]() and [proxy events](), you can fire your own events with [`ractive.fire()`](../../api.md#ractivefire).

This is most useful in the context of a [component]() that needs to emit custom events. Here's a (somewhat contrived) example:

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/templates/parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ The parsed template is not designed to be readable nor editable by a human. It i

Parsing templates can be a very slow operation, particularly for very large apps, very complex templates, or intricate SVGs. As an optimization option, templates can be pre-parsed into their object form outside of runtime. This would allow Ractive to skip parsing during runtime and speed up app initialization. Typically, a parsed template is only about 30-40% larger than the string version, making pre-parsing a trade-off between space and processing.

Pre-parsing can be done in many different ways as long as Ractive receives the parsed template during runtime. One way would be to simply serve the pre-parsed template separately from the component or instance and load it via AJAX. Another would be to extract and replace the template on the file with the parsed version during compile time - an approach that works well with [component files](../../api.md). Read more about [loaders](../../integrations/loaders.md) to know more about how loaders do pre-parsing on compile time.
Pre-parsing can be done in many different ways as long as Ractive receives the parsed template during runtime. One way would be to simply serve the pre-parsed template separately from the component or instance and load it via AJAX. Another would be to extract and replace the template on the file with the parsed version during compile time - an approach that works well with [component files](../../api.md). Read more about [loaders](../../integrations.md#loaders) to know more about how loaders do pre-parsing on compile time.
2 changes: 1 addition & 1 deletion docs/extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ const MyComponent = Ractive.extend({
});
```

Another way to define a component is by using [component files](api.md) and [loaders](integrations/loaders.md).
Another way to define a component is by using [component files](api.md) and [loaders](integrations.md#loaders).

```html
<div class="my-component">
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/60-second-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ That's it - you're in business!

- As your app grows, you'll want to separate each component definition into its own file.

- Ractive has many ways to register a component, as well as [tools](../integrations/tools.md) to allow you to write components depending on your setup.
- Ractive has many ways to register a component, as well as [tools](../integrations.md#tools) to allow you to write components depending on your setup.

- Ractive also allows for [single-file components](https://github.com/ractivejs/component-spec/blob/master/authors.md) where you define the markup, styles and logic for a single component in a single file.

Expand Down
12 changes: 6 additions & 6 deletions docs/get-started/tutorials/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ var slideshow = new Slideshow({
Go ahead and execute the code – you should now have a working slideshow.

> Needless to say, you could add as many bells and whistles as you wanted – fading or sliding transitions, image preloading, thumbnails, touchscreen gesture controls, and so on.
>
>
> You could, of course, just use an existing image slideshow library. But then you would have to learn that library, and potentially submit to its design philosophy.
>
>
> Ractive.js is all about flexibility. If you want to change the design or behaviour of a component (say, adding a class name to a particular element), the power to do so is in your hands – the template is easy to understand and tweak because it's basically just HTML, and the view logic is straightforward.
>
>
> It's better to be able to build your own solution than to rely on developers maintaining high quality and up-to-date documentation.
## Step 3
Expand Down Expand Up @@ -142,7 +142,7 @@ We _were_ passing the list of pictures to the instance as it was being initializ

Update the code with another images array and put two `slideshow` components in the main instance.

> Mappings are automatically managed cross-instance [`link`](/api/instance-methods#ractivelink)s. A link is a bit like a filesystem symlink in that the data isn't copied anywhere - it just gets a new path that points to it. Changing the data in either place is effectively the same as changing it everywhere at once.
> Mappings are automatically managed cross-instance [`link`](../../api.md#ractivelink)s. A link is a bit like a filesystem symlink in that the data isn't copied anywhere - it just gets a new path that points to it. Changing the data in either place is effectively the same as changing it everywhere at once.
## Step 4
<div class="tutorial">
Expand Down Expand Up @@ -222,7 +222,7 @@ When we started out with our slideshow, we were rendering it directly to a targe

In order do use views with a main instance controlling the overall app, you would have to have some sort of big `#if`/`else` block with each view included as a branch. You could also resort to some sort of partial generation scheme. There's an easier way though.

Ractive.js will allow you to attach one independent instance to another using [`attachChild`](/api/instance-methods#ractiveattachchild), optionally specifying a _target_. If you don't specify a target, then the child instance will not be rendered, but if you _do_ specify a target, then the instance will be rendered into the first available matching _anchor_. An anchor looks like a component or element, but its name always starts with a `#`. You may have as many anchors as you like, and they may each have the same or different names.
Ractive.js will allow you to attach one independent instance to another using [`attachChild`](../../api.md#ractiveattachchild), optionally specifying a _target_. If you don't specify a target, then the child instance will not be rendered, but if you _do_ specify a target, then the instance will be rendered into the first available matching _anchor_. An anchor looks like a component or element, but its name always starts with a `#`. You may have as many anchors as you like, and they may each have the same or different names.

```handlebars
<#anchor />
Expand All @@ -234,7 +234,7 @@ Ractive.js will allow you to attach one independent instance to another using [`

Go ahead and fill out the two provided views as you like, add anchors to the main instance template, and attach an instance of each view to an anchor on the main instance.

> You can detach a child using the conveniently named [`detachChild`](/api/instance-methods#ractivedetachchild) method.
> You can detach a child using the conveniently named [`detachChild`](../../api.md#ractivedetachchild) method.
>
> Child instances can be attached in `prepend`, `insertAt`, or `append` (the default) mode. Ractive.js will try to find a matching anchor for each child starting with the first. If there aren't enough anchors, some instances will not be rendered. Each time a child is attached or detached, Ractive.js will adjust any affected anchors so all instances that can be rendered are rendered.
>
Expand Down

0 comments on commit 92da795

Please sign in to comment.