mirror of
https://github.com/vinta/awesome-python.git
synced 2026-06-10 18:26:17 +00:00
fix: surface sponsorship link in header
This commit is contained in:
parent
32ae78fd96
commit
c0b80fd75f
5 changed files with 9 additions and 1 deletions
|
|
@ -236,7 +236,9 @@ kbd {
|
|||
|
||||
.hero-topbar-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
rel="noopener"
|
||||
>Submit a project</a
|
||||
>
|
||||
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
rel="noopener"
|
||||
>Submit a project</a
|
||||
>
|
||||
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
rel="noopener"
|
||||
>Submit a project</a
|
||||
>
|
||||
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
|
@ -48,7 +49,7 @@
|
|||
>Email sponsorship@awesome-python.com</a
|
||||
>
|
||||
<a
|
||||
href="https://github.com/vinta/awesome-python"
|
||||
href="https://github.com/vinta/awesome-python/blob/master/SPONSORSHIP.md"
|
||||
class="hero-action hero-action-secondary"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
|
|
|
|||
|
|
@ -283,6 +283,7 @@ class TestBuild:
|
|||
assert parser.links_by_rel["canonical"] == "https://awesome-python.com/categories/widgets/"
|
||||
assert parser.meta_by_property["og:url"] == "https://awesome-python.com/categories/widgets/"
|
||||
assert '<link rel="alternate" type="text/plain" href="/llms.txt" title="LLMs text entry point" />' not in category_html
|
||||
assert '<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>' in category_html
|
||||
assert "<h1>Widgets</h1>" in category_html
|
||||
assert 'Widget libraries. Also see <a href="https://example.com/widgets" target="_blank" rel="noopener">awesome-widgets</a>.' in category_html
|
||||
assert 'href="https://example.com/w1"' in category_html
|
||||
|
|
@ -481,6 +482,7 @@ class TestBuild:
|
|||
assert parser.meta_by_name["twitter:description"] == expected_description
|
||||
assert parser.meta_by_name["twitter:image"] == expected_image
|
||||
assert "<head>\n <meta charset" in html
|
||||
assert '<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>' in html
|
||||
assert 'id="hero-category-heading">Browse by category</h2>' in html
|
||||
assert 'class="hero-category-link" href="/categories/ai-and-agents/"' in html
|
||||
|
||||
|
|
@ -750,6 +752,7 @@ class TestBuild:
|
|||
"Sponsorship for awesome-python: tiers, audience, and how to get your product in front of professional Python developers evaluating tools for production use."
|
||||
)
|
||||
assert parser.links_by_rel["canonical"] == "https://awesome-python.com/sponsorship/"
|
||||
assert '<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>' in html
|
||||
|
||||
marker = '<script type="application/ld+json">'
|
||||
start = html.index(marker) + len(marker)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue