fdoc

subroutinebase_options

subroutine base_options(s, root, options)

The Markdown options of a project.

Arguments

NameTypeIntentAttributesDescription
stype(settings_t)in

the settings

rootcharacter(len=*)in

from the pages to the root of the site

optionstype(markdown_options_t)out

the options

Source

Show the code
subroutine base_options(s, root, options)
    type(settings_t), intent(in) :: s                   !! the settings
    character(len=*), intent(in) :: root                !! from the pages to the root of the site
    type(markdown_options_t), intent(out) :: options    !! the options
    integer :: k
    character(len=:), allocatable :: url

    url = root
    options%aliases = [s%alias, s%external, map_entry_t('url', url), map_entry_t('media', url//'/media'), &
                       map_entry_t('page', url//'/page')]
    options%base_path = s%md_base_dir
    options%resolver => resolve_link
    do k = 1, size(s%md_extensions)
        select case (s%md_extensions(k)%s)
        case ('markdown.extensions.toc', 'toc')
            options%toc = .true.
        case ('markdown.extensions.smarty', 'smarty')
            options%smarty = .true.
        end select
    end do
end subroutine base_options

Graphs

Called by