Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: native_client_sdk/src/doc/_sphinxext/devsite_builder.py

Issue 25548007: [NaCl Docs] Add a new doc build configuration: devsite-staging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2013 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # 5 #
6 # This is a Sphinx extension. 6 # This is a Sphinx extension.
7 # 7 #
8 8
9 import codecs 9 import codecs
10 import os 10 import os
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 self.devsite_production_mode,) 240 self.devsite_production_mode,)
241 self.config_hash = '' 241 self.config_hash = ''
242 self.tags_hash = '' 242 self.tags_hash = ''
243 self.theme = None # no theme necessary 243 self.theme = None # no theme necessary
244 self.templates = None # no template bridge necessary 244 self.templates = None # no template bridge necessary
245 self.init_translator_class() 245 self.init_translator_class()
246 self.init_highlighter() 246 self.init_highlighter()
247 247
248 def get_target_uri(self, docname, typ=None): 248 def get_target_uri(self, docname, typ=None):
249 if self.devsite_production_mode: 249 if self.devsite_production_mode:
250 # TODO(eliben): testrst here will have to be replaced with 250 return '/native-client/%s/%s' % (self.config.devsite_foldername, docname)
eliben 2013/10/02 15:57:32 visit_image too Other paths relative to native-cl
Sam Clegg 2013/10/02 19:08:08 Done.
251 # {{pepperversion}}
252 return '/native-client/testrst/%s' % docname
253 else: 251 else:
254 return docname + self.link_suffix 252 return docname + self.link_suffix
255 253
256 def handle_page(self, pagename, ctx, templatename='page.html', 254 def handle_page(self, pagename, ctx, templatename='page.html',
257 outfilename=None, event_arg=None): 255 outfilename=None, event_arg=None):
258 ctx['current_page_name'] = pagename 256 ctx['current_page_name'] = pagename
259 257
260 if not outfilename: 258 if not outfilename:
261 outfilename = os.path.join(self.outdir, 259 outfilename = os.path.join(self.outdir,
262 pagename + self.out_suffix) 260 pagename + self.out_suffix)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 314
317 315
318 def setup(app): 316 def setup(app):
319 """ Extension registration hook. 317 """ Extension registration hook.
320 """ 318 """
321 app.add_directive('naclcode', NaclCodeDirective) 319 app.add_directive('naclcode', NaclCodeDirective)
322 app.add_builder(DevsiteBuilder) 320 app.add_builder(DevsiteBuilder)
323 321
324 # "Production mode" for local testing vs. on-server documentation. 322 # "Production mode" for local testing vs. on-server documentation.
325 app.add_config_value('devsite_production_mode', default='1', rebuild='html') 323 app.add_config_value('devsite_production_mode', default='1', rebuild='html')
326
327 app.add_config_value('kill_internal_links', default='0', rebuild='html') 324 app.add_config_value('kill_internal_links', default='0', rebuild='html')
325 app.add_config_value('devsite_foldername', default='dev', rebuild='html')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698