Commit Graph

87 Commits

Author SHA1 Message Date
fiatjaf
ebeb9820d8 move redirectors, renderRelay and renderProfile out of render. 2023-10-21 14:10:08 -03:00
fiatjaf
901b2b5d62 tmpl migration: profile.html 2023-10-21 11:47:28 -03:00
fiatjaf
6aa1440b05 tmpl migration: note.html 2023-10-21 07:45:44 -03:00
fiatjaf
bc947e29d8 mass tmpl migration: partials, other.html and archive.html. 2023-10-21 00:47:19 -03:00
fiatjaf
7293103fc7 first step in the migration to templ. 2023-10-19 21:11:26 -03:00
fiatjaf
95d348ef07 revert "strip image and video urls from text if they are at the end of content."
this reverts commit 93c40648c0.

we need saner code before we can do these kinds of tweaks, I don't know if this would break something.
2023-10-17 07:10:57 -03:00
fiatjaf
93c40648c0 strip image and video urls from text if they are at the end of content. 2023-10-16 07:54:23 -03:00
fiatjaf
6f9d9f2267 trim spaces from titleized descriptions. 2023-10-13 21:56:27 -03:00
fiatjaf
75189d8bec querystring helper for debugging image generation. 2023-10-10 09:35:47 -03:00
fiatjaf
637cfa55e9 make "s" (Settings) a global template function so we don't have to pass it around everywhere. 2023-10-07 08:20:10 -03:00
fiatjaf
4f3141f66a fetch seenOn relays for individual events. 2023-10-02 15:17:39 -03:00
fiatjaf
208506ff16 move grabData() into a separate file. 2023-09-24 15:39:03 -03:00
fiatjaf
475b614653 oembed discovery. 2023-09-24 14:12:10 -03:00
fiatjaf
892065339d fix grabData() bug with npub codes being trimmed. 2023-09-24 13:58:03 -03:00
fiatjaf
a082efc45d delete explicit mentions to njump.me and use s.CanonicalHost 2023-09-24 13:57:42 -03:00
fiatjaf
9a5f20bad2 abstract grabData() function in render.go 2023-09-23 22:16:36 -03:00
fiatjaf
0a9b9ce1d3 use content with names replaced in as the title. 2023-09-23 12:24:03 -03:00
fiatjaf
06cbbff096 replace nostr user references with names in meta description. 2023-09-22 18:03:59 -03:00
fiatjaf
112e204133 refactor regexes for HTML replacing stuff so another telegram instant view bug is fixed.
now with images inside blockquotes (from quoted events).
2023-09-21 14:55:43 -03:00
fiatjaf
24a104fd56 no-cache telegram instant view responses. 2023-09-21 09:39:31 -03:00
Daniele Tonon
3b828797b8 Fix missing code in 8ab0cfca 2023-09-20 12:53:53 +02:00
Daniele Tonon
8ab0cfca8c Update last notes design + add npub to relays list 2023-09-20 00:50:52 +02:00
fiatjaf
55479e3523 replacing npub/nprofile references with username on rendered images, line length fixes for quotes and preceding quotes with a space -- along with some small refactors. 2023-09-19 01:35:32 -03:00
Daniele Tonon
563920a44e Fixed a bug in using renderingInlineMentions 2023-09-18 08:43:06 +02:00
fiatjaf
b0bda60577 improve and fix telegram instant preview for markdown articles. 2023-09-14 10:31:38 -03:00
fiatjaf
3775841ca0 enforce kind when loading naddr with a specified kind. 2023-09-14 08:01:55 -03:00
fiatjaf
769e06554b make instant view happen when there is video or image and the note is big enough. 2023-09-13 21:41:22 -03:00
fiatjaf
700d12eb27 fix titleize() 2023-09-13 21:26:39 -03:00
fiatjaf
daf83b136c bring back pretty JSON. 2023-09-13 21:13:37 -03:00
fiatjaf
7291dd4bed telegram instant preview when a note is very big. 2023-09-13 20:49:24 -03:00
Daniele Tonon
67599a696f Add homepage 2023-09-11 07:48:38 +02:00
Daniele Tonon
a20dcee2e9 Enable custom canonical via ENV 2023-09-06 14:03:53 +02:00
Daniele Tonon
5fd9b7ca59 Filter out excludedRelays from profile relays 2023-08-07 16:28:40 +02:00
Daniele Tonon
6a1ac7a302 Lower Cache-Control values 2023-08-04 15:56:10 +02:00
Daniele Tonon
2fcf17aa1d Set Cache-Control to 60s on failed fetch
This way we can permit a fast retry while keeping some control on DoS attacks
2023-08-04 15:40:30 +02:00
Daniele Tonon
ecd5d0c173 Set Cache-Control only when the data has been correctly fetched 2023-08-04 00:32:22 +02:00
Daniele Tonon
52b936493a Optimize note1 redirect 2023-07-31 15:10:04 +02:00
Daniele Tonon
11652301bd Increase last notes and move up details for more visibility 2023-07-27 23:54:13 +02:00
fiatjaf
4e587cf186 relay pages at /r/... and nip05 pages at /p/... 2023-07-27 13:00:52 -03:00
Daniele Tonon
d8fee0b4aa Remove not working inline build directive 2023-07-14 18:54:02 +02:00
Daniele Tonon
197ef89e3e Avoid caching empty reply/note lists 2023-07-14 14:46:32 +02:00
Daniele Tonon
df83b221a4 Include relays in the profile 2023-07-14 11:09:14 +02:00
Daniele Tonon
0c80007141 Use TrimPrefix instead of Replace 2023-07-13 21:56:20 +02:00
Daniele Tonon
4e2f485466 Fix the protocol handling on the relay pages 2023-07-13 15:39:08 +02:00
Daniele Tonon
582093503b Migrate from note to nevent 2023-07-13 15:00:25 +02:00
Daniele Tonon
2ea209c1ca Use note entity in the sitemap 2023-07-13 11:19:49 +02:00
Daniele Tonon
c32362e220 Add initial support to profile sitamaps 2023-07-12 23:27:10 +02:00
Daniele Tonon
0cad5a662a Disable cache-control header on nocache tag 2023-07-12 22:11:21 +02:00
fiatjaf
c0cbb3c27c disable cache at build time.
using build tag `nocache` to disable usage of the disk cache entirely.
2023-07-12 14:22:34 -03:00
fiatjaf
4b8f75e375 cache relays from nip65. 2023-07-12 10:53:32 -03:00