class documentation

class SingleFileLayout(DirLayoutBase): (source)

View In Hierarchy

Like FileLayout, except all pages are stored in a single file while attachments still follow folder structure per page. Can be used to export a page with sub-pages, but also for a complete notebook.

Layout:

  page.html
  page_files/
   `--> attachment.png
   `--> subpage/attachment.pdf
   `--> _resources/

The root for relative links is the parent folder of "page.html" and "page_files/"

Method __init__ Constructor @param file: a File object @param page: an optional Path object for the top level page
Method page_file No summary
Instance Variable dir Undocumented
Instance Variable file Undocumented
Instance Variable namespace Undocumented
Instance Variable relative_root Undocumented

Inherited from DirLayoutBase:

Method attachments_dir No summary
Method resources_dir Returns the folder for template resources @returns: a Dir object
def __init__(self, file, page=None): (source)
Constructor
Parameters
filea File object
pagean optional Path object for the top level page
def page_file(self, page): (source)
Returns the file for a page
Parameters
pagea Page or Path object
Returns
a File object
Raises
ValueErrorif page can not be mapped
Unknown Field: implementation
must be implemented by subclasses

Undocumented

file = (source)

Undocumented

namespace = (source)

Undocumented

relative_root = (source)