Exemplo n.º 1
0
def get_site_human_short_name() -> str:
    """Get the human short name for this site."""
    return config().get('SITE_HUMAN_SHORT_NAME', 'Static')
Exemplo n.º 2
0
def get_pages_path() -> str:
    """Get the absolute path for the site pages directory."""
    return os.path.abspath(
        os.path.join(config().get('BUILD_PATH', './'), 'pages'))
Exemplo n.º 3
0
def get_url_prefix() -> str:
    """Get the URL prefix for this site."""
    return config().get('SITE_URL_PREFIX', '/')
Exemplo n.º 4
0
def get_site_human_name() -> str:
    """Get the human name for this site."""
    return config().get('SITE_HUMAN_NAME', 'arXiv static pages')
Exemplo n.º 5
0
def get_site_name() -> str:
    """Get the name of this site."""
    return config().get('SITE_NAME', 'arxiv')
Exemplo n.º 6
0
def get_static_path() -> str:
    """Get the absolute path for the site static directory."""
    build_path = config().get('BUILD_PATH', './')
    logger.debug('get static path with build path %s, site name %s',
                 build_path, get_site_name())
    return os.path.abspath(os.path.join(build_path, 'static', get_site_name()))
Exemplo n.º 7
0
def _get_static_index_path() -> str:
    """Get the index path from the current application."""
    _name = config().get('INDEX_NAME', 'idx')
    return os.path.join(config()['BUILD_PATH'], f'{_name}_static')
Exemplo n.º 8
0
def _get_index_path() -> str:
    """Get the index path from the current application."""
    return os.path.join(config()['BUILD_PATH'],
                        config().get('INDEX_NAME', 'idx'))
Exemplo n.º 9
0
def get_source_path() -> str:
    """Get the absolute path to the site source."""
    return os.path.abspath(config().get('SOURCE_PATH', './'))