Skip to content

Commit

Permalink
Merge pull request #506 from BrettThePark/master
Browse files Browse the repository at this point in the history
Fix issue of static style sheet and js url for docs
  • Loading branch information
tomaz committed Feb 2, 2015
2 parents 7015668 + 1ebc458 commit aef1b08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions Generating/GBHTMLTemplateVariablesProvider.m
Expand Up @@ -185,9 +185,10 @@ - (NSDictionary *)variablesForDocument:(GBDocumentData *)object withStore:(id)aS
NSString *path = [self.settings htmlRelativePathToIndexFromObject:object];
NSMutableDictionary *page = [NSMutableDictionary dictionary];
[page setObject:[self pageTitleForDocument:object] forKey:@"title"];
[page setObject:[path stringByAppendingPathComponent:@"css/styles.css"] forKey:@"cssPath"];
[page setObject:[path stringByAppendingPathComponent:@"css/stylesPrint.css"] forKey:@"cssPrintPath"];
[page setObject:[path stringByAppendingPathComponent:@"index.html"] forKey:@"documentationIndexPath"];
[page setObject:[path stringByAppendingPathComponent:@"css/style.css"] forKey:@"cssPath"];
[page setObject:[path stringByAppendingPathComponent:@"css/stylePrint.css"] forKey:@"cssPrintPath"];
[page setObject:[path stringByAppendingPathComponent:@"js/script.js"] forKey:@"jsPath"];
[page setObject:[path stringByAppendingPathComponent:@"index.html"] forKey:@"documentationIndexPath"];
[self addFooterVarsToDictionary:page];
NSMutableDictionary *result = [NSMutableDictionary dictionary];
[result setObject:page forKey:@"page"];
Expand Down
8 changes: 4 additions & 4 deletions Templates/html/document-template.html
Expand Up @@ -5,7 +5,7 @@

<title>{{page.title}}</title>

<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="{{page.cssPath}}">
<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
{{#strings.appledocData}}<meta name="generator" content="{{tool}} {{version}} (build {{build}})">{{/strings.appledocData}}
</head>
Expand All @@ -14,11 +14,11 @@
<div class="container" class="hide-in-xcode">
{{#page}}
<h1 id="library-title">
<a href="index.html">{{projectName}} {{strings.objectPage.libraryTitlePostfix}}</a>
<a href="{{page.documentationIndexPath}}">{{projectName}} {{strings.objectPage.libraryTitlePostfix}}</a>
</h1>

<p id="developer-home">
<a href="index.html">{{projectCompany}}</a>
<a href="{{page.documentationIndexPath}}">{{projectCompany}}</a>
</p>
{{/page}}
</div>
Expand Down Expand Up @@ -57,7 +57,7 @@ <h1 class="title">{{page.title}}</h1>
</div>
</article>

<script src="js/script.js"></script>
<script src="{{page.jsPath}}"></script>
</body>
</html>

Expand Down

0 comments on commit aef1b08

Please sign in to comment.