Skip to content

Commit 70b1332

Browse files
Merge pull request #160 from alexanderthclark/metadata
metadata updates
2 parents 6261977 + 4a9030a commit 70b1332

6 files changed

Lines changed: 283 additions & 3 deletions

File tree

docs/_static/custom.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,4 +537,65 @@ button[title*="theme"],
537537
.bd-header .theme-toggle,
538538
.pst-navbar-icon {
539539
display: none !important;
540+
}
541+
542+
/* Performance optimizations */
543+
img {
544+
loading: lazy; /* Lazy load images for better performance */
545+
}
546+
547+
/* Optimize font loading */
548+
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@400;500;600;700&display=swap');
549+
550+
/* Critical CSS optimization - ensure above-the-fold content renders quickly */
551+
.bd-header, .bd-sidebar-primary, .hero-section {
552+
contain: layout style paint;
553+
}
554+
555+
/* Optimize scrolling performance */
556+
.bd-sidebar-primary {
557+
will-change: scroll-position;
558+
transform: translateZ(0); /* Force hardware acceleration */
559+
}
560+
561+
/* Reduce paint operations */
562+
.feature-card, .admonition {
563+
will-change: transform;
564+
backface-visibility: hidden;
565+
}
566+
567+
/* Optimize animations */
568+
.feature-card:hover {
569+
transform: translate3d(0, -2px, 0); /* Use 3D transforms for GPU acceleration */
570+
}
571+
572+
/* SEO improvements for accessibility and screen readers */
573+
.sr-only {
574+
position: absolute;
575+
width: 1px;
576+
height: 1px;
577+
padding: 0;
578+
margin: -1px;
579+
overflow: hidden;
580+
clip: rect(0, 0, 0, 0);
581+
white-space: nowrap;
582+
border: 0;
583+
}
584+
585+
/* Skip link for accessibility and SEO */
586+
.skip-link {
587+
position: absolute;
588+
top: -40px;
589+
left: 6px;
590+
background: var(--freeride-primary);
591+
color: white;
592+
padding: 8px;
593+
text-decoration: none;
594+
border-radius: 4px;
595+
z-index: 1000;
596+
transition: top 0.3s;
597+
}
598+
599+
.skip-link:focus {
600+
top: 6px;
540601
}

docs/_static/robots.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
User-agent: *
2+
Allow: /
3+
4+
# Sitemap location
5+
Sitemap: https://alexanderthclark.github.io/FreeRide/sitemap.xml
6+
7+
# Disallow crawling of internal Sphinx files
8+
Disallow: /_sources/
9+
Disallow: /_static/
10+
Disallow: /searchindex.js
11+
Disallow: /objects.inv
12+
13+
# Allow important static assets
14+
Allow: /_static/*.css
15+
Allow: /_static/*.js
16+
Allow: /_static/*.png
17+
Allow: /_static/*.svg
18+
Allow: /_static/*.jpg
19+
Allow: /_static/*.jpeg
20+
21+
# Crawl delay to be respectful
22+
Crawl-delay: 1
23+
24+
# Specific instructions for Google
25+
User-agent: Googlebot
26+
Allow: /
27+
Crawl-delay: 1
28+
29+
# Specific instructions for Bing
30+
User-agent: Bingbot
31+
Allow: /
32+
Crawl-delay: 1

docs/_templates/layout.html

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{% extends "!layout.html" %}
2+
3+
{%- block extrahead %}
4+
{{ super() }}
5+
6+
<!-- Schema.org structured data for search engines -->
7+
<script type="application/ld+json">
8+
{
9+
"@context": "https://schema.org",
10+
"@type": "SoftwareApplication",
11+
"name": "FreeRide",
12+
"alternateName": "FreeRide Economics Package",
13+
"description": "Python package for introductory microeconomics education featuring supply/demand curves, market equilibrium analysis, game theory, and policy interventions.",
14+
"url": "https://alexanderthclark.github.io/FreeRide/",
15+
"downloadUrl": "https://pypi.org/project/freeride/",
16+
"softwareVersion": "{{ release }}",
17+
"applicationCategory": "EducationalApplication",
18+
"operatingSystem": "Cross-platform",
19+
"programmingLanguage": "Python",
20+
"license": "https://opensource.org/licenses/MIT",
21+
"author": {
22+
"@type": "Person",
23+
"name": "Alexander Clark"
24+
},
25+
"creator": {
26+
"@type": "Person",
27+
"name": "Alexander Clark"
28+
},
29+
"maintainer": {
30+
"@type": "Person",
31+
"name": "Alexander Clark"
32+
},
33+
"publisher": {
34+
"@type": "Person",
35+
"name": "Alexander Clark"
36+
},
37+
"keywords": ["microeconomics", "economics education", "python package", "supply and demand", "market equilibrium", "game theory", "monopoly analysis", "policy analysis", "undergraduate economics", "Econ 101", "economic modeling", "educational software"],
38+
"audience": {
39+
"@type": "Audience",
40+
"audienceType": ["Students", "Educators", "Researchers"]
41+
},
42+
"educationalLevel": "Undergraduate",
43+
"learningResourceType": "Software",
44+
"inLanguage": "en",
45+
"offers": {
46+
"@type": "Offer",
47+
"price": "0",
48+
"priceCurrency": "USD"
49+
},
50+
"codeRepository": "https://github.com/alexanderthclark/FreeRide",
51+
"softwareRequirements": "Python 3.8+, NumPy, Matplotlib, IPython",
52+
"featureList": [
53+
"Supply and demand curve creation",
54+
"Market equilibrium analysis",
55+
"Consumer and producer surplus calculation",
56+
"Policy intervention modeling (taxes, subsidies, price controls)",
57+
"Game theory and Nash equilibrium computation",
58+
"Monopoly analysis and profit maximization",
59+
"Beautiful economic visualizations",
60+
"LaTeX math rendering in Jupyter notebooks"
61+
],
62+
"screenshot": "https://alexanderthclark.github.io/FreeRide/_static/freeride-banner.png",
63+
"thumbnailUrl": "https://alexanderthclark.github.io/FreeRide/_static/logo.svg"
64+
}
65+
</script>
66+
67+
<!-- Additional microdata for educational content -->
68+
<script type="application/ld+json">
69+
{
70+
"@context": "https://schema.org",
71+
"@type": "Course",
72+
"name": "FreeRide Documentation - Microeconomics with Python",
73+
"description": "Comprehensive tutorials and documentation for learning microeconomics concepts through Python programming using the FreeRide package.",
74+
"provider": {
75+
"@type": "Person",
76+
"name": "Alexander Clark"
77+
},
78+
"url": "https://alexanderthclark.github.io/FreeRide/",
79+
"courseCode": "Economics-Python",
80+
"educationalLevel": "Undergraduate",
81+
"inLanguage": "en",
82+
"teaches": [
83+
"Supply and demand analysis",
84+
"Market equilibrium computation",
85+
"Consumer and producer surplus",
86+
"Policy intervention effects",
87+
"Game theory basics",
88+
"Monopoly analysis",
89+
"Economic data visualization"
90+
],
91+
"audience": {
92+
"@type": "EducationalAudience",
93+
"educationalRole": "student"
94+
}
95+
}
96+
</script>
97+
98+
<!-- Preconnect to external domains for performance -->
99+
<link rel="preconnect" href="https://fonts.googleapis.com">
100+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
101+
<link rel="preconnect" href="https://cdn.jsdelivr.net">
102+
103+
<!-- DNS prefetch for external resources -->
104+
<link rel="dns-prefetch" href="//github.com">
105+
<link rel="dns-prefetch" href="//pypi.org">
106+
107+
{%- endblock extrahead %}

docs/conf.py

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ def get_version():
3333
'sphinx.ext.autodoc', # Generate docs from docstrings
3434
'sphinx.ext.napoleon', # Support for NumPy and Google style docstrings
3535
'sphinx.ext.mathjax',
36-
'myst_parser'
36+
'myst_parser',
37+
'sphinx.ext.viewcode', # Add source code links
38+
'sphinx.ext.githubpages', # GitHub Pages optimization
39+
'sphinx_sitemap', # Generate sitemap.xml for SEO
40+
'sphinxext.opengraph', # OpenGraph meta tags for social sharing
41+
'sphinx_copybutton', # Copy button for code blocks (UX improvement)
3742
]
3843

3944
source_suffix = ['.rst', '.md']
@@ -102,3 +107,43 @@ def get_version():
102107

103108
# Favicon
104109
html_favicon = "_static/favicon.svg"
110+
111+
# -- SEO Configuration -------------------------------------------------------
112+
113+
# Sitemap configuration
114+
sitemap_url_scheme = "{link}"
115+
html_baseurl = "https://alexanderthclark.github.io/FreeRide/"
116+
117+
# OpenGraph configuration for social media sharing
118+
ogp_site_url = "https://alexanderthclark.github.io/FreeRide/"
119+
ogp_site_name = "FreeRide - Python Package for Microeconomics Education"
120+
ogp_description_length = 160
121+
ogp_type = "website"
122+
ogp_image = "https://alexanderthclark.github.io/FreeRide/_static/freeride-banner.png"
123+
ogp_image_alt = "FreeRide Economics Package Banner"
124+
125+
# Additional HTML meta tags for SEO
126+
html_meta = {
127+
'description': 'FreeRide: Python package for introductory microeconomics education. Create supply/demand curves, analyze market equilibrium, model game theory, and visualize economic concepts.',
128+
'keywords': 'microeconomics, economics education, python package, supply and demand, market equilibrium, game theory, monopoly analysis, policy analysis, economics python, undergraduate economics, Econ 101, economic modeling, educational software',
129+
'author': 'Alexander Clark',
130+
'robots': 'index, follow',
131+
'googlebot': 'index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1',
132+
'viewport': 'width=device-width, initial-scale=1.0',
133+
'theme-color': '#1a2332',
134+
'msapplication-TileColor': '#1a2332',
135+
'apple-mobile-web-app-capable': 'yes',
136+
'apple-mobile-web-app-status-bar-style': 'default',
137+
}
138+
139+
# Copy button configuration
140+
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
141+
copybutton_prompt_is_regexp = True
142+
copybutton_remove_prompts = True
143+
144+
# Language and locale for better SEO
145+
language = 'en'
146+
html_search_language = 'en'
147+
148+
# Last updated information
149+
html_last_updated_fmt = '%Y-%m-%d'

docs/docs-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
sphinx
22
myst-parser
33
sphinx-book-theme
4+
sphinx-sitemap
5+
sphinxext-opengraph
6+
sphinx-copybutton

setup.py

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,46 @@ def get_version():
1212
setuptools.setup(
1313
name='freeride',
1414
version=get_version(),
15-
description='A package for undergraduate microeconomics.',
15+
description='Python package for introductory microeconomics education: supply/demand curves, market equilibrium, game theory, and policy analysis.',
1616
long_description=long_description,
1717
long_description_content_type="text/markdown",
1818
url='https://github.com/alexanderthclark/FreeRide',
19+
project_urls={
20+
"Documentation": "https://alexanderthclark.github.io/FreeRide/",
21+
"Source Code": "https://github.com/alexanderthclark/FreeRide",
22+
"Bug Tracker": "https://github.com/alexanderthclark/FreeRide/issues",
23+
"Tutorials": "https://alexanderthclark.github.io/FreeRide/tutorials/quickstart.html",
24+
},
1925
author='Alexander Clark',
20-
install_requires=['matplotlib', 'numpy', 'IPython', 'bokeh'],
2126
author_email='',
27+
maintainer='Alexander Clark',
28+
license='MIT',
29+
install_requires=['matplotlib', 'numpy', 'IPython', 'bokeh'],
2230
packages=setuptools.find_packages(),
2331
python_requires='>=3.8',
2432
zip_safe=False,
33+
classifiers=[
34+
"Development Status :: 4 - Beta",
35+
"Intended Audience :: Education",
36+
"Intended Audience :: Science/Research",
37+
"Topic :: Education",
38+
"Topic :: Scientific/Engineering",
39+
"Topic :: Scientific/Engineering :: Information Analysis",
40+
"Topic :: Scientific/Engineering :: Visualization",
41+
"License :: OSI Approved :: MIT License",
42+
"Programming Language :: Python :: 3",
43+
"Programming Language :: Python :: 3.8",
44+
"Programming Language :: Python :: 3.9",
45+
"Programming Language :: Python :: 3.10",
46+
"Programming Language :: Python :: 3.11",
47+
"Programming Language :: Python :: 3.12",
48+
"Operating System :: OS Independent",
49+
"Natural Language :: English",
50+
],
51+
keywords=[
52+
"microeconomics", "economics", "education", "supply-demand",
53+
"market-equilibrium", "game-theory", "monopoly", "policy-analysis",
54+
"economics-education", "undergraduate", "econ-101", "economic-modeling",
55+
"visualization", "matplotlib", "jupyter", "teaching", "learning"
56+
],
2557
)

0 commit comments

Comments
 (0)