mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-22 23:37:43 +08:00
docs(API): link api pages to source code header files (#9456)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{% extends "furo/components/view-this-page.html" %}
|
||||
{% from "basic-ng/components/view-this-page.html" import determine_page_view_link with context %}
|
||||
|
||||
{#- Only this block is redefined (overridden) from furo/components/view-this-page.html.
|
||||
All else remains intact. -#}
|
||||
{% block link_available -%}
|
||||
{#- Ensure `page_source_suffix` exists, else `determine_page_view_link()` fails. -#}
|
||||
{%- if page_source_suffix -%}
|
||||
{%- set page_link = determine_page_view_link() -%}
|
||||
{%- if "docs/src/API/" in page_link -%}
|
||||
{#- Adjust page_link from fictional API pages to point to real .h files. -#}
|
||||
{%- set page_link = page_link.replace("docs/src/API/", "src/") -%}
|
||||
{%- set page_link = page_link.replace("_h.rst", ".h") -%}
|
||||
{%- set page_link = page_link.replace("?plain=true", "") -%}
|
||||
{%- endif -%}
|
||||
{{ furo_view_button(page_link) }}
|
||||
{%- endif -%}
|
||||
{%- endblock %}
|
||||
Reference in New Issue
Block a user