File: //usr/lib/python3/dist-packages/sphinx/ext/__pycache__/githubpages.cpython-310.pyc
o
$�a� � @ sx d Z ddlZddlZddlmZmZ ddlZddlmZ ddl m
Z
dede
ddfd d
�Zdedeeef fdd�Z
dS )
z�
sphinx.ext.githubpages
~~~~~~~~~~~~~~~~~~~~~~
To publish HTML docs at GitHub Pages, create .nojekyll file.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�Any�Dict)�Sphinx)�BuildEnvironment�app�env�returnc C s� | j jdkrLttj�| j jd�d��� | jj }|rNt
j�|�j
}|rP|�d�sRttj�| j jd�d��}|�|� W d � d S 1 sEw Y d S d S d S d S d S )N�htmlz .nojekyll�wtz
.github.io�CNAME)�builder�format�open�os�path�join�outdir�close�config�html_baseurl�urllib�parse�urlparse�hostname�endswith�write)r r r �domain�f� r �8/usr/lib/python3/dist-packages/sphinx/ext/githubpages.py�create_nojekyll_and_cname s "��r c C s | � dt� tjdd�S )Nzenv-updatedT)�version�parallel_read_safe)�connectr �sphinx�__display_version__)r r r r �setup"