Interface JBakeConfiguration

  • All Known Implementing Classes:
    DefaultJBakeConfiguration

    public interface JBakeConfiguration
    JBakeConfiguration gives you access to the project configuration. Typically located in a file called jbake.properties. Use one of JBakeConfigurationFactory methods to create an instance.
    • Method Detail

      • get

        java.lang.Object get​(java.lang.String key)
        Get property value by a given key from the configuration
        Parameters:
        key - a key for the property like site.host
        Returns:
        the value of the property
      • getArchiveFileName

        java.lang.String getArchiveFileName()
        Returns:
        Output filename for archive file, is only used when getRenderArchive() is true
      • getAsciidoctorAttributes

        java.util.List<java.lang.String> getAsciidoctorAttributes()
        Returns:
        attributes to be set when processing input
      • getAsciidoctorOption

        java.lang.Object getAsciidoctorOption​(java.lang.String optionKey)
        Get an asciidoctor option by it's key
        Parameters:
        optionKey - an option key
        Returns:
        the value of the option key
      • getAsciidoctorOptionKeys

        java.util.List<java.lang.String> getAsciidoctorOptionKeys()
        Get a list of asciidoctor options
        Returns:
        list of asciidoctor options
      • getAssetFolder

        java.io.File getAssetFolder()
        Returns:
        the folder where assets are stored, they are copied directly in output folder and not processed
      • getAssetFolderName

        java.lang.String getAssetFolderName()
        Returns:
        name of folder for assets
      • getAssetIgnoreHidden

        boolean getAssetIgnoreHidden()
        Returns:
        Flag indicating if hidden asset resources should be ignored
      • getAttributesExportPrefixForAsciidoctor

        java.lang.String getAttributesExportPrefixForAsciidoctor()
        Returns:
        Prefix to be used when exporting JBake properties to Asciidoctor
      • getBuildTimeStamp

        java.lang.String getBuildTimeStamp()
        Returns:
        Timestamp that records when JBake build was made
      • getClearCache

        boolean getClearCache()
        Returns:
        Flag indicating to flash the database cache
      • getContentFolder

        java.io.File getContentFolder()
        Returns:
        the content folder
      • getContentFolderName

        java.lang.String getContentFolderName()
        Returns:
        name of Folder where content (that's to say files to be transformed) resides in
      • getDataFolder

        java.io.File getDataFolder()
        Returns:
        the data folder
      • getDataFolderName

        java.lang.String getDataFolderName()
        Returns:
        name of Folder where data files reside in
      • getDataFileDocType

        java.lang.String getDataFileDocType()
        Returns:
        docType for data files
      • getDatabasePath

        java.lang.String getDatabasePath()
        Returns:
        Folder to store database files in
      • getDatabaseStore

        java.lang.String getDatabaseStore()
        Returns:
        name to identify if database is kept in memory (memory) or persisted to disk (plocal)
      • getDateFormat

        java.lang.String getDateFormat()
        Returns:
        How date is formated
      • getDefaultStatus

        java.lang.String getDefaultStatus()
        Returns:
        Default status to use (in order to avoid putting it in all files)
      • getDefaultType

        java.lang.String getDefaultType()
        Returns:
        Default type to use (in order to avoid putting it in all files)
      • getDestinationFolder

        java.io.File getDestinationFolder()
        Returns:
        The destination folder to render and copy files to
      • setDestinationFolder

        void setDestinationFolder​(java.io.File destination)
      • getDocumentTypes

        java.util.List<java.lang.String> getDocumentTypes()
      • getDraftSuffix

        java.lang.String getDraftSuffix()
        Returns:
        Suffix used to identify draft files
      • getError404FileName

        java.lang.String getError404FileName()
        Returns:
        Output filename for error404 file, is only used when getRenderError404() is true
      • getExampleProjectByType

        java.lang.String getExampleProjectByType​(java.lang.String templateType)
        Get name for example project name by given template type
        Parameters:
        templateType - a template type
        Returns:
        example project name
      • getExportAsciidoctorAttributes

        boolean getExportAsciidoctorAttributes()
        Returns:
        Flag indicating if JBake properties should be made available to Asciidoctor
      • getFeedFileName

        java.lang.String getFeedFileName()
        Returns:
        Output filename for feed file, is only used when getRenderFeed() is true
      • getHeaderSeparator

        java.lang.String getHeaderSeparator()
        Returns:
        String used to separate the header from the body
      • getIgnoreFileName

        java.lang.String getIgnoreFileName()
        Returns:
        Filename to use to ignore a directory in addition to ".jbakeignore"
      • getIndexFileName

        java.lang.String getIndexFileName()
        Returns:
        Output filename for index, is only used when getRenderIndex() is true
      • getKeys

        java.util.Iterator<java.lang.String> getKeys()
        Get an iterator of available configuration keys
        Returns:
        an iterator of configuration keys
      • getMarkdownExtensions

        java.util.List<java.lang.String> getMarkdownExtensions()
        A list of markdown extensions

        markdown.extension=HARDWRAPS,AUTOLINKS,FENCED_CODE_BLOCKS,DEFINITIONS

        Returns:
        list of markdown extensions as string
      • getOutputExtension

        java.lang.String getOutputExtension()
        Returns:
        file extension to be used for all output files
      • getOutputExtensionByDocType

        java.lang.String getOutputExtensionByDocType​(java.lang.String docType)
      • getPaginateIndex

        boolean getPaginateIndex()
        Returns:
        Flag indicating if there should be pagination when rendering index
      • getPostsPerPage

        int getPostsPerPage()
        Returns:
        How many posts per page on index
      • getPrefixForUriWithoutExtension

        java.lang.String getPrefixForUriWithoutExtension()
        Returns:
        URI prefix for content that should be given extension-less output URI's
      • getRenderArchive

        boolean getRenderArchive()
        Returns:
        Flag indicating if archive file should be generated
      • getRenderEncoding

        java.lang.String getRenderEncoding()
        Returns:
        Encoding used when rendering files
      • getOutputEncoding

        java.lang.String getOutputEncoding()
        Returns:
        Output encoding for freemarker url escaping
      • getRenderError404

        boolean getRenderError404()
        Returns:
        Flag indicating if error404 file should be generated
      • getRenderFeed

        boolean getRenderFeed()
        Returns:
        Flag indicating if feed file should be generated
      • getRenderIndex

        boolean getRenderIndex()
        Returns:
        Flag indicating if index file should be generated
      • getRenderSiteMap

        boolean getRenderSiteMap()
        Returns:
        Flag indicating if sitemap file should be generated
      • getRenderTags

        boolean getRenderTags()
        Returns:
        Flag indicating if tag files should be generated
      • getRenderTagsIndex

        boolean getRenderTagsIndex()
        Returns:
        Flag indicating if tag index file should be generated
      • getSanitizeTag

        boolean getSanitizeTag()
        Returns:
        Flag indicating if the tag value should be sanitized
      • getServerPort

        int getServerPort()
        Returns:
        Port used when running Jetty server
      • getSiteHost

        java.lang.String getSiteHost()
        Returns:
        the host url of the site e.g. http://jbake.org
      • getSiteMapFileName

        java.lang.String getSiteMapFileName()
        Returns:
        Sitemap template file name. Used only when getRenderSiteMap() is set to true
      • getSourceFolder

        java.io.File getSourceFolder()
        Returns:
        the source folder of the project
      • getTagPathName

        java.lang.String getTagPathName()
        Returns:
        Tags output path, used only when getRenderTags() is true
      • getTemplateEncoding

        java.lang.String getTemplateEncoding()
        Returns:
        Encoding to be used for template files
      • getTemplateFileByDocType

        java.io.File getTemplateFileByDocType​(java.lang.String masterindex)
      • getTemplateFolder

        java.io.File getTemplateFolder()
        Returns:
        the template folder
      • getTemplateFolderName

        java.lang.String getTemplateFolderName()
        Returns:
        name of folder where template files are looked for
      • getThymeleafLocale

        java.lang.String getThymeleafLocale()
        Returns:
        Locale used for Thymeleaf template rendering
      • getUriWithoutExtension

        boolean getUriWithoutExtension()
        Returns:
        Flag indicating if content matching prefix below should be given extension-less URI's
      • getImgPathPrependHost

        boolean getImgPathPrependHost()
        Returns:
        Flag indicating if image paths should be prepended with getSiteHost() value - only has an effect if getImgPathUpdate() is set to true
      • getImgPathUpdate

        boolean getImgPathUpdate()
        Returns:
        Flag indicating if image paths in content should be updated with absolute path (using URI value of content file), see getImgPathUpdate() which allows you to control the absolute path used
      • getVersion

        java.lang.String getVersion()
        Returns:
        Version of JBake
      • setProperty

        void setProperty​(java.lang.String key,
                         java.lang.Object value)
        Set a property value for the given key
        Parameters:
        key - the key for the property
        value - the value of the property
      • getServerContextPath

        java.lang.String getServerContextPath()
      • getServerHostname

        java.lang.String getServerHostname()
      • getAbbreviatedGitHash

        java.lang.String getAbbreviatedGitHash()
        Returns:
        Abbreviated hash of latest git commit
      • getJvmLocale

        java.lang.String getJvmLocale()
        Returns:
        Locale to set in the JVM
      • asHashMap

        java.util.Map<java.lang.String,​java.lang.Object> asHashMap()
      • getJbakeProperties

        java.util.List<Property> getJbakeProperties()
      • addConfiguration

        void addConfiguration​(java.util.Properties properties)