This repository has been archived by the owner on Mar 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 378
Managing links and urls
Xm4s edited this page Oct 17, 2011
·
12 revisions
Links in Baker can be divided in three distinct category: internal, external and book.
### 1. Internal links
These are the links that target a single HTML file inside the book folder, for example:
<a href="new-page.html#anchor">Link to new page</a>
There are two different behaviors associated to internal links, based upon the type of file linked:
- the file is a book page: Baker will scroll the book to the page linked and load its content. If the page linked is the current page Baker will reload the page content.
- the file is not a book page: Baker will load the content of the file linked inside the current page, replacing its content with the new one.
If an #anchor is specified the content of the page will scroll down to the first element with the attributes id and name that match the anchor.
These are the links that target a external HTML page, for example:
<a href="http://www.external-site.com?referrer=baker">Link to external site</a>
There are two different behaviors associated to external links, based upon the referrer attribute:
- the attribute referrer is specified and it's equal to baker: Baker will open the page linked in Safari Mobile.
- the referrer attribute is not specified / is not equal to baker: Baker will load the content of the page linked inside the current page, replacing its content with the new one.
Coming soon