Replace FastAPI CLI with uvicorn and improve SEO metadata

Updates Dockerfile to use uvicorn directly instead of FastAPI CLI.
Enhances HTML templates with comprehensive SEO metadata including
structured data, Open Graph tags, and KJV-specific keywords throughout
all page titles and descriptions.
This commit is contained in:
2025-05-26 13:25:35 -04:00
parent d61c0fc5a5
commit 10583fc472
6 changed files with 115 additions and 35 deletions
+2 -2
View File
@@ -34,5 +34,5 @@ COPY --from=builder /app/.venv /app/.venv
# Copy application code
COPY . .
# Run the application using FastAPI CLI
CMD ["fastapi", "run", "kjvstudy_org.server:app", "--host", "0.0.0.0", "--port", "8000"]
# Run the application using uvicorn directly
CMD ["uvicorn", "kjvstudy_org.server:app", "--host", "0.0.0.0", "--port", "8000"]
+38 -4
View File
@@ -3,8 +3,42 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}KJV Study - Bible Commentary Platform{% endblock %}</title>
<meta name="description" content="{% block description %}Study the King James Bible with AI-powered commentary and insights{% endblock %}">
<title>{% block title %}Authorized King James Version (KJV) Bible Study - KJV Study{% endblock %}</title>
<meta name="description" content="{% block description %}Study the Authorized King James Version (KJV) Bible with AI-powered commentary and insights. Read the complete KJV Bible online with modern study tools.{% endblock %}">
<meta name="keywords" content="{% block keywords %}Authorized King James Version, KJV Bible, King James Bible, Bible study, Bible commentary, KJV online{% endblock %}">
<meta property="og:title" content="{% block og_title %}{{ self.title() }}{% endblock %}">
<meta property="og:description" content="{% block og_description %}{{ self.description() }}{% endblock %}">
<meta property="og:type" content="{% block og_type %}website{% endblock %}">
<meta property="og:url" content="{{ request.url }}">
<meta property="og:site_name" content="KJV Study - Authorized King James Version Bible">
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{% block twitter_title %}{{ self.title() }}{% endblock %}">
<meta name="twitter:description" content="{% block twitter_description %}{{ self.description() }}{% endblock %}">
<!-- Structured Data for SEO -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "{% block schema_type %}WebSite{% endblock %}",
"name": "KJV Study - Authorized King James Version Bible",
"description": "{{ self.description() }}",
"url": "{{ request.url }}",
"inLanguage": "en-US",
"about": {
"@type": "Book",
"name": "Authorized King James Version Bible",
"alternateName": ["KJV Bible", "King James Bible", "KJV"],
"description": "The Authorized King James Version of the Bible, originally published in 1611",
"inLanguage": "en-US"
},
"publisher": {
"@type": "Organization",
"name": "KJV Study",
"description": "Online Bible study platform for the Authorized King James Version"
}{% block structured_data %}{% endblock %}
}
</script>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
@@ -25,7 +59,7 @@
<meta name="theme-color" content="#4b2e83">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="KJV Study">
<meta name="apple-mobile-web-app-title" content="KJV Bible Study">
<link rel="apple-touch-icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 192 192'%3E%3Crect width='192' height='192' fill='%234b2e83' rx='24'/%3E%3Ctext x='96' y='120' text-anchor='middle' font-size='80' fill='white'%3E📖%3C/text%3E%3C/svg%3E">
{% block head %}{% endblock %}
@@ -46,7 +80,7 @@
<span>📖</span>
KJV Study
</h1>
<p class="sidebar-subtitle">Bible Commentary Platform</p>
<p class="sidebar-subtitle">Authorized King James Version</p>
</div>
<nav class="sidebar-nav">
+30 -5
View File
@@ -1,7 +1,32 @@
{% extends "base.html" %}
{% block title %}{{ book }} - KJV Study{% endblock %}
{% block description %}Study {{ book }} from the King James Bible. Browse all chapters with enhanced readability and navigation.{% endblock %}
{% block title %}{{ book }} - Authorized King James Version (KJV) Bible{% endblock %}
{% block description %}Read {{ book }} from the Authorized King James Version (KJV) Bible. Browse all chapters of {{ book }} with enhanced readability and navigation tools.{% endblock %}
{% block keywords %}{{ book }}, {{ book }} KJV, {{ book }} King James Version, Authorized King James Version, KJV Bible, {{ book }} chapters{% endblock %}
{% block schema_type %}Book{% endblock %}
{% block structured_data %},
"name": "{{ book }} - Authorized King James Version",
"numberOfPages": {{ chapters|length }},
"bookFormat": "EBook",
"inLanguage": "en-US",
"genre": "Religious Text",
"isPartOf": {
"@type": "Book",
"@id": "https://schema.org/Bible",
"name": "Authorized King James Version Bible",
"alternateName": ["KJV Bible", "King James Bible"]
},
"hasPart": [
{% for chapter in chapters %}
{
"@type": "Chapter",
"name": "{{ book }} {{ chapter }}",
"position": {{ chapter }},
"url": "{{ request.url_root }}book/{{ book }}/chapter/{{ chapter }}"
}{% if not loop.last %},{% endif %}
{% endfor %}
]{% endblock %}
{% block breadcrumb %}
<div class="container">
@@ -15,9 +40,9 @@
{% block content %}
<div class="text-center mb-4">
<h1 class="section-title">{{ book }}</h1>
<h1 class="section-title">{{ book }} - Authorized King James Version (KJV)</h1>
<p style="font-size: 1rem; color: var(--text-secondary);">
Select a chapter to begin reading
Select a chapter to begin reading {{ book }} from the KJV Bible
</p>
</div>
@@ -45,7 +70,7 @@
← All Books
</a>
<div style="color: var(--text-muted); font-size: 0.875rem;">
{{ chapters|length }} chapters in {{ book }}
{{ chapters|length }} chapters in {{ book }} (KJV)
</div>
</div>
</div>
+24 -5
View File
@@ -1,7 +1,23 @@
{% extends "base.html" %}
{% block title %}{{ book }} {{ chapter }} - KJV Study{% endblock %}
{% block description %}Read {{ book }} chapter {{ chapter }} from the King James Bible with verse-by-verse display and study tools.{% endblock %}
{% block title %}{{ book }} {{ chapter }} - Authorized King James Version (KJV) Bible{% endblock %}
{% block description %}Read {{ book }} chapter {{ chapter }} from the Authorized King James Version (KJV) Bible with verse-by-verse display and study tools. Complete text of {{ book }} {{ chapter }} KJV.{% endblock %}
{% block keywords %}{{ book }} {{ chapter }}, {{ book }} {{ chapter }} KJV, {{ book }} chapter {{ chapter }} King James Version, Authorized King James Version, KJV Bible, {{ book }} {{ chapter }} verses{% endblock %}
{% block schema_type %}Article{% endblock %}
{% block structured_data %},
"headline": "{{ book }} {{ chapter }} - Authorized King James Version (KJV)",
"articleSection": "{{ book }}",
"text": "{{ verses[0].text[:150] }}...",
"wordCount": {{ verses|length }},
"isPartOf": {
"@type": "Book",
"name": "{{ book }} - Authorized King James Version",
"isPartOf": {
"@type": "Book",
"name": "Authorized King James Version Bible"
}
}{% endblock %}
{% block head %}
<style>
@@ -129,7 +145,7 @@
<div class="chapter-navigation">
<div class="chapter-nav-content">
<div class="chapter-info">
{{ book }} {{ chapter }}
{{ book }} {{ chapter }} (KJV)
</div>
<div class="chapter-controls">
<button onclick="toggleReadingOptions()" class="nav-button" style="padding: 0.5rem 1rem; font-size: 0.875rem;">
@@ -165,6 +181,9 @@
<div class="text-center mb-4">
<h1 class="chapter-title">{{ book }} {{ chapter }}</h1>
<p style="font-size: 1rem; color: var(--text-secondary); margin: 0.5rem 0 0 0; font-style: italic;">
Authorized King James Version (KJV)
</p>
</div>
<div class="verses-container" id="versesContainer">
@@ -193,11 +212,11 @@
</h3>
<p style="color: var(--text-secondary); margin: 0 0 1.5rem; line-height: 1.6;">
Soon you'll see intelligent commentary here, providing historical context,
theological insights, and cross-references for {{ book }} {{ chapter }}.
theological insights, and cross-references for {{ book }} {{ chapter }} from the Authorized King James Version (KJV).
</p>
<div style="padding: 1rem; background: var(--background-color); border-radius: var(--radius-md); border-left: 4px solid var(--primary-color);">
<p style="margin: 0; font-style: italic; color: var(--text-primary);">
"Coming soon: Verse-by-verse analysis, historical context, and study questions powered by AI."
"Coming soon: Verse-by-verse analysis, historical context, and study questions for {{ book }} {{ chapter }} (KJV) powered by AI."
</p>
</div>
</div>
+14 -13
View File
@@ -1,7 +1,8 @@
{% extends "base.html" %}
{% block title %}Error - KJV Study{% endblock %}
{% block description %}An error occurred while loading the requested page.{% endblock %}
{% block title %}Page Not Found - Authorized King James Version (KJV) Bible Study{% endblock %}
{% block description %}The requested KJV Bible page could not be found. Browse the complete Authorized King James Version Bible with study tools and commentary.{% endblock %}
{% block keywords %}KJV Bible, Authorized King James Version, Bible study, page not found, KJV online{% endblock %}
{% block content %}
<div class="text-center">
@@ -15,24 +16,24 @@
<h1 class="page-title">
{% if status_code == 404 %}
Page Not Found
KJV Bible Page Not Found
{% else %}
Error {{ status_code }}
Error {{ status_code }} - KJV Study
{% endif %}
</h1>
<p style="font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2rem;">
{% if status_code == 404 %}
The Bible passage or page you're looking for could not be found.
It may have been moved or the reference might be incorrect.
The Authorized King James Version (KJV) Bible passage or page you're looking for could not be found.
The reference might be incorrect or the page may have been moved.
{% else %}
{{ detail or "An unexpected error occurred while processing your request." }}
{{ detail or "An unexpected error occurred while accessing the KJV Bible study platform." }}
{% endif %}
</p>
<div style="display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;">
<a href="/" class="nav-button nav-button-primary">
📚 Browse All Books
📚 Browse KJV Bible Books
</a>
<button onclick="history.back()" class="nav-button">
← Go Back
@@ -42,20 +43,20 @@
<div class="text-center mt-4" style="padding: 2rem; background: var(--surface-color); border-radius: var(--radius-lg); margin-top: 3rem; border: 1px solid var(--border-light);">
<h3 style="color: var(--primary-color); margin: 0 0 1rem; font-family: var(--font-display);">
📖 Suggested Readings
📖 Popular KJV Bible Passages
</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem;">
<a href="/book/Genesis/chapter/1" class="nav-button" style="text-decoration: none;">
Genesis 1 - Creation
Genesis 1 (KJV) - Creation
</a>
<a href="/book/Psalms/chapter/23" class="nav-button" style="text-decoration: none;">
Psalm 23 - The Shepherd
Psalm 23 (KJV) - The Shepherd
</a>
<a href="/book/John/chapter/3" class="nav-button" style="text-decoration: none;">
John 3 - Born Again
John 3 (KJV) - Born Again
</a>
<a href="/book/Romans/chapter/8" class="nav-button" style="text-decoration: none;">
Romans 8 - No Condemnation
Romans 8 (KJV) - No Condemnation
</a>
</div>
</div>
+7 -6
View File
@@ -1,16 +1,17 @@
{% extends "base.html" %}
{% block title %}KJV Study - Bible Commentary Platform{% endblock %}
{% block description %}Study the King James Bible with AI-powered commentary. Browse all 66 books of the Bible with enhanced readability and modern features.{% endblock %}
{% block title %}Authorized King James Version (KJV) Bible Online - Complete KJV Study{% endblock %}
{% block description %}Read the complete Authorized King James Version (KJV) Bible online. Study all 66 books of the KJV Bible with AI-powered commentary, enhanced readability and modern study tools.{% endblock %}
{% block keywords %}Authorized King James Version, KJV Bible online, King James Bible, KJV study, Bible books, KJV commentary, Bible study tools{% endblock %}
{% block content %}
<div class="text-center mb-4">
<h1 class="page-title">
📖 Study the Bible
📖 Authorized King James Version (KJV) Bible
</h1>
<p style="font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto;">
Explore the complete King James Version with modern tools and AI-powered commentary.
Choose a book below to begin your study.
Study the complete Authorized King James Version (KJV) Bible with modern tools and AI-powered commentary.
Choose a book below to begin your KJV Bible study.
</p>
</div>
@@ -18,7 +19,7 @@
{% for book in books %}
<a href="/book/{{ book }}" class="book-card">
<h3 class="book-title">{{ book }}</h3>
<p class="book-meta">King James Version</p>
<p class="book-meta">Authorized King James Version</p>
</a>
{% endfor %}
</div>