documon
Version:
A documentation system for mortals. Use with any language.
112 lines (88 loc) • 4.72 kB
HTML
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Linking</title>
<meta name="description" content="more.comment_authoring_guide.linking">
<!-- Normalize -->
<link rel="stylesheet" href="assets/vendor/normalize.css">
<!-- prettify -->
<link rel="stylesheet" href="assets/vendor/prettify/codamike.css">
<script src="assets/vendor/prettify/prettify.js"></script>
<!-- Documon Pages Info. (Used by various classes to identify this page.) -->
<script>
var pageCtx = {
id : "more.comment_authoring_guide.linking",
name: "Linking"
}
</script>
<!-- theme
<link rel="stylesheet" href="assets/fonts/Fira_Sans/FiraSans.css">
<link rel="stylesheet" href="assets/fonts/Inconsolata/inconsolata.css">
-->
<link rel="stylesheet" href="assets/css/pages.css">
<script src="assets/js/documon/Storage.js"></script>
<script src="assets/js/documon/Access.js"></script>
<script src="assets/js/documon/Pages.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-106684927-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div class="page">
<div class="more"><h1 id="linking">Linking</h1>
<p>Use markdown notation:</p>
<pre><code>For more [click here](http://example.com) now.</code></pre>
<p>Or HTML notation:</p>
<pre><code>For more <a href="http://example.com">click here</a> now.</code></pre>
<p>For cross linking to other parts of docs use the ID:</p>
<pre><code>[see Foo](package.Class.method)</code></pre>
<p>Use the # + id to link to a method/property on the same page (traditional anchor linking):</p>
<pre><code>[see setWidth](#setWidth)</code></pre>
<h3 id="website-and-page-structure">Website and Page Structure</h3>
<ol>
<li>Classes and modules are full HTML pages. </li>
<li>Methods, properties, and events (MPE's) are included within a class HTML file.</li>
</ol>
<p>Documon generates a unique ID for each entity. The ID represents a "dot.path" to the entity based on it's relationship to the package and class structure.</p>
<p>Example:</p>
<pre><code>package.class.entity</code></pre>
<p>… where "entity" is a reference to a method, property or event (MPE) within a class or module.</p>
<blockquote>
<p>NOTE: Documon treats modules and classes the same, so for brevity we'll only refer to "class".</p>
</blockquote>
<p>The Documon website intercepts links and interprets dot.path ID's.</p>
<h3 id="interal-method-property-event-mpe-links">Interal Method, Property, Event (MPE) links</h3>
<p>Each MPE has a standard HTML anchors within the page, therefore to link to an internal MPE within a class, use a normal anchor URL's (#example):</p>
<pre><code>[See foo](#foo)</code></pre>
<p>This makes writing an internal link (within a class file) pretty easy.</p>
<p>You can use the full dot.path, or for simplicity, if you're cross linking within the same class, you can just refernce the MPE. Either or will work because the template should incorporate both #entity adn #package.class.entity</p>
<pre><code>[See foo](#foo)
-- or --
[See foo](#package.class.foo)</code></pre>
<h3 id="external-classes-and-mpes">External classes and MPE's</h3>
<p>To link to an external class or a MPE in some other class, use the full ID:</p>
<pre><code>[Link to My Class](package.MyClass)
[Link to the foo property](package.MyClass.foo)</code></pre>
<p>… in the example above we're targeting the location of the "foo" property in the "MyClass" HTML file. Again, the Documon website intercepts and interprets the ID's for you automatically.</p>
<h3 id="external-urls">External URL's</h3>
<p>And to link to external websites, just use a full URL:</p>
<pre><code>[External Website Link](http://www.example.com)</code></pre>
<h3 id="more-pages">More Pages</h3>
<p>Each <a href="more.more_docs">"more" page</a> is provided a unique ID that is prefixed with "more". So you can link to these pages using the ID:</p>
<pre><code>[See the About Page](more.about)</code></pre>
<p>Review the <a href="more.more_docs">"More Docs"</a> page for details on how the ID's are derived.</p>
<p> <br />
<br />
<br />
170906</p></div>
</div>
<div class="footer">Generated by <a href="http://www.documon.net" target="_blank">Documon</a></div>
</body>
</html>