1.1.1.2.1.2. nikola.plugins.compile package — Nikola 8.1.3 documentation

# 1.1.1.2.1.2. nikola.plugins.compile package

Compilers for Nikola.

## 1.1.1.2.1.2.1. Subpackages

- 1.1.1.2.1.2.1.1. nikola.plugins.compile.markdown package
  - 1.1.1.2.1.2.1.1.1. Submodules
  - 1.1.1.2.1.2.1.1.2. nikola.plugins.compile.markdown.mdx_gist module
  - 1.1.1.2.1.2.1.1.3. nikola.plugins.compile.markdown.mdx_nikola module
  - 1.1.1.2.1.2.1.1.4. nikola.plugins.compile.markdown.mdx_podcast module
- 1.1.1.2.1.2.1.2. nikola.plugins.compile.rest package
  - 1.1.1.2.1.2.1.2.1. Submodules
  - 1.1.1.2.1.2.1.2.2. nikola.plugins.compile.rest.chart module
  - 1.1.1.2.1.2.1.2.3. nikola.plugins.compile.rest.doc module
  - 1.1.1.2.1.2.1.2.4. nikola.plugins.compile.rest.gist module
  - 1.1.1.2.1.2.1.2.5. nikola.plugins.compile.rest.listing module
  - 1.1.1.2.1.2.1.2.6. nikola.plugins.compile.rest.media module
  - 1.1.1.2.1.2.1.2.7. nikola.plugins.compile.rest.post_list module
  - 1.1.1.2.1.2.1.2.8. nikola.plugins.compile.rest.soundcloud module
  - 1.1.1.2.1.2.1.2.9. nikola.plugins.compile.rest.thumbnail module
  - 1.1.1.2.1.2.1.2.10. nikola.plugins.compile.rest.vimeo module
  - 1.1.1.2.1.2.1.2.11. nikola.plugins.compile.rest.youtube module

## 1.1.1.2.1.2.2. Submodules

## 1.1.1.2.1.2.3. nikola.plugins.compile.html module

Page compiler plugin for HTML source files.

class nikola.plugins.compile.html.CompileHtml

  Bases: :class:`nikola.plugin_categories.PageCompiler`

  Compile HTML into HTML.

  compile(source, dest, is_two_file=True, post=None, lang=None)

    Compile the source file into HTML and save as dest.

  compile_string(data, source_path=None, is_two_file=True, post=None, lang=None)

    Compile HTML into HTML strings, with shortcode support.

  create_post(path, **kw)

    Create a new post.

  friendly_name = 'HTML'
  name = 'html'
  read_metadata(post, file_metadata_regexp=None, unslugify_titles=False, lang=None)

    Read the metadata from a post’s meta tags, and return a metadata dict.

  supports_metadata = True

## 1.1.1.2.1.2.4. nikola.plugins.compile.ipynb module

Page compiler plugin for nbconvert.

class nikola.plugins.compile.ipynb.CompileIPynb

  Bases: :class:`nikola.plugin_categories.PageCompiler`

  Compile IPynb into HTML.

  compile(source, dest, is_two_file=False, post=None, lang=None)

    Compile the source file into HTML and save as dest.

  compile_string(data, source_path=None, is_two_file=True, post=None, lang=None)

    Compile notebooks into HTML strings.

  create_post(path, **kw)

    Create a new post.

  default_kernel = 'python3'
  demote_headers = True
  friendly_name = 'Jupyter Notebook'
  name = 'ipynb'
  read_metadata(post, lang=None)

    Read metadata directly from ipynb file.

    As ipynb files support arbitrary metadata as json, the metadata used by Nikola will be assume to be in the ‘nikola’ subfield.

  supports_metadata = True

nikola.plugins.compile.ipynb.get_default_jupyter_config()

  Search default jupyter configuration location paths.

  Return dictionary from configuration json files.

## 1.1.1.2.1.2.5. nikola.plugins.compile.pandoc module

Page compiler plugin for pandoc.

You will need, of course, to install pandoc

class nikola.plugins.compile.pandoc.CompilePandoc

  Bases: :class:`nikola.plugin_categories.PageCompiler`

  Compile markups into HTML using pandoc.

  compile(source, dest, is_two_file=True, post=None, lang=None)

    Compile the source file into HTML and save as dest.

  compile_string(data, source_path=None, is_two_file=True, post=None, lang=None)

    Compile into HTML strings.

  create_post(path, **kw)

    Create a new post.

  friendly_name = 'pandoc'
  name = 'pandoc'
  set_site(site)

    Set Nikola site.

## 1.1.1.2.1.2.6. nikola.plugins.compile.php module

Page compiler plugin for PHP.

class nikola.plugins.compile.php.CompilePhp

  Bases: :class:`nikola.plugin_categories.PageCompiler`

  Compile PHP into PHP.

  compile(source, dest, is_two_file=True, post=None, lang=None)

    Compile the source file into HTML and save as dest.

  compile_string(data, source_path=None, is_two_file=True, post=None, lang=None)

    Compile PHP into HTML strings.

  create_post(path, **kw)

    Create a new post.

  extension()

    Return extension used for PHP files.

  friendly_name = 'PHP'
  name = 'php'