mirror of
https://github.com/LukeHagar/pypistats.dev.git
synced 2025-12-06 04:21:09 +00:00
Update API documentation iframe source and add static HTML file for PyPI Stats API Reference
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<!-- Scalar API Reference iframe -->
|
||||
<div class="rounded-lg border border-gray-800 bg-gray-900 overflow-hidden">
|
||||
<iframe
|
||||
src="https://cdn.jsdelivr.net/npm/@scalar/api-reference/dist/index.html?url=https://pypistats.dev/openapi.yaml"
|
||||
src="/api-docs.html"
|
||||
class="w-full h-[800px] border-0"
|
||||
title="PyPI Stats API Documentation"
|
||||
loading="lazy"
|
||||
|
||||
38
static/api-docs.html
Normal file
38
static/api-docs.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>PyPI Stats API Reference</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
}
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
<!-- Load the Script -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
|
||||
|
||||
<!-- Initialize the Scalar API Reference -->
|
||||
<script>
|
||||
Scalar.createApiReference('#app', {
|
||||
// The URL of the OpenAPI/Swagger document
|
||||
url: 'https://pypistats.dev/openapi.yaml',
|
||||
// Avoid CORS issues
|
||||
proxyUrl: 'https://proxy.scalar.com',
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user