Skip to content

Commit 728666d

Browse files
committed
Siva | add theme override
1 parent db12410 commit 728666d

4 files changed

Lines changed: 101 additions & 1 deletion

File tree

docs/theme/overrides/main.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% extends "base.html" %}
2+
3+
{% block extrahead %}
4+
{% include "partials/meta.html" %}
5+
{{ super() }}
6+
{% endblock %}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{# --- SET VARIABLES --- #}
2+
{% set description = (page.meta.description if page and page.meta else none) or config.site_description %}
3+
{% set title = (page.title if page and page.title else none) or config.site_name %}
4+
{% set raw_keywords = page.meta.keywords if page and page.meta and page.meta.keywords else config.extra.keywords %}
5+
{% if raw_keywords is iterable and raw_keywords is not string %}
6+
{% set keywords = raw_keywords | join(', ') %}
7+
{% else %}
8+
{% set keywords = raw_keywords %}
9+
{% endif %}
10+
11+
<meta name="google-site-verification" content="{{ config.extra.google_site_verification }}" />
12+
<meta name="description" content="{{ description }}">
13+
{% if keywords %}
14+
<meta name="keywords" content="{{ keywords }}">
15+
{% endif %}
16+
17+
{# Open Graph Meta Tags #}
18+
<meta property="og:type" content="website">
19+
<meta property="og:url" content="{{ config.site_url }}/">
20+
<meta property="og:title" content="{{ title }}">
21+
<meta property="og:description" content="{{ description }}">
22+
<meta property="og:image" content="{{ config.extra.og_image }}">
23+
24+
{# Twitter Card Meta Tags #}
25+
<meta property="twitter:card" content="summary_large_image">
26+
<meta property="twitter:url" content="{{ config.site_url }}/">
27+
<meta property="twitter:title" content="{{ title }}">
28+
<meta property="twitter:description" content="{{ description }}">
29+
<meta property="twitter:image" content="{{ config.extra.og_image }}">
30+
31+
{# Robots Meta Tag #}
32+
<meta name="robots" content="index, follow">
33+
34+
{# Structured Data (JSON-LD) #}
35+
<script type="application/ld+json">
36+
{
37+
"@context": "https://schema.org",
38+
"@type": "SoftwareApplication",
39+
"name": "{{ title }}",
40+
"description": "{{ description }}",
41+
"applicationCategory": "DeveloperApplication",
42+
"operatingSystem": "Cross-platform",
43+
"author": {
44+
"@type": "Person",
45+
"name": "{{ config.site_author }}"
46+
},
47+
"programmingLanguage": "Python",
48+
"url": "{{ config.site_url }}",
49+
"codeRepository": "{{ config.repo_url }}"
50+
}
51+
</script>
52+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% if page and page.title %}
2+
{{ page.title }} - {{ config.site_name }}
3+
{% else %}
4+
{{ config.site_name }}
5+
{% endif %}

mkdocs.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ plugins:
2929
merge_init_into_class: true
3030
theme:
3131
name: material
32+
custom_dir: docs/theme/overrides
3233
locale: en
3334
features:
3435
- navigation.top
@@ -45,10 +46,46 @@ markdown_extensions:
4546
base_path: .
4647

4748
extra:
49+
google_site_verification: "ICfb1XMVpLJZcn7JdUoaUsNZ-0D8LH1uztDuFd0VNfM"
50+
og_image: https://raw.githubusercontent.com/ysskrishna/nestedutils/main/media/og.png
51+
keywords:
52+
- nested
53+
- nested-data
54+
- nested-dict
55+
- json-access
56+
- json-utils
57+
- dot-notation
58+
- dot-access
59+
- path-access
60+
- keypath
61+
- deep-get
62+
- deep-set
63+
- deep-access
64+
- deep-delete
65+
- safe-access
66+
- KeyError
67+
- no-keyerror
68+
- key-error-handling
69+
- dictionary
70+
- dict
71+
- list
72+
- json
73+
- config
74+
- dict-utils
75+
- data-utils
76+
- config-utils
77+
- utilities
78+
- utils
79+
- open source
80+
- API reference
81+
- contribution guide
82+
- changelog
83+
- version history
84+
- MIT license
85+
- ysskrishna
4886
social:
4987
- icon: fontawesome/brands/python
5088
link: https://pypi.org/project/nestedutils/
51-
5289
- icon: fontawesome/solid/external-link
5390
link: https://ysskrishna.vercel.app
5491
- icon: fontawesome/brands/github

0 commit comments

Comments
 (0)