Commit Graph

504 Commits

Author SHA1 Message Date
Matt Baer 94b8fa7756
Merge pull request #171 from writeas/empty-coll-host
fix missing collection hostname
2019-09-09 14:04:05 +02:00
Matt Baer 811a0a3cfb
Merge pull request #179 from writeas/fix-pad-edit
set a default pad tempate on all pad renders
2019-09-09 13:34:58 +02:00
Rob Loranger 6396749f31
default pad tempate on all pad renders
this fixes a bug where if the `editor` config is set to an unsupported
value there is a nil pointer error and the pad fails to render when
editing only, not on a new post.
2019-09-06 19:49:15 -07:00
Matt Baer 4d97856ec5
Merge pull request #164 from writeas/tar-bombs
fix tar bombs
2019-08-22 15:32:37 -04:00
Rob Loranger 6e9000659c
fix typo in Makefile GITREV release target 2019-08-22 12:16:37 -07:00
Rob Loranger 42a2219335
add ui back to target release linux 2019-08-22 10:48:58 -07:00
Matt Baer de7acb5abe
Merge pull request #168 from OddBloke/log-version
Emit the server software and version to the log on startup
2019-08-22 13:05:48 -04:00
Rob Loranger 1d80e47e07
change subdirectory to writefreely
instead of writefreely_versionstring
2019-08-12 13:51:29 -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
Daniel Watkins 7a53af355e
Emit the server software and version to the log on startup 2019-08-11 09:53:33 -04:00
Rob Loranger 1301160921
fix tar bombs
this changes the release targets in the Makefile to use a subdirectory
of the format BINARYNAME_GITREV so extracting the archive results in a
single directory.
2019-08-09 11:26:52 -07:00
Matt Baer 8557119451
Merge pull request #153 from writeas/configurable-editor
Add editor config option
2019-08-08 07:33:04 -04:00
Matt Baer 10ca7ca00a
Merge pull request #149 from writeas/modestly-writefreely
Support toning down WriteFreely promotion

Resolves T676
2019-08-07 18:03:36 -04:00
Matt Baer 1c9438e305
Merge branch 'develop' into modestly-writefreely 2019-08-07 18:02:54 -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 f8d57d9e75 Return correct `public` state on collection creation
(in returned JSON data)

Ref T675
2019-08-07 16:22:35 -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 df078c569d Accept config.Config in datastore.CreateUser()
instead of App

Ref T675
2019-08-07 16:19:35 -04:00
Matt Baer de1a51d70d
Merge pull request #145 from writeas/fix-single-user
Fix single-user instance issues
2019-08-07 15:54:31 -04:00
Matt Baer f6dc07850b Fix pinned post URL on single-user instances
Previously, the URL of the dynamically-added pinned post on a
single-user instance would include the username, causing the link to go
to a non-existent page. This fixes that.
2019-08-07 15:47:49 -04:00
Matt Baer ef4a5b20d1
Merge pull request #144 from writeas/fix-api-missing-hostname
Fix missing hostname when publishing via API
2019-08-07 10:40:45 -04:00
Matt Baer b06d1c2762
Merge pull request #143 from writeas/collection-404
Style collection 404 page like rest of blog

Resolves T493
2019-08-07 10:39:38 -04:00
Matt Baer 582f041748 Return plainer message on coll .txt post 404
Ref T493
2019-08-07 10:26:36 -04:00
Matt Baer 35906118d0 Return only 404 on ActivityPub coll post request
Ref T493
2019-08-07 10:18:40 -04:00
Matt Baer d752d29b4b
Merge pull request #151 from writeas/custom-logging
Let Apper set request log format
2019-08-05 10:58:43 -04:00
Matt Baer 603a52dc46 Fall back to default template on bad editor config
Ref T677
2019-08-05 10:25:58 -04:00
Matt Baer f6a7dfacb9 Add editor config option
Ref T677
2019-08-04 22:20:30 -04:00
Matt Baer 740282b7b7
Merge pull request #147 from writeas/support-audio
Support <audio> element
2019-08-02 22:38:56 -04:00
Matt Baer 3321c750ac
Merge pull request #142 from writeas/autocert
Automatic certificates from Let's Encrypt

Resolves T542
2019-08-01 23:12:28 -04:00
Matt Baer 0bd61da3f6 Link to writefreely.org in default About text 2019-08-01 22:04:09 -04:00
Matt Baer 6bfc441680
Merge pull request #141 from writeas/fix-sitemap-lib
Fix go-sitemap-generator overriding GOMAXPROCs
2019-08-01 21:18:48 -04:00
Rob Loranger dd2a5840ec
fix mistake with images in sitemap 2019-08-01 18:13:04 -07:00
Matt Baer 5953a50f4a Let Apper set request log format
This adds a new ReqLog() func to the Apper interface that'll return the
log message for incoming requests.

Ref T649
2019-08-01 16:12:22 -04:00
Rob Loranger f02a241213
get image sitemap working
changed to use stm.URL for imgs for readability
fixed error in append statement
reordered import statements
2019-08-01 08:25:22 -07:00
Matt Baer 73ec3e3016 Support toning down WriteFreely promotion
This adds a new `wf_modesty` config option that removes the copious
mentions of WriteFreely in places like the About page and site
footers.

WriteFreely remains boastful and bumptious by default; but enabling
the modesty option will tone it down and likely lead to less confusion
among average users.

Ref T676
2019-07-31 22:53:10 -04:00
Matt Baer 569bc792d0 Enable changing default_visibility from Admin dash
Ref T675
2019-07-31 22:20:00 -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 b0d70d9bdb Support <audio> element
This whitelists the HTML5 <audio> element and adds some basic style to
make it look nice.
2019-07-25 22:54:11 -04:00
Matt Baer a48b746706 Fix empty Drafts page for single-user instances
- This removes copy mentioning the Blogs page, which isn't used on
  single-user instances
- This fixes the "Start writing" link, which on a single-user instance
  would've gone to the blog index, rather than the editor
2019-07-22 14:47:39 -04:00
Matt Baer 3129b837f1 Hide footer links to About and Privacy pages when single-user
Previously, these links showed up on user backend pages on a single-user
instance, despite them not working / only being applicable on multi-user
instances.
2019-07-22 14:40:10 -04:00
Matt Baer bd4bb52b9c Hide Public blog option on single-user instances 2019-07-22 14:37:32 -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 f6f116d672 Fix missing hostname when publishing via API
This fixes a bug that occurred only when publishing via API and
authenticating via token (rather than cookie).

Previously, the instance's hostname wouldn't be added to the Collection
that got passed around after retrieving the owned post, meaning an
incomplete URL was returned in the API response, and federation failed due
to the missing host.
2019-07-22 14:02:53 -04:00
Matt Baer f541f72224 Style collection 404 page like rest of blog
This displays the "page is missing" text within the same page as any
other blog post, keeping customizations, pinned pages, and general blog
navigation.

Ref T493
2019-07-21 15:15:52 -04:00
Matt Baer ba3cb4b4ff
Merge pull request #138 from writeas/fix-unpublished-state
Don't consider post unpublished when title exists
2019-07-21 11:35:16 -04:00
Matt Baer 1f7a0f0122 Add option for automated cert in config process
This adds a new "Secure (port 443), auto certificate" option to the "Web
server mode" prompt when running `writefreely --config`. When chosen,
it'll set `autocert` to `true` and set the path for certs and keys to
`certs`.

Ref T542
2019-07-20 21:46:10 -04:00
Matt Baer 3346e735d3 Fix autocert insecure server redirect
This fixes certificate validation, while keeping HTTP -> HTTPS
redirection.

Ref T542
2019-07-20 21:38:02 -04:00
Matt Baer 42386beabc Fix autocert HostPolicy
Previously, this would pass in the instance's full (and invalid) URL.
Now it passes only the host name.

Ref T542
2019-07-20 21:37:27 -04:00
Matt Baer 36fb7ecb2b Support automatically generated certificates
This adds a new config option in the `[server]` section: `autocert`.
When true, WF will automatically generate certificates instead of using
ones from the provided cert path. However, all generated certificates
will be stored in the configured `tls_cert_path`.

Ref T542
2019-07-20 20:49:20 -04:00
Matt Baer 41062728f5 Fix go-sitemap-generator overriding GOMAXPROCs
This upgrades the library to v2, which lets you specify that GOMAXPROCs
should always be the max number of CPUs -- and then sets it to that.

One side effect of this is that images are no longer listed in sitemaps.
I'm somehow at a loss on how to build and append the images array we
need, with the library's latest changes.

Fixes #86
2019-07-20 19:47:13 -04:00