Sphinx) 이미지에 URL 넣기

2022. 2. 5. 15:51꿀팁 분석 환경 설정/파이썬 개발 팁

728x90

이미지를 클릭하면 URL로 가는 것을 해보고자 한다.

 

일단 _static 폴더를 source안에 만들고 naver logo를 넣어보자.

그 다음에 index.rst에 해당 코드를 추가하자.

|ImageLink|_

.. |ImageLink| image:: /_static/naver.png
.. _ImageLink: https://www.naver.com/

다음 명령어를 통해 반영할 수 있다.

cd docs
make html

 

클릭을 하면 들어가는 확인할 수 있다.

 

 

 

naver logo

https://sublime-and-sphinx-guide.readthedocs.io/en/latest/images.html

 

Add Images — RST | Sphinx | Sublime | GitHub documentation

You add images to reStructured Text with the .. image:: directive: Alt text You should add alternative text for screen readers for each image using the :alt: parameter. Provide text that is useful to someone who might not be able to see the image.

sublime-and-sphinx-guide.readthedocs.io

 

728x90