Class DefaultJBakeConfiguration

    • Field Detail

      • DEFAULT_TYHMELEAF_TEMPLATE_MODE

        public static final java.lang.String DEFAULT_TYHMELEAF_TEMPLATE_MODE
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultJBakeConfiguration

        @Deprecated
        public DefaultJBakeConfiguration​(org.apache.commons.configuration2.CompositeConfiguration configuration)
        Some deprecated implementations just need access to the configuration without access to the source folder
        Parameters:
        configuration - The project configuration
      • DefaultJBakeConfiguration

        public DefaultJBakeConfiguration​(java.io.File sourceFolder,
                                         org.apache.commons.configuration2.CompositeConfiguration configuration)
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.String key)
        Description copied from interface: JBakeConfiguration
        Get property value by a given key from the configuration
        Specified by:
        get in interface JBakeConfiguration
        Parameters:
        key - a key for the property like site.host
        Returns:
        the value of the property
      • getAsciidoctorAttributes

        public java.util.List<java.lang.String> getAsciidoctorAttributes()
        Specified by:
        getAsciidoctorAttributes in interface JBakeConfiguration
        Returns:
        attributes to be set when processing input
      • getAsciidoctorOption

        public java.util.List<java.lang.String> getAsciidoctorOption​(java.lang.String optionKey)
        Description copied from interface: JBakeConfiguration
        Get an asciidoctor option by it's key
        Specified by:
        getAsciidoctorOption in interface JBakeConfiguration
        Parameters:
        optionKey - an option key
        Returns:
        the value of the option key
      • getAssetFolder

        public java.io.File getAssetFolder()
        Specified by:
        getAssetFolder in interface JBakeConfiguration
        Returns:
        the folder where assets are stored, they are copied directly in output folder and not processed
      • setAssetFolder

        public void setAssetFolder​(java.io.File assetFolder)
      • getAssetIgnoreHidden

        public boolean getAssetIgnoreHidden()
        Specified by:
        getAssetIgnoreHidden in interface JBakeConfiguration
        Returns:
        Flag indicating if hidden asset resources should be ignored
      • setAssetIgnoreHidden

        public void setAssetIgnoreHidden​(boolean assetIgnoreHidden)
      • getBuildTimeStamp

        public java.lang.String getBuildTimeStamp()
        Specified by:
        getBuildTimeStamp in interface JBakeConfiguration
        Returns:
        Timestamp that records when JBake build was made
      • getClearCache

        public boolean getClearCache()
        Specified by:
        getClearCache in interface JBakeConfiguration
        Returns:
        Flag indicating to flash the database cache
      • setClearCache

        public void setClearCache​(boolean clearCache)
      • getCompositeConfiguration

        public org.apache.commons.configuration2.CompositeConfiguration getCompositeConfiguration()
      • setCompositeConfiguration

        public void setCompositeConfiguration​(org.apache.commons.configuration2.CompositeConfiguration configuration)
      • setContentFolder

        public void setContentFolder​(java.io.File contentFolder)
      • getContentFolderName

        public java.lang.String getContentFolderName()
        Specified by:
        getContentFolderName in interface JBakeConfiguration
        Returns:
        name of Folder where content (that's to say files to be transformed) resides in
      • setDataFolder

        public void setDataFolder​(java.io.File dataFolder)
      • getDataFolderName

        public java.lang.String getDataFolderName()
        Specified by:
        getDataFolderName in interface JBakeConfiguration
        Returns:
        name of Folder where data files reside in
      • setDataFileDocType

        public void setDataFileDocType​(java.lang.String dataFileDocType)
      • getDatabasePath

        public java.lang.String getDatabasePath()
        Specified by:
        getDatabasePath in interface JBakeConfiguration
        Returns:
        Folder to store database files in
      • setDatabasePath

        public void setDatabasePath​(java.lang.String path)
      • getDatabaseStore

        public java.lang.String getDatabaseStore()
        Specified by:
        getDatabaseStore in interface JBakeConfiguration
        Returns:
        name to identify if database is kept in memory (memory) or persisted to disk (plocal)
      • setDatabaseStore

        public void setDatabaseStore​(java.lang.String storeType)
      • getDefaultStatus

        public java.lang.String getDefaultStatus()
        Specified by:
        getDefaultStatus in interface JBakeConfiguration
        Returns:
        Default status to use (in order to avoid putting it in all files)
      • setDefaultStatus

        public void setDefaultStatus​(java.lang.String status)
      • getDefaultType

        public java.lang.String getDefaultType()
        Specified by:
        getDefaultType in interface JBakeConfiguration
        Returns:
        Default type to use (in order to avoid putting it in all files)
      • setDefaultType

        public void setDefaultType​(java.lang.String type)
      • getDestinationFolder

        public java.io.File getDestinationFolder()
        Specified by:
        getDestinationFolder in interface JBakeConfiguration
        Returns:
        The destination folder to render and copy files to
      • getDraftSuffix

        public java.lang.String getDraftSuffix()
        Specified by:
        getDraftSuffix in interface JBakeConfiguration
        Returns:
        Suffix used to identify draft files
      • getExampleProjectByType

        public java.lang.String getExampleProjectByType​(java.lang.String templateType)
        Description copied from interface: JBakeConfiguration
        Get name for example project name by given template type
        Specified by:
        getExampleProjectByType in interface JBakeConfiguration
        Parameters:
        templateType - a template type
        Returns:
        example project name
      • getExportAsciidoctorAttributes

        public boolean getExportAsciidoctorAttributes()
        Specified by:
        getExportAsciidoctorAttributes in interface JBakeConfiguration
        Returns:
        Flag indicating if JBake properties should be made available to Asciidoctor
      • getIgnoreFileName

        public java.lang.String getIgnoreFileName()
        Specified by:
        getIgnoreFileName in interface JBakeConfiguration
        Returns:
        Filename to use to ignore a directory in addition to ".jbakeignore"
      • getKeys

        public java.util.Iterator<java.lang.String> getKeys()
        Description copied from interface: JBakeConfiguration
        Get an iterator of available configuration keys
        Specified by:
        getKeys in interface JBakeConfiguration
        Returns:
        an iterator of configuration keys
      • getMarkdownExtensions

        public java.util.List<java.lang.String> getMarkdownExtensions()
        Description copied from interface: JBakeConfiguration
        A list of markdown extensions

        markdown.extension=HARDWRAPS,AUTOLINKS,FENCED_CODE_BLOCKS,DEFINITIONS

        Specified by:
        getMarkdownExtensions in interface JBakeConfiguration
        Returns:
        list of markdown extensions as string
      • setMarkdownExtensions

        public void setMarkdownExtensions​(java.lang.String... extensions)
      • getOutputExtension

        public java.lang.String getOutputExtension()
        Specified by:
        getOutputExtension in interface JBakeConfiguration
        Returns:
        file extension to be used for all output files
      • setOutputExtension

        public void setOutputExtension​(java.lang.String outputExtension)
      • getPaginateIndex

        public boolean getPaginateIndex()
        Specified by:
        getPaginateIndex in interface JBakeConfiguration
        Returns:
        Flag indicating if there should be pagination when rendering index
      • setPaginateIndex

        public void setPaginateIndex​(boolean paginateIndex)
      • setPostsPerPage

        public void setPostsPerPage​(int postsPerPage)
      • getPrefixForUriWithoutExtension

        public java.lang.String getPrefixForUriWithoutExtension()
        Specified by:
        getPrefixForUriWithoutExtension in interface JBakeConfiguration
        Returns:
        URI prefix for content that should be given extension-less output URI's
      • setPrefixForUriWithoutExtension

        public void setPrefixForUriWithoutExtension​(java.lang.String prefix)
      • getRenderArchive

        public boolean getRenderArchive()
        Specified by:
        getRenderArchive in interface JBakeConfiguration
        Returns:
        Flag indicating if archive file should be generated
      • getRenderEncoding

        public java.lang.String getRenderEncoding()
        Specified by:
        getRenderEncoding in interface JBakeConfiguration
        Returns:
        Encoding used when rendering files
      • getOutputEncoding

        public java.lang.String getOutputEncoding()
        Specified by:
        getOutputEncoding in interface JBakeConfiguration
        Returns:
        Output encoding for freemarker url escaping
      • getRenderError404

        public boolean getRenderError404()
        Specified by:
        getRenderError404 in interface JBakeConfiguration
        Returns:
        Flag indicating if error404 file should be generated
      • getRenderFeed

        public boolean getRenderFeed()
        Specified by:
        getRenderFeed in interface JBakeConfiguration
        Returns:
        Flag indicating if feed file should be generated
      • getRenderIndex

        public boolean getRenderIndex()
        Specified by:
        getRenderIndex in interface JBakeConfiguration
        Returns:
        Flag indicating if index file should be generated
      • getRenderSiteMap

        public boolean getRenderSiteMap()
        Specified by:
        getRenderSiteMap in interface JBakeConfiguration
        Returns:
        Flag indicating if sitemap file should be generated
      • getRenderTags

        public boolean getRenderTags()
        Specified by:
        getRenderTags in interface JBakeConfiguration
        Returns:
        Flag indicating if tag files should be generated
      • getRenderTagsIndex

        public boolean getRenderTagsIndex()
        Specified by:
        getRenderTagsIndex in interface JBakeConfiguration
        Returns:
        Flag indicating if tag index file should be generated
      • setRenderTagsIndex

        public void setRenderTagsIndex​(boolean enable)
      • getSanitizeTag

        public boolean getSanitizeTag()
        Specified by:
        getSanitizeTag in interface JBakeConfiguration
        Returns:
        Flag indicating if the tag value should be sanitized
      • setServerPort

        public void setServerPort​(int port)
      • getSiteHost

        public java.lang.String getSiteHost()
        Specified by:
        getSiteHost in interface JBakeConfiguration
        Returns:
        the host url of the site e.g. http://jbake.org
      • setSiteHost

        public void setSiteHost​(java.lang.String siteHost)
      • setSourceFolder

        public void setSourceFolder​(java.io.File sourceFolder)
      • getTemplateEncoding

        public java.lang.String getTemplateEncoding()
        Specified by:
        getTemplateEncoding in interface JBakeConfiguration
        Returns:
        Encoding to be used for template files
      • setTemplateFolder

        public void setTemplateFolder​(java.io.File templateFolder)
      • getTemplateFolderName

        public java.lang.String getTemplateFolderName()
        Specified by:
        getTemplateFolderName in interface JBakeConfiguration
        Returns:
        name of folder where template files are looked for
      • getThymeleafLocale

        public java.lang.String getThymeleafLocale()
        Specified by:
        getThymeleafLocale in interface JBakeConfiguration
        Returns:
        Locale used for Thymeleaf template rendering
      • getUriWithoutExtension

        public boolean getUriWithoutExtension()
        Specified by:
        getUriWithoutExtension in interface JBakeConfiguration
        Returns:
        Flag indicating if content matching prefix below should be given extension-less URI's
      • setUriWithoutExtension

        public void setUriWithoutExtension​(boolean withoutExtension)
      • setDestinationFolderName

        public void setDestinationFolderName​(java.lang.String folderName)
      • setExampleProject

        public void setExampleProject​(java.lang.String type,
                                      java.lang.String fileName)
      • setProperty

        public void setProperty​(java.lang.String key,
                                java.lang.Object value)
        Description copied from interface: JBakeConfiguration
        Set a property value for the given key
        Specified by:
        setProperty in interface JBakeConfiguration
        Parameters:
        key - the key for the property
        value - the value of the property
      • asHashMap

        public java.util.Map<java.lang.String,​java.lang.Object> asHashMap()
        Specified by:
        asHashMap in interface JBakeConfiguration
      • setTemplateExtensionForDocType

        public void setTemplateExtensionForDocType​(java.lang.String docType,
                                                   java.lang.String extension)
      • setTemplateFileNameForDocType

        public void setTemplateFileNameForDocType​(java.lang.String docType,
                                                  java.lang.String fileName)
      • getHeaderSeparator

        public java.lang.String getHeaderSeparator()
        Specified by:
        getHeaderSeparator in interface JBakeConfiguration
        Returns:
        String used to separate the header from the body
      • setHeaderSeparator

        public void setHeaderSeparator​(java.lang.String headerSeparator)
      • setImgPathPrependHost

        public void setImgPathPrependHost​(boolean imgPathPrependHost)
      • setImgPathUPdate

        public void setImgPathUPdate​(boolean imgPathUpdate)
      • getJvmLocale

        public java.lang.String getJvmLocale()
        Specified by:
        getJvmLocale in interface JBakeConfiguration
        Returns:
        Locale to set in the JVM