-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add legal page with privacy policy and transparency info #3825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
200d084
c114092
09b9881
9abe18c
fd602e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,7 @@ async def get_sitemap(db: AsyncSession | None = Depends(optional_db)): | |
| '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">', | ||
| " <url><loc>https://pyplots.ai/</loc></url>", | ||
| " <url><loc>https://pyplots.ai/catalog</loc></url>", | ||
| " <url><loc>https://pyplots.ai/legal</loc></url>", | ||
| ] | ||
|
|
||
| # Add spec URLs (overview + all implementations) | ||
|
|
@@ -131,6 +132,19 @@ async def seo_catalog(): | |
| ) | ||
|
|
||
|
|
||
| @router.get("/seo-proxy/legal") | ||
| async def seo_legal(): | ||
| """Bot-optimized legal page with correct og:tags.""" | ||
| return HTMLResponse( | ||
| BOT_HTML_TEMPLATE.format( | ||
| title="Legal | pyplots.ai", | ||
| description="Legal notice, privacy policy, and transparency information for pyplots.ai", | ||
| image=DEFAULT_HOME_IMAGE, | ||
| url="https://pyplots.ai/legal", | ||
| ) | ||
| ) | ||
|
Comment on lines
+135
to
+145
|
||
|
|
||
|
|
||
| @router.get("/seo-proxy/{spec_id}") | ||
| async def seo_spec_overview(spec_id: str, db: AsyncSession | None = Depends(optional_db)): | ||
| """Bot-optimized spec overview page with collage og:image.""" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import Box from '@mui/material/Box'; | ||
| import Link from '@mui/material/Link'; | ||
| import { Link as RouterLink } from 'react-router-dom'; | ||
| import { GITHUB_URL } from '../constants'; | ||
|
|
||
| interface FooterProps { | ||
|
|
@@ -63,6 +64,19 @@ export function Footer({ onTrackEvent, selectedSpec, selectedLibrary }: FooterPr | |
| > | ||
| stats | ||
| </Link> | ||
| <span>·</span> | ||
| <Link | ||
| component={RouterLink} | ||
| to="/legal" | ||
| onClick={() => onTrackEvent?.('internal_link', { destination: 'legal', spec: selectedSpec, library: selectedLibrary })} | ||
| sx={{ | ||
| color: '#9ca3af', | ||
| textDecoration: 'none', | ||
| '&:hover': { color: '#6b7280' }, | ||
| }} | ||
| > | ||
| legal | ||
| </Link> | ||
|
Comment on lines
+68
to
+79
|
||
| </Box> | ||
| </Box> | ||
| ); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of the legal page URL to the sitemap lacks test coverage. The existing tests in tests/unit/api/test_routers.py (test_sitemap_structure and test_sitemap_with_db methods) should be updated to verify that the sitemap includes the legal page URL.