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

docs: doc internal links are now working #158

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 7 additions & 7 deletions dist/famous-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ require(requirements, function(/*args*/) {
*
* The core Angular animation API is fundamentally CSS class-based. Because only Famo.us Surfaces
* support CSS classes, core directives such as `ngClass`, `ngShow`, `ngIf`, and others should be applied
* only with directives representing Surfaces (such as {@link api/directive/faSurface faSurface} and
* {@link api/directive/faImageSurface faImageSurface}).
* only with directives representing Surfaces (such as {@link faSurface faSurface} and
* {@link faImageSurface faImageSurface}).
*
* The {@link https://docs.angularjs.org/api/ngAnimate ngAnimate} module's documentation lists the set of
* core directives supporting $animate events. Please note that the `ngAnimate` module is *not* required
Expand Down Expand Up @@ -846,7 +846,7 @@ angular.module('famous.angular')
* @module famous.angular
* @restrict EA
* @description
* This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an {@link api/directive/animate animate} directive
* This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an {@link animate animate} directive
* @deprecated true
* @usage
* ```html
Expand Down Expand Up @@ -1167,7 +1167,7 @@ angular.module('famous.angular')
* @restrict E
* @deprecated true
* @description
* This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a {@link api/directive/faAnimation faAnimation} directive
* This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a {@link faAnimation faAnimation} directive
*
* @usage
* ```html
Expand Down Expand Up @@ -1423,7 +1423,7 @@ angular.module('famous.angular')
* it creates a Famous context and then adds child elements
* to that context as they get compiled. Inside of this directive,
* normal HTML content will not get rendered to the screen unless
* it is inside of a {@link api/directive/faSurface fa-surface} directive.
* it is inside of a {@link faSurface fa-surface} directive.
*
* @usage
* ```html
Expand Down Expand Up @@ -2342,8 +2342,8 @@ angular.module('famous.angular')
* @restrict A
* @description
* This directive is used to specify the rendering order of elements
* inside of a ViewSequence-based component, such as @link api/directive/faScrollView faScrollView}
* or @link api/directive/faGridLayout faGridLayout}. As a special case, when elements are added to
* inside of a ViewSequence-based component, such as {@link faScrollView faScrollView}
* or {@link faGridLayout faGridLayout}. As a special case, when elements are added to
* these controls using ng-repeat, they are automatically assigned the
* $index property exposed by ng-repeat. When adding elements manually
* (e.g. to a faScrollView but not using ng-repeat) or in a case where custom
Expand Down
38 changes: 22 additions & 16 deletions docs-generation/inline-tag-defs/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,31 @@ var INLINE_LINK = /(\S+)(?:\s+(.+))?/;
var log = require('winston');

module.exports = {
name: 'link',
description: 'Process inline link tags (of the form {@link some/uri Some Title}), replacing them with HTML anchors',
handlerFactory: function(partialNames, config) {
name: 'link',
description: 'Process inline link tags (of the form {@link some/uri Some Title}), replacing them with HTML anchors',
handlerFactory: function(partialNames, config) {

return function handleLinkTags(doc, tagName, tagDescription) {
var versionData = config.get('versionData');
return function handleLinkTags(doc, tagName, tagDescription) {
var versionData = config.get('versionData');

// Parse out the uri and title
return tagDescription.replace(INLINE_LINK, function(match, uri, title) {
// Parse out the uri and title
return tagDescription.replace(INLINE_LINK, function(match, uri, title) {

var linkInfo = partialNames.getLink(uri, title, doc);
var linkInfo = partialNames.getLink(uri, title, doc);

if(!linkInfo.valid) {
log.warn(linkInfo.error, 'in', doc.relativePath + '#' + doc.name);
linkInfo.title = 'TODO:' + linkInfo.title;
}
if(!linkInfo.valid) {
log.warn(linkInfo.error, 'in', doc.relativePath + '#' + doc.name);
linkInfo.title = 'TODO:' + linkInfo.title;
}
if(linkInfo.type === 'doc') {
var len = doc.path.split('/').length;
for(var i = 1; i < len; i++) {
linkInfo.url = '../' + linkInfo.url;
}
}

return '<a href="' + linkInfo.url + '">' + linkInfo.title + '</a>';
});
};
}
return '<a href="' + linkInfo.url + '">' + linkInfo.title + '</a>';
});
};
}
};
15 changes: 15 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: "docs_api"
version: ""
versionHref: "docs/"
path: "api/"
title: Javascript
header_sub_title: Build amazing AngularJS apps with the power of Famo.us
searchable: false
---

# Famo.us/Angular

Famo.us/Angular provides a set of directives and services to integrate Famo.us into your AngularJS app, and to build Famo.us apps using Angular tools.

Explore the API docs for detailed information.
2 changes: 1 addition & 1 deletion docs/unstable/directive/animate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ docType: "directive"



This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a <a href="api/directive/faAnimation">faAnimation</a> directive
This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a <a href="../../../api/directive/faAnimation/">faAnimation</a> directive



Expand Down
2 changes: 1 addition & 1 deletion docs/unstable/directive/faAnimation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ docType: "directive"



This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an <a href="api/directive/animate">animate</a> directive
This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an <a href="../../../api/directive/animate/">animate</a> directive



Expand Down
2 changes: 1 addition & 1 deletion docs/unstable/directive/faApp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This directive is the container and entry point to Famo.us/Angular. Behind the
it creates a Famous context and then adds child elements
to that context as they get compiled. Inside of this directive,
normal HTML content will not get rendered to the screen unless
it is inside of a <a href="api/directive/faSurface">fa-surface</a> directive.
it is inside of a <a href="../../../api/directive/faSurface/">fa-surface</a> directive.



Expand Down
4 changes: 2 additions & 2 deletions docs/unstable/directive/faIndex/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ docType: "directive"


This directive is used to specify the rendering order of elements
inside of a ViewSequence-based component, such as @link api/directive/faScrollView faScrollView}
or @link api/directive/faGridLayout faGridLayout}. As a special case, when elements are added to
inside of a ViewSequence-based component, such as <a href="../../../api/directive/faScrollView/">faScrollView</a>
or <a href="../../../api/directive/faGridLayout/">faGridLayout</a>. As a special case, when elements are added to
these controls using ng-repeat, they are automatically assigned the
$index property exposed by ng-repeat. When adding elements manually
(e.g. to a faScrollView but not using ng-repeat) or in a case where custom
Expand Down
190 changes: 0 additions & 190 deletions docs/unstable/provider/famousProvider/index.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/unstable/service/$animate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ To inform Famo.us/Angular how to halt any in-progress animation, use the `fa-ani

The core Angular animation API is fundamentally CSS class-based. Because only Famo.us Surfaces
support CSS classes, core directives such as `ngClass`, `ngShow`, `ngIf`, and others should be applied
only with directives representing Surfaces (such as <a href="api/directive/faSurface">faSurface</a> and
<a href="api/directive/faImageSurface">faImageSurface</a>).
only with directives representing Surfaces (such as <a href="../../../api/directive/faSurface/">faSurface</a> and
<a href="../../../api/directive/faImageSurface/">faImageSurface</a>).

The <a href="https://docs.angularjs.org/api/ngAnimate">ngAnimate</a> module's documentation lists the set of
core directives supporting $animate events. Please note that the `ngAnimate` module is *not* required
Expand Down
Loading