530503d769
Add in-memory cache around linguist data
...
Mostly useful for local development, but should help a little in production too
2023-07-15 17:47:21 +01:00
7bf9956627
Add more attributes to all pages feed
...
With some defensive coding, there's no real reason why not
2023-07-15 17:45:13 +01:00
e9de06338b
Add ellipsis to summary when truncated
2023-07-15 17:43:04 +01:00
29bd939ae4
Replace flake8 and isort with ruff
2023-07-15 15:10:05 +01:00
019e0cf431
Replace humanize with hack around django built-in
2023-07-15 14:52:07 +01:00
062410803d
Add teams and webshare buttons
2023-07-15 14:40:44 +01:00
f90c25d132
Add mastodon verification link
2023-07-03 08:53:25 +01:00
a5d5f828c0
Add images to RSS feed
2023-06-26 14:27:04 +01:00
bc9bdce31d
Remove duplication on content page feed
2023-06-26 13:36:16 +01:00
c2150b66f3
Reduce cache times
...
This means content will be updated faster after changes
2023-06-26 13:26:28 +01:00
0ac02231ad
Add RSS link to navbar
2023-06-21 12:53:37 +01:00
85b1f05f72
Add base feed to all pages
...
This is listed below the page-specific feed, so hopefully that will be detected first
2023-06-21 12:53:37 +01:00
cbd1eb027b
Add "View all" button for similar content
2023-06-21 12:53:37 +01:00
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
e4a8fbd14f
Remove blank line in migrations
...
Keep `black` happy
2023-06-17 12:49:31 +01:00
2a349d32d3
Reverse order of source tags so they load in the correct order
2023-06-17 12:41:23 +01:00
583db9382e
Add title to copy URL button
2023-06-14 20:03:38 +01:00
8ec9256c78
Ensure button links are marked as buttons
2023-06-14 19:19:10 +01:00
2024aa0ad5
Support more images for hero sizes
2023-06-14 09:13:49 +01:00
7e57f25d1b
Clean up pagination links
2023-06-13 13:55:57 +01:00
d6b4397498
Add alt to list item title
2023-06-13 13:45:17 +01:00
0917e39e40
Use picture tag to support smaller hero image on small screens
2023-06-13 09:31:45 +01:00
2f396bc158
I made this
2023-06-08 13:52:26 +01:00
5bd8455c4b
Advertise colour schemes
2023-06-08 13:40:29 +01:00
64c85d4f9d
Use correct canonical URL syntax
2023-06-08 13:38:24 +01:00
c2d8ef260a
Add tests for linguist integration
2023-06-04 19:25:38 +01:00
8f5ab16891
Add display and linguist mapping for postgres
2023-06-04 18:20:21 +01:00
e0f3ab3311
Hide similar content in preview
2023-06-03 15:27:17 +01:00
e8cd4f6628
Add tests for post similarity
2023-06-02 17:39:42 +01:00
b7bcaeff63
Use alias
instead of annotate for intermediary similarity values
2023-06-02 17:35:20 +01:00
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
6ab0ff3fa7
Add similar content based on text Trigram similarity
2023-06-02 15:33:15 +01:00
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
32f1360362
Reflow HTML based on updated djlint
2023-05-05 13:09:16 +01:00
a12bbbfe8d
Remove unnecessary type comment
2023-05-05 13:01:04 +01:00
aeb683fa7a
Back arrow should be on the left
2023-05-05 12:40:22 +01:00
b620e0edcc
Add search link to 404 page
2023-05-05 12:39:39 +01:00
d52d532d81
Disable plausible on 404 and page protection pages
2023-05-05 12:29:25 +01:00
d85065d914
Colour language tag using GitHub's linguist colours
2023-04-21 21:22:59 +01:00
e504da0bcf
Restyle code block header
...
This looks much nicer, and removes a DB field.
2023-04-19 21:34:38 +01:00
dde014860a
Unset HttpOnly for CSRF cookie
2023-04-16 16:48:58 +01:00
bc95a8ea21
Upgrade Django and everything else
2023-04-16 15:56:58 +01:00
6342726d7c
Change footer settings to generic setting
2023-04-16 15:18:21 +01:00
8b37b87a92
Don't show share buttons in preview
2023-04-16 15:05:10 +01:00
fbef7c61b2
Remove what's new banner
2023-04-16 15:04:59 +01:00
f055517cc1
Update to Wagtail 4.1
2023-04-16 15:04:51 +01:00
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
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
8469f1db1f
Don't show comments in preview mode
2023-03-10 16:10:47 +00:00
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
f903dfcc8b
Add redirect URL for mastodon user
2023-03-06 14:32:00 +00:00
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
8969ae369d
Add return types to tests
2022-11-18 08:31:43 +00:00
37cf309bb0
Add activitypub well-known forwarding
...
Disabled until needed
2022-11-17 22:36:22 +00:00
d16c8d83f0
Allow setting ALLOWED_HOSTS directly
2022-11-16 14:57:33 +00:00
6f6e57a0c7
Add enforce host
2022-11-16 14:31:44 +00:00
66465dafe8
Index tags and boost subtitle
2022-10-31 20:59:24 +00:00
1e2e488516
Add slashes to API URLs
2022-10-31 20:59:24 +00:00
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
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
5a8116ec22
Fix default CSP
2022-10-31 09:57:49 +00:00
ccdc3e918e
Add types for permissions policy
2022-10-30 19:35:26 +00:00
01d78a7378
Add permissions policy
2022-10-30 19:12:26 +00:00
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
e630ef8856
Allow swagger editor to make CORS requests
2022-10-30 19:00:27 +00:00
91d022c44c
Bump HSTS to 30 days
2022-10-30 18:56:40 +00:00
dc02e989e1
Fix number of queries
2022-10-30 13:39:02 +00:00
1eb14f3fb5
Ensure feed titles reference the full site
2022-10-30 12:53:35 +00:00
fe3c741347
Construct HTML title in Python
...
Site is cached, and makes it easier to reference elsewhere
2022-10-30 12:53:15 +00:00
2e4e54418d
Reduce debounce time for search
2022-10-29 16:28:18 +01:00
0ac4fd1135
Don't fill full width in lightbox
2022-10-29 16:25:51 +01:00
bb8c40f72e
Use sri_static tag for dark mode
2022-10-29 15:19:58 +01:00
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
0e20ad3269
Fix query numbers based on guestbook heading
2022-10-29 15:02:41 +01:00
b6fa67163f
Only show ToC if there are enough items
2022-10-29 14:57:12 +01:00
2fbc96946d
Ensure dark mode toggle is always in the corner
2022-10-29 14:50:53 +01:00
c0ba7bc62e
Add guestbook link
2022-10-29 14:50:01 +01:00
a031adefda
Add tag list button to post list hero
2022-10-29 13:22:21 +01:00
394d9028ba
Fix spacing for footer icons
2022-10-24 20:45:07 +01:00
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
9cfa369d56
Replace tags menu item with dashboard item
2022-10-23 20:30:17 +01:00
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
a70f789a8d
Add indicator to search infinite scroll
2022-10-23 18:34:32 +01:00
0971fcd8a3
Account for spaces after tags when extracting text
2022-10-21 17:46:13 +01:00
c8f01870d4
Use simpler listing on tag list page
2022-10-21 17:20:58 +01:00
26fabf3a43
Ensure tags are sorted
2022-10-21 17:11:15 +01:00
db6dd80385
Remove ToC from blog list page
...
Showing an accurate ToC is complex alongside pagination
2022-10-21 16:56:40 +01:00
214f10002c
Cache latest blog post
2022-10-21 13:20:22 +01:00
35579a8803
Remove dedicated fragments cache
...
Reuse the default one to avoid an extra redis connection
2022-10-21 11:40:49 +01:00
549a48769d
Swap curlylint and djhtml with djlint
2022-10-05 14:17:00 +01:00
315412ff5d
Remove unused import and update query count
2022-10-05 09:23:58 +01:00
ee4914324c
Cache fragments for 6 hours
...
They really shouldn't change often
2022-10-04 21:27:53 +01:00
6a1acd1684
Decrease page size
...
Infinite scroll makes this much easier
2022-10-04 21:17:16 +01:00
c09669693f
Exclude singleton pages from search results
2022-10-04 21:12:55 +01:00
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
fa85c8ba80
Cache fragments for longer, and clear when editing page
2022-10-04 20:14:26 +01:00
9096bd4b0b
Fix sizing of content images
2022-10-02 22:38:10 +01:00
04aa301c75
Add management command to purge caches
2022-10-02 20:47:40 +01:00
8f66feeaa5
Remove test 404 and 500 paths outside dev
2022-10-02 19:25:36 +01:00
8844aad247
Disallow API from being indexed
2022-10-02 19:20:40 +01:00
6d0c25128c
Always disallow wagtail admin
2022-10-02 19:17:33 +01:00
197f2ea0aa
Move cache handling to views
2022-10-02 18:53:51 +01:00
1ae3288a73
Store template fragments in separate cache
...
This makes clearing them less expensive
2022-10-02 17:32:32 +01:00
a2d1aff112
Reduce API page size
2022-10-02 17:28:20 +01:00
23b8454fe4
Add template caching for listing components
2022-10-02 17:27:55 +01:00
6775a336e1
Revert "Add the ability to cache model attributes in redis"
...
This reverts commit 7c008c2149
.
2022-10-02 16:17:55 +01:00
cd48ae7810
Revert "Replace spotify data cache with new cached properties"
...
This reverts commit a3d9fa177e
.
2022-10-02 16:17:49 +01:00
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
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
d1523a886b
Use fira-code package with support for font-display
2022-09-29 21:05:19 +01:00
f2e2719647
Add title to navbar icon links
2022-09-29 20:55:43 +01:00
e05d2675d5
Add blank alt tag to hero image
2022-09-29 20:55:35 +01:00
e7037d01b0
Remove stray description tag
2022-09-29 20:42:25 +01:00
1f5e151314
Ignore more blocks when getting plaintext
2022-09-25 21:54:02 +01:00
92f1a17b9f
Always show pagination buttons
2022-09-25 21:10:35 +01:00
ac30206e97
Fix pagination controls showing up
2022-09-25 21:06:43 +01:00
79c9550ee2
Make sure commento works in dark mode
2022-09-23 17:27:03 +01:00
dcb8162517
Ensure tags use code font
2022-09-23 16:44:22 +01:00
e4476e1b2a
Ensure heading ids are always valid ids
2022-09-23 15:36:23 +01:00
bee03a8e64
Add link to tags list to tags on content details
2022-09-23 08:45:17 +01:00
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
6c481672c4
Improve margin around blog post date headers
2022-09-21 14:18:35 +01:00
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
2d537d3b10
Correctly get language
...
Operator precedence is important
2022-09-21 13:29:57 +01:00
82701a706c
Show blog list ToC with newest first
2022-09-20 09:54:26 +01:00
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
e62f9de9fc
Add indexing of unsplash photos
2022-09-20 09:24:00 +01:00
997da9779c
Link to admin posts list, not the posts page itself
2022-09-19 21:40:40 +01:00
d5aac8ac50
Don't show header if there's nothing useful to show
2022-09-19 16:34:02 +01:00
77e34cbf02
Show number of blog posts on admin dashboard
2022-09-15 08:54:23 +01:00
f3b248110e
Hide updated date when creating unsplash photos
2022-09-15 08:19:22 +01:00
592da67185
Add blockquote and super/sub scripts to rich text
2022-09-15 08:19:08 +01:00
fb15c480a3
Add link to full content in iframe block
2022-09-08 20:58:13 +01:00
c6c913c3e7
Make subtitle more visually distinct from content
2022-09-08 14:42:45 +01:00
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
63909a31c0
Add iframe block
2022-09-08 14:31:01 +01:00
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
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
71f74251bb
Don't require code header
2022-09-06 08:58:44 +01:00
b95506d711
Don't load analytics when logged in or preview
2022-09-06 08:24:54 +01:00
1474131771
Thin fonts on 500 page
2022-09-05 14:29:17 +01:00
0711288197
Style 500 page
2022-09-05 14:17:48 +01:00
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
c40987c14f
Add healthcheck
2022-09-05 13:35:48 +01:00
db24bb7e0a
Disable password reset
2022-09-05 13:13:01 +01:00
8805416807
Disable update check
...
I work for torchbox, i'll notice
2022-09-04 21:10:06 +01:00
a76b9df329
Fix 404s if there's no resolver match
2022-09-04 18:17:06 +01:00
f40681d06a
Add caching to listing feeds
2022-09-04 17:34:04 +01:00
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
ddb68f7d43
Ensure media is served by Django
2022-09-04 17:23:41 +01:00