Jake Howard
8506564d89
Increase width hero images are shown at
...
This saves bandwidth, as upscaling them won't reduce quality too much
2023-06-17 12:49:54 +01:00
Jake Howard
e4a8fbd14f
Remove blank line in migrations
...
Keep `black` happy
2023-06-17 12:49:31 +01:00
Jake Howard
2a349d32d3
Reverse order of source tags so they load in the correct order
2023-06-17 12:41:23 +01:00
Jake Howard
583db9382e
Add title to copy URL button
2023-06-14 20:03:38 +01:00
Jake Howard
8ec9256c78
Ensure button links are marked as buttons
2023-06-14 19:19:10 +01:00
Jake Howard
2024aa0ad5
Support more images for hero sizes
2023-06-14 09:13:49 +01:00
Jake Howard
7e57f25d1b
Clean up pagination links
2023-06-13 13:55:57 +01:00
Jake Howard
d6b4397498
Add alt to list item title
2023-06-13 13:45:17 +01:00
Jake Howard
0917e39e40
Use picture tag to support smaller hero image on small screens
2023-06-13 09:31:45 +01:00
Jake Howard
2f396bc158
I made this
2023-06-08 13:52:26 +01:00
Jake Howard
5bd8455c4b
Advertise colour schemes
2023-06-08 13:40:29 +01:00
Jake Howard
64c85d4f9d
Use correct canonical URL syntax
2023-06-08 13:38:24 +01:00
Jake Howard
c2d8ef260a
Add tests for linguist integration
2023-06-04 19:25:38 +01:00
Jake Howard
8f5ab16891
Add display and linguist mapping for postgres
2023-06-04 18:20:21 +01:00
Jake Howard
e0f3ab3311
Hide similar content in preview
2023-06-03 15:27:17 +01:00
Jake Howard
e8cd4f6628
Add tests for post similarity
2023-06-02 17:39:42 +01:00
Jake Howard
b7bcaeff63
Use `alias` instead of annotate for intermediary similarity values
2023-06-02 17:35:20 +01:00
Jake Howard
033b8be859
Cast count to float before dividing
...
`COUNT` returns a `bigint`, which can't be divided into a float
2023-06-02 17:34:10 +01:00
Jake Howard
6ab0ff3fa7
Add similar content based on text Trigram similarity
2023-06-02 15:33:15 +01:00
Jake Howard
5d4c095227
Update shareon to 2.1.0
...
This adds a copy url button, which I'd implemented myself in the past
2023-05-05 13:13:12 +01:00
Jake Howard
32f1360362
Reflow HTML based on updated `djlint`
2023-05-05 13:09:16 +01:00
Jake Howard
a12bbbfe8d
Remove unnecessary type comment
2023-05-05 13:01:04 +01:00
Jake Howard
aeb683fa7a
Back arrow should be on the left
2023-05-05 12:40:22 +01:00
Jake Howard
b620e0edcc
Add search link to 404 page
2023-05-05 12:39:39 +01:00
Jake Howard
d52d532d81
Disable plausible on 404 and page protection pages
2023-05-05 12:29:25 +01:00
Jake Howard
d85065d914
Colour language tag using GitHub's linguist colours
2023-04-21 21:22:59 +01:00
Jake Howard
e504da0bcf
Restyle code block header
...
This looks much nicer, and removes a DB field.
2023-04-19 21:34:38 +01:00
Jake Howard
dde014860a
Unset HttpOnly for CSRF cookie
2023-04-16 16:48:58 +01:00
Jake Howard
bc95a8ea21
Upgrade Django and everything else
2023-04-16 15:56:58 +01:00
Jake Howard
6342726d7c
Change footer settings to generic setting
2023-04-16 15:18:21 +01:00
Jake Howard
8b37b87a92
Don't show share buttons in preview
2023-04-16 15:05:10 +01:00
Jake Howard
fbef7c61b2
Remove what's new banner
2023-04-16 15:04:59 +01:00
Jake Howard
f055517cc1
Update to Wagtail 4.1
2023-04-16 15:04:51 +01:00
Jake Howard
9bc5ccbbdc
Don't include the first tangent in the content HTML
...
This prevents it being used as part of the summary, which in the case of updates looks strange.
2023-04-11 14:05:46 +01:00
Jake Howard
68604e0438
Remove rarely used share platforms and make them all links
...
This means they all get `href`s rather than being buttons with click handlers, making them easier to use.
2023-03-10 16:45:43 +00:00
Jake Howard
8469f1db1f
Don't show comments in preview mode
2023-03-10 16:10:47 +00:00
Jake Howard
83bc0d2ffb
Fix length calculation for posts
...
`smart_split` isn't quite what's needed for splitting words.
2023-03-10 16:08:03 +00:00
Jake Howard
f903dfcc8b
Add redirect URL for mastodon user
2023-03-06 14:32:00 +00:00
Jake Howard
d8a8e7fd8e
Use nginx to serve static files
...
This should keep easy requests out the app event loop, hopefully improving response time
2023-02-21 21:46:26 +00:00
Jake Howard
8969ae369d
Add return types to tests
2022-11-18 08:31:43 +00:00
Jake Howard
37cf309bb0
Add activitypub well-known forwarding
...
Disabled until needed
2022-11-17 22:36:22 +00:00
Jake Howard
d16c8d83f0
Allow setting ALLOWED_HOSTS directly
2022-11-16 14:57:33 +00:00
Jake Howard
6f6e57a0c7
Add enforce host
2022-11-16 14:31:44 +00:00
Jake Howard
66465dafe8
Index tags and boost subtitle
2022-10-31 20:59:24 +00:00
Jake Howard
1e2e488516
Add slashes to API URLs
2022-10-31 20:59:24 +00:00
Jake Howard
66156f2be7
Correctly order LMOTFY endpoint
...
Ordering by "relevance" actually yields the least relevant results first. Remove ordering and assume the most relevant is what's needed.
2022-10-31 20:59:24 +00:00
Jake Howard
0069af1233
Only stick header on desktop
...
On mobile, it takes up a huge amount of the viewport
2022-10-31 14:09:48 +00:00
Jake Howard
5a8116ec22
Fix default CSP
2022-10-31 09:57:49 +00:00
Jake Howard
ccdc3e918e
Add types for permissions policy
2022-10-30 19:35:26 +00:00
Jake Howard
01d78a7378
Add permissions policy
2022-10-30 19:12:26 +00:00
Jake Howard
d809890b0f
Add naive CSP
...
This is a very weak setup so far, as requires some more testing to confirm which origins are allowed for each resource.
2022-10-30 19:09:38 +00:00
Jake Howard
e630ef8856
Allow swagger editor to make CORS requests
2022-10-30 19:00:27 +00:00
Jake Howard
91d022c44c
Bump HSTS to 30 days
2022-10-30 18:56:40 +00:00
Jake Howard
dc02e989e1
Fix number of queries
2022-10-30 13:39:02 +00:00
Jake Howard
1eb14f3fb5
Ensure feed titles reference the full site
2022-10-30 12:53:35 +00:00
Jake Howard
fe3c741347
Construct HTML title in Python
...
Site is cached, and makes it easier to reference elsewhere
2022-10-30 12:53:15 +00:00
Jake Howard
2e4e54418d
Reduce debounce time for search
2022-10-29 16:28:18 +01:00
Jake Howard
0ac4fd1135
Don't fill full width in lightbox
2022-10-29 16:25:51 +01:00
Jake Howard
bb8c40f72e
Use sri_static tag for dark mode
2022-10-29 15:19:58 +01:00
Jake Howard
7ed5255b69
Add cache around navbar and footer
...
Intentionally outside the tag as generating the context does queries
2022-10-29 15:14:39 +01:00
Jake Howard
0e20ad3269
Fix query numbers based on guestbook heading
2022-10-29 15:02:41 +01:00
Jake Howard
b6fa67163f
Only show ToC if there are enough items
2022-10-29 14:57:12 +01:00
Jake Howard
2fbc96946d
Ensure dark mode toggle is always in the corner
2022-10-29 14:50:53 +01:00
Jake Howard
c0ba7bc62e
Add guestbook link
2022-10-29 14:50:01 +01:00
Jake Howard
a031adefda
Add tag list button to post list hero
2022-10-29 13:22:21 +01:00
Jake Howard
394d9028ba
Fix spacing for footer icons
2022-10-24 20:45:07 +01:00
Jake Howard
cb6aed2567
Replace `drf-yasg` with DRF native schema generator
...
I don't need anything advance. Just redirect to the swagger editor for the UI. Makes the app much simpler
2022-10-23 21:30:00 +01:00
Jake Howard
9cfa369d56
Replace tags menu item with dashboard item
2022-10-23 20:30:17 +01:00
Jake Howard
3b02f21f81
Use OOB to set results count and fix jumping when loading pages
...
This correctly centers the pagination spinner, and ensures there's only 1.
2022-10-23 18:52:39 +01:00
Jake Howard
a70f789a8d
Add indicator to search infinite scroll
2022-10-23 18:34:32 +01:00
Jake Howard
0971fcd8a3
Account for spaces after tags when extracting text
2022-10-21 17:46:13 +01:00
Jake Howard
c8f01870d4
Use simpler listing on tag list page
2022-10-21 17:20:58 +01:00
Jake Howard
26fabf3a43
Ensure tags are sorted
2022-10-21 17:11:15 +01:00
Jake Howard
db6dd80385
Remove ToC from blog list page
...
Showing an accurate ToC is complex alongside pagination
2022-10-21 16:56:40 +01:00
Jake Howard
214f10002c
Cache latest blog post
2022-10-21 13:20:22 +01:00
Jake Howard
35579a8803
Remove dedicated fragments cache
...
Reuse the default one to avoid an extra redis connection
2022-10-21 11:40:49 +01:00
Jake Howard
549a48769d
Swap curlylint and djhtml with djlint
2022-10-05 14:17:00 +01:00
Jake Howard
315412ff5d
Remove unused import and update query count
2022-10-05 09:23:58 +01:00
Jake Howard
ee4914324c
Cache fragments for 6 hours
...
They really shouldn't change often
2022-10-04 21:27:53 +01:00
Jake Howard
6a1acd1684
Decrease page size
...
Infinite scroll makes this much easier
2022-10-04 21:17:16 +01:00
Jake Howard
c09669693f
Exclude singleton pages from search results
2022-10-04 21:12:55 +01:00
Jake Howard
b515b6368c
Optimise for cache hits
...
Don't select/prefetch for listing, because we cache the entire listing item. This makes the main query more efficient, thus page loads faster.
2022-10-04 20:49:29 +01:00
Jake Howard
fa85c8ba80
Cache fragments for longer, and clear when editing page
2022-10-04 20:14:26 +01:00
Jake Howard
9096bd4b0b
Fix sizing of content images
2022-10-02 22:38:10 +01:00
Jake Howard
04aa301c75
Add management command to purge caches
2022-10-02 20:47:40 +01:00
Jake Howard
8f66feeaa5
Remove test 404 and 500 paths outside dev
2022-10-02 19:25:36 +01:00
Jake Howard
8844aad247
Disallow API from being indexed
2022-10-02 19:20:40 +01:00
Jake Howard
6d0c25128c
Always disallow wagtail admin
2022-10-02 19:17:33 +01:00
Jake Howard
197f2ea0aa
Move cache handling to views
2022-10-02 18:53:51 +01:00
Jake Howard
1ae3288a73
Store template fragments in separate cache
...
This makes clearing them less expensive
2022-10-02 17:32:32 +01:00
Jake Howard
a2d1aff112
Reduce API page size
2022-10-02 17:28:20 +01:00
Jake Howard
23b8454fe4
Add template caching for listing components
2022-10-02 17:27:55 +01:00
Jake Howard
6775a336e1
Revert "Add the ability to cache model attributes in redis"
...
This reverts commit 7c008c2149
.
2022-10-02 16:17:55 +01:00
Jake Howard
cd48ae7810
Revert "Replace spotify data cache with new cached properties"
...
This reverts commit a3d9fa177e
.
2022-10-02 16:17:49 +01:00
Jake Howard
a3d9fa177e
Replace spotify data cache with new cached properties
...
Also replace the update script with one which will do everything
2022-09-30 09:07:31 +01:00
Jake Howard
7c008c2149
Add the ability to cache model attributes in redis
...
This not only means they persist longer than the instance, but can also be shared between processes. This is especially useful for list pages, as rendering content for summaries etc is quite expensive
2022-09-29 22:59:23 +01:00
Jake Howard
d1523a886b
Use fira-code package with support for font-display
2022-09-29 21:05:19 +01:00
Jake Howard
f2e2719647
Add title to navbar icon links
2022-09-29 20:55:43 +01:00
Jake Howard
e05d2675d5
Add blank alt tag to hero image
2022-09-29 20:55:35 +01:00
Jake Howard
e7037d01b0
Remove stray description tag
2022-09-29 20:42:25 +01:00
Jake Howard
1f5e151314
Ignore more blocks when getting plaintext
2022-09-25 21:54:02 +01:00
Jake Howard
92f1a17b9f
Always show pagination buttons
2022-09-25 21:10:35 +01:00
Jake Howard
ac30206e97
Fix pagination controls showing up
2022-09-25 21:06:43 +01:00
Jake Howard
79c9550ee2
Make sure commento works in dark mode
2022-09-23 17:27:03 +01:00
Jake Howard
dcb8162517
Ensure tags use code font
2022-09-23 16:44:22 +01:00
Jake Howard
e4476e1b2a
Ensure heading ids are always valid ids
2022-09-23 15:36:23 +01:00
Jake Howard
bee03a8e64
Add link to tags list to tags on content details
2022-09-23 08:45:17 +01:00
Jake Howard
4b10ce6f6f
Restyle content details to be icons rather than tags
...
This looks much nicer, and is simpler to work with
2022-09-23 08:34:49 +01:00
Jake Howard
6c481672c4
Improve margin around blog post date headers
2022-09-21 14:18:35 +01:00
Jake Howard
bccc948995
Restructure fields in editor pages
...
Move as much as possible out of the "Content" tab, so that's just about
the actual content
2022-09-21 13:30:06 +01:00
Jake Howard
2d537d3b10
Correctly get language
...
Operator precedence is important
2022-09-21 13:29:57 +01:00
Jake Howard
82701a706c
Show blog list ToC with newest first
2022-09-20 09:54:26 +01:00
Jake Howard
65b36f5b07
Disable workflows in admin
...
I'm the only one using it, so it doesn't really make sense. And disabling it outright can make things perform faster
2022-09-20 09:25:40 +01:00
Jake Howard
e62f9de9fc
Add indexing of unsplash photos
2022-09-20 09:24:00 +01:00
Jake Howard
997da9779c
Link to admin posts list, not the posts page itself
2022-09-19 21:40:40 +01:00
Jake Howard
d5aac8ac50
Don't show header if there's nothing useful to show
2022-09-19 16:34:02 +01:00
Jake Howard
77e34cbf02
Show number of blog posts on admin dashboard
2022-09-15 08:54:23 +01:00
Jake Howard
f3b248110e
Hide updated date when creating unsplash photos
2022-09-15 08:19:22 +01:00
Jake Howard
592da67185
Add blockquote and super/sub scripts to rich text
2022-09-15 08:19:08 +01:00
Jake Howard
fb15c480a3
Add link to full content in iframe block
2022-09-08 20:58:13 +01:00
Jake Howard
c6c913c3e7
Make subtitle more visually distinct from content
2022-09-08 14:42:45 +01:00
Jake Howard
8b027206b1
Add comments and sharing to all content pages
...
Listing pages already have this block overwritten for pagination
controls
2022-09-08 14:37:18 +01:00
Jake Howard
63909a31c0
Add iframe block
2022-09-08 14:31:01 +01:00
Jake Howard
c56cc2f995
Correctly get lexer for language
...
`get_lexer_by_name` doesn't actually get the lexer by its name...
2022-09-07 14:44:39 +01:00
Jake Howard
c7e56ab038
Don't show word count if there isn't one
...
This mostly covers spotify pages, which use a custom reading time but
don't have words.
2022-09-06 09:17:42 +01:00
Jake Howard
71f74251bb
Don't require code header
2022-09-06 08:58:44 +01:00
Jake Howard
b95506d711
Don't load analytics when logged in or preview
2022-09-06 08:24:54 +01:00
Jake Howard
1474131771
Thin fonts on 500 page
2022-09-05 14:29:17 +01:00
Jake Howard
0711288197
Style 500 page
2022-09-05 14:17:48 +01:00
Jake Howard
0a136496f4
Remove caches from base template
...
These components are pretty efficient, and it makes content editing more
annoying.
2022-09-05 13:58:36 +01:00
Jake Howard
c40987c14f
Add healthcheck
2022-09-05 13:35:48 +01:00
Jake Howard
db24bb7e0a
Disable password reset
2022-09-05 13:13:01 +01:00
Jake Howard
8805416807
Disable update check
...
I work for torchbox, i'll notice
2022-09-04 21:10:06 +01:00
Jake Howard
a76b9df329
Fix 404s if there's no resolver match
2022-09-04 18:17:06 +01:00
Jake Howard
f40681d06a
Add caching to listing feeds
2022-09-04 17:34:04 +01:00
Jake Howard
7cd88c9fbd
Just set cache control rather than caching page content
...
This avoids storing tonnes of stuff in the cache, when it doesn't matter
_too_ much
2022-09-04 17:29:04 +01:00
Jake Howard
ddb68f7d43
Ensure media is served by Django
2022-09-04 17:23:41 +01:00
Jake Howard
b167cd4ca4
Set `ALLOWED_HOSTS` correctly based on base hostname
2022-09-04 16:52:05 +01:00
Jake Howard
d93bc2450d
Remove sentry enviornment variable
...
There will be only 1
2022-09-04 16:40:59 +01:00
Jake Howard
e21d525259
Reset migrations
...
During dev I made loads, but I don't need them now
2022-09-04 15:56:51 +01:00
Jake Howard
ee307bcfbf
Define rich text features in settings
...
This removes them from migrations, avoiding the need to create new ones
when they change
2022-09-03 21:07:27 +01:00
Jake Howard
210ad88a2e
Add renditions cache
2022-09-03 17:33:11 +01:00
Jake Howard
a053e27833
Use richtext for subtitle
2022-09-03 17:00:09 +01:00
Jake Howard
6dfbb830ef
Add IE11 deterrent
2022-09-03 16:35:39 +01:00
Jake Howard
eaa5b063f4
Use smaller, PNG image for meta image
...
This ensures it's not too large, but also crawlers are more likely to
support PNG than webp
2022-09-03 16:21:24 +01:00
Jake Howard
be009dcb37
Convert all images to webp
...
It's so much smaller!
2022-09-03 16:15:08 +01:00
Jake Howard
8691d11a15
Only render comments in debug
2022-09-02 17:20:03 +01:00
Jake Howard
7fff13f0ab
Add lightbox for content images
2022-09-02 17:18:40 +01:00
Jake Howard
611e343564
Just use a simple icon field
...
The library has some issues, even if it is great
https://github.com/saschaludwig/django-fontawesome-6/pull/2
2022-09-02 15:29:12 +01:00
Jake Howard
7026aca934
Add account links to footer
...
Putting them in the navbar is too crowded.
2022-09-02 09:28:35 +01:00