Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/deploy-mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -26,6 +28,7 @@ jobs:
pip install mkdocs mkdocs-material
pip install mkdocs-video
pip install mkdocs-redirects
pip install mkdocs-git-revision-date-localized-plugin

- name: Build MkDocs site
run: mkdocs build
Expand Down
5 changes: 5 additions & 0 deletions docs/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
User-agent: *

Disallow:

Sitemap: https://docs.bnbchain.org/sitemap.xml
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ markdown_extensions:
plugins:
- search
- mkdocs-video
- git-revision-date-localized:
enable_creation_date: false
fallback_to_build_date: true
- redirects:
redirect_maps:
'docs.md': 'bnb-smart-chain/index.md'
Expand Down
35 changes: 35 additions & 0 deletions overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,41 @@
{% endblock %}
#}

{% block extrahead %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "BNB Chain",
"url": "https://www.bnbchain.org",
"logo": "https://docs.bnbchain.org/assets/logo.svg",
"description": "BNB Chain is a community-driven and decentralized blockchain ecosystem for Web3 dApps",
"sameAs": [
"https://twitter.com/BNBChain",
"https://github.com/bnb-chain",
"https://discord.gg/bnbchain",
"https://t.me/bnbchain"
]
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "BNB Chain Documentation",
"url": "https://docs.bnbchain.org",
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://docs.bnbchain.org/?q={search_term_string}"
},
"query-input": "required name=search_term_string"
}
}
</script>
{% endblock %}

{% block htmltitle %}
{% if page.meta and page.meta.title %}
<title>{{ page.meta.title }}</title>
Expand Down
11 changes: 11 additions & 0 deletions overrides/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for file in pages -%}
{% if not file.page.is_link and (file.page.abs_url or file.page.canonical_url) %}
<url>
<loc>{% if file.page.canonical_url %}{{ file.page.canonical_url|e }}{% else %}{{ file.page.abs_url|e }}{% endif %}</loc>
{% if file.page.meta and file.page.meta.git_revision_date_localized_raw_iso_date %}<lastmod>{{file.page.meta.git_revision_date_localized_raw_iso_date}}</lastmod>{% elif file.page.update_date %}<lastmod>{{file.page.update_date}}</lastmod>{% endif %}
</url>
{%- endif -%}
{% endfor %}
</urlset>
Loading