Commit graph

28 commits

Author SHA1 Message Date
Matt Baer
40ffb3a5f9 Merge branch 'develop' into chorus 2019-09-10 21:41:28 +02:00
Matt Baer
9256293123
Merge pull request #169 from writeas/future-pins
prevent future posts from showing in pins
2019-09-10 21:37:28 +02:00
Matt Baer
151e996387 Use new isOwner var in tests
With the var there now, this makes the code a bit more readable.
2019-09-10 21:21:45 +02:00
Matt Baer
ca388d6536 Merge branch 'develop' into chorus 2019-09-09 17:26:40 +02:00
Rob Loranger
f241d69425
reduce GetPinnedPosts calls to single line 2019-08-12 14:12:35 -07:00
Rob Loranger
ca957c4b6d
fix missing collection hostname
GetCollections and GetPublishableCollections now take a hostname
parameter to allow setting the collecion hostname.

All collections used in memory now have their hostname set.
2019-08-12 12:35:17 -07:00
Rob Loranger
b373aad298
prevent future posts from showing in pins
this changes GetPinnedPosts to accept an includeFutre bool, which
returns future dated pinned posts when true.
2019-08-12 09:58:30 -07:00
Matt Baer
deec914ccb Merge branch 'develop' into chorus 2019-08-08 07:55:49 -04:00
Matt Baer
adfcc82241
Merge pull request #148 from writeas/default-visibility
Support setting default blog visibility on instance

Resolves T675
2019-08-07 17:44:37 -04:00
Matt Baer
afadf6fdf6 Set default visibility in datastore.CreateCollection
instead of updating it later. This is more correct behavior, prevents an
additional query, and ensures that potential collection-creation when
claiming posts also respects the default (which it didn't before).

Ref T675
2019-08-07 16:20:32 -04:00
Matt Baer
3cc397ad76 Merge branch 'develop' into chorus 2019-08-07 10:58:34 -04:00
Matt Baer
ff7828c558 Link hashtags to Reader when Chorus mode enabled
instead of linking to posts only on a user's blog.

Ref T681
2019-08-07 09:40:07 -04:00
Matt Baer
1a80cd3c02 Add site-wide navigation on colls when chorus = true
This adds a new config value: `chorus` that signifies an instance is
more about the Reader view than individual blogs / writers. When
enabled, user navigation will show on all pages, including About,
Reader, and Privacy (ref T680).

It also uses different collection templates that keep the instance-wide
navigation at the top of the page, instead of the author's name --
again, branded more for the collective than the individual.

Ref T681
2019-08-07 09:00:16 -04:00
Matt Baer
a75b45f060 Support configuring default collection visibility
This adds a new `default_visibility` config value that lets an instance
admin set the visibility of newly created collections.

Ref T675
2019-07-31 22:18:40 -04:00
Matt Baer
4faf41ae7f Log missing hostName in Collection.RedirectingCanonicalURL
This is the crucial part where the hostName is needed for federation and
API clients. This change at least lets us know when we mess up like this
so the issue is easier to catch in the future.
2019-07-22 14:22:41 -04:00
Matt Baer
f38a135bfa Remove global hostName var
This moves `hostName` to the `Collection` struct, where it's needed. The
field is populated after successful `GetCollection...()` calls.

This isn't the cleanest way to do things, but it accomplishes the goal.
Eventually, we should accept the AppCfg to `GetCollection...()` calls,
or make them `App` methods, instead of `datastore` methods.

Ref T613
2019-06-14 18:54:04 -04:00
Matt Baer
a10a4e9a28 Merge branch 'develop' into librarization 2019-06-13 20:39:52 -04:00
Noëlle Anthony
95e84a1d0e Change GetPosts() to have includePinned parameter, change all calls to match 2019-05-28 14:54:56 -04:00
Matt Baer
d8937e89a8 Make App struct public 2019-05-12 17:19:38 -04:00
Matt Baer
c2a7f19ef0 Add numeric avatars 2019-01-07 15:40:37 -05:00
Matt Baer
3ae45bc156 Fix spacing around copyright notices 2018-12-31 01:05:26 -05:00
Matt Baer
1274914207 Add copyright / license notices to .go files 2018-12-24 12:45:15 -05:00
Matt Baer
99a10a2563 Accept different created time on post publish
This helps with post importing and clients that want to support post
scheduling. It also changes how Collection.ForPublic() works, no longer
resetting the ID.

Closes T532
2018-11-18 14:39:50 -05:00
Matt Baer
b58cb1e541 Fix Novel blog post order in feeds and outbox 2018-11-17 21:59:04 -05:00
Matt Baer
561568343a Use avatar as blog link social media image 2018-11-11 15:34:26 -05:00
Matt Baer
6a571950a2 Fix ActivityPub endpoint URLs 2018-11-08 11:26:02 -05:00
Matt Baer
ebeacff43c Add collection handlers, routes, feeds, sitemaps 2018-11-08 01:22:18 -05:00
Matt Baer
0c1e1dd57e Add data layer
This includes config changes, collections, posts, some post rendering
funcs, and actual database connection when the server starts up.
2018-10-16 22:31:27 -04:00