-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign documentation site using Pico and makes a number of small changes to the docs, including some updated content for the homepage
- Loading branch information
1 parent
4a04a2f
commit 3916f83
Showing
24 changed files
with
964 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Blurry Docs | ||
|
||
The documentation site for Blurry. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from selectolax.lexbor import parse_fragment | ||
|
||
|
||
def body_to_cards(html: str): | ||
"""Creates grids of h3s and their contents using <article> tags""" | ||
tree = parse_fragment(html) | ||
is_in_card = False | ||
html = "" | ||
|
||
for index, node in enumerate(tree): | ||
if node.tag == "h2": | ||
if is_in_card: | ||
html += "</article></div>" | ||
is_in_card = False | ||
# The next index is a text node (whitespace), so look two ahead | ||
if tree[index + 2].tag == "h3": | ||
html += node.html or "" | ||
html += '<div class="flex-grid">' | ||
continue | ||
|
||
if node.tag == "h3": | ||
if is_in_card: | ||
html += "</article>" | ||
html += "<article>" | ||
is_in_card = True | ||
|
||
html += node.html or "" | ||
|
||
# This assumes that the Markdown content ends with a card | ||
if node == tree[-1]: | ||
html += "</article></div>" | ||
|
||
return html |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,62 @@ | ||
+++ | ||
"@type" = "WebPage" | ||
"@type" = "WebSite" | ||
name = "Introduction" | ||
abstract = "A Python-powered static site generator with a focus on page speed and SEO." | ||
abstract = "An extensible static site generator with exceptional SEO and page speed." | ||
datePublished = 2023-04-09 | ||
+++ | ||
|
||
# Blurry: A Python-powered static site generator | ||
# Blurry: A static site generator for SEO and page speed | ||
|
||
<p style="text-align: center;"> | ||
<a href="/getting-started/quick-start/" class="right-arrow" role="button" rel="noreferrer">Get Started</a> | ||
</p> | ||
|
||
## What is Blurry? | ||
|
||
Blurry is a static site generator with a terrible pun of a name: if you're generating static sight, you're making things Blurry. | ||
Blurry is a static site generator, like [Hugo](https://gohugo.io) or [Pelican](https://getpelican.com/), with a big pun of a name: if you're generating static sight, you're making things Blurry. | ||
|
||
Blurry brings the concept of schema-first development to static site generators. | ||
Specifically, Blurry uses [Schema.org](https://schema.org/) schema type names as the names for its template files, and schema type properties as Markdown front matter to populate those templates. | ||
If you're looking for a static site generator in Python that's as [easy to customize](./plugins/intro.md) as it is to use, give Blurry a try! | ||
|
||
## Goals | ||
|
||
### SEO performance | ||
### 📈 SEO performance | ||
|
||
Blurry supports [Schema.org](https://schema.org/) and [Open Graph](https://ogp.me/) with zero configuration. | ||
This enables [rich Google results](https://developers.google.com/search/docs/appearance/structured-data/search-gallery) and [link previews](https://www.opengraph.xyz/) out-of-the-box. | ||
|
||
### Page speed | ||
### 🏎️ Page speed | ||
|
||
While using Blurry doesn't guarantee good page speed, it does solve a number of pain points that tend to slow down page loads. | ||
|
||
[Blurry's image handling](../content/images.md) and HTML minification, for instance, can help get you a 100/100 [PageSpeed](https://pagespeed.web.dev/) score if the rest of your site is fast. | ||
|
||
### Minimal configuration | ||
### ⚙ Minimal configuration | ||
|
||
Blurry has sensible defaults so you can spend less time configuring and more time writing. | ||
|
||
Blurry seeks to use sensible defaults so you can spend less time configuring and more time writing. | ||
A viable Blurry configuration file ([`blurry.toml`](./../configuration/blurry.toml.md)) can be as simple as: | ||
A viable [Blurry configuration file](./configuration/blurry.toml.md) can be as simple as: | ||
|
||
```toml | ||
[blurry] | ||
domain = "johnfraney.ca" | ||
``` | ||
|
||
### Semantic HTML | ||
### 🧩 Exensibility | ||
|
||
Blurry supports [plugins](./plugins/intro.md) to make it easy to add functionality for: | ||
|
||
- [Markdown customization](./plugins/write-a-markdown-plugin.md) | ||
- Jinja [filters](./plugins/write-a-jinja-filter-plugin.md) & [extensions](./plugins/write-a-jinja-extension-plugin.md) | ||
- [HTML post-processing](./plugins/write-an-html-plugin.md) | ||
|
||
</article> | ||
|
||
Where applicable, Blurry tries to use semantic HTML elements like `<aside>` over more generic elements like `<div>`. | ||
Using semantic HTML elements also facilities classless CSS styling, which can be useful when styling some Markdown-generated HTML elements, and it can be [good for accessibility](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML), too. | ||
</div> | ||
|
||
## Non-goals | ||
|
||
### "Gotta go fast!" | ||
### 🚄 "Gotta go fast!" | ||
|
||
While Blurry aims to be performant, build performance is not its top priority. | ||
It's written in Python, so it may not be able to compete on speed with other static site generators like [Hugo](https://gohugo.io/). | ||
Instead, it aims to be *fast enough* while taking advantage of the Python ecosystem. | ||
It's written in Python, so it _may_ not be able to compete on speed with other static site generators like [Hugo](https://gohugo.io/). | ||
Instead, it aims to be _fast_enough_ while optimizing for developer and user experience. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.