Commit graph

377 commits

Author SHA1 Message Date
Michael Demetriou
efbef83362 make sure app exits after error in --sections argument 2019-06-21 10:40:40 +03:00
Michael Demetriou
07fe366c15 Fix T657: add --sections argument to allow partial configuration.
Use the split argument list (slice) just for validation purposes
as it's substantially easier to do `.contains` in a string instead
of a slice. As such, pass the `configSections` arguments to
`Configure()` and check the existence of each one before showing
the options to the user.

An empty argument list is replaced by "server db app" so everything
is there negating the need to check anything else in `Configure()`.
In the same vein the default is "server db app".

The parsing is done in `app.go` alongside the other flags instead
of `main.go` as described in T657.
2019-06-20 23:41:03 +03:00
Michael Demetriou
1d5c396327 Add --sections flag to app.go and pass it to setup.go
Add --sections flag to app.go according to T657, parse them
into a string array (check for invalid arguments and abort)
and pass them to Configure(). For now Configure() doesn't do
anything with them yet.
2019-06-20 23:14:36 +03:00
Michael Demetriou
9570388d1d Fix #96
This solves the error 500 on the /api/me endpoint.

Replace token search query `=` with `LIKE` to fix sqlite complaining about
no valid tokens. Also checked with MySQL and it still works after the change.
2019-06-11 20:18:58 +03:00
Matt Baer
b2a9429db0
Merge pull request #117 from writeas/T612
change delete post authentication logic
2019-06-05 16:18:08 -04:00
Rob Loranger
d58c142467
change delete post authentication logic
this reorders the logic for checking authentication on post deletes to
first check for a provided edit token and after check for an access
token or auth'd user.
2019-06-05 09:39:22 -07:00
Matt Baer
c87b7ab39e
Merge pull request #111 from writeas/gh100
support pubgate
2019-06-03 16:37:36 -04:00
Rob Loranger
08799b220b
revert accidental .vscode folder inclusion 2019-06-03 11:55:42 -07:00
Rob Loranger
d8fa85432d
fix for Pubgate user not having SharedInbox 2019-06-03 11:53:17 -07:00
Rob Loranger
702db2bf75
Merge branch 'gh100' of github.com:writeas/writefreely into gh100 2019-06-03 11:52:44 -07:00
Matt Baer
73f627a6c2
Merge pull request #110 from writeas/fix-rtl
Enable un-setting RTL setting via web
2019-06-02 13:19:32 -04:00
Matt Baer
f82e11b3b3
Merge pull request #115 from writeas/blog-index-titles
Make post body h2's smaller on index pages
2019-06-01 12:16:36 -04:00
Matt Baer
6bf4e1a52e Add spacing around time element on index pages
This adds a small margin around a time element, which makes things look
better when the body of a post starts with a header.
2019-06-01 09:26:58 -04:00
Matt Baer
4b1ca3e296 Make post body h2's smaller on index pages
Previously, <h2>s in a post were the exact same size as post titles on
index pages (blog index, tag listing). This fixes that by reducing the
font-size of body h2's. Closes #82.
2019-06-01 09:17:28 -04:00
Matt Baer
68bd5ef01a
Merge pull request #114 from writeas/export-title
Include post title in zip export txt files
2019-05-31 09:26:20 -04:00
Matt Baer
cba7f1223e Include post title in zip export txt files 2019-05-30 10:38:55 -04:00
Matt Baer
cf51fc4886
Merge pull request #113 from writeas/fix-json-export-2
Modify GetPost() to allow inclusion of pinned posts
2019-05-29 12:18:04 -04:00
Noëlle Anthony
f271e53925 Update GetPosts() docstring 2019-05-29 12:03:01 -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
Rob Loranger
95215aa39d
fixes issue #100 - can't follow from pubgate
this moves the unmarshaling of a remote actor out into a new helper which
accounts for the possibility of a context being a list or a single entity.
i.e. a string or an object.

basics tests are provided for both situations

also go fmt'd the file activitypub.go
2019-05-24 19:38:35 -07:00
Rob Loranger
ff2d3fc3d5
fixes issue #100 - can't follow from pubgate
this moves the unmarshaling of a remote actor out into a new helper which
accounts for the possibility of a context being a list or a single entity.
i.e. a string or an object.

basics tests are provided for both situations

also go fmt'd the file activitypub.go
2019-05-21 07:02:35 -07:00
Rob Loranger
3986c8eec1
add missing string variable in log statement in export.go + go fmt 2019-05-20 14:51:54 -07:00
Matt Baer
b6da5d9711
Merge pull request #107 from writeas/go-bindata-as-dep
Add go-bindata as a module dependency
2019-05-20 14:18:36 -04:00
Matt Baer
b9b41b1ef7 Enable un-setting RTL setting via web
Previously, once RTL was enabled on a post, you couldn't unset it via
the web application. This fixes that. (Fixes #103)
2019-05-18 23:16:42 -04:00
Rob Loranger
6ff136455c
Add go-bindata as a module dependency
This adds https://github.com/jteeuwen/go-bindata as a module dependency
as the make target 'build' will result in it's addition.
2019-05-17 16:22:44 -07:00
Matt Baer
2fdd58387a
Merge pull request #105 from writeas/go-bindata-repo-fix
go-bindata url updated
2019-05-17 17:27:43 -04:00
Sandrockcstm
cf139ecd72 go-bindata url updated 2019-05-17 15:57:33 -05:00
Matt Baer
98f5b14899 Use HTTP for MathJax submodule 2019-05-14 07:58:36 -04:00
Matt Baer
effab9b6a1 Move MathJax to git submodule 2019-05-14 07:50:37 -04:00
Matt Baer
788713116f
Merge pull request #99 from gytisrepecka/master
Added /bin/lessc path to be compatible with CentOS 7
2019-05-02 10:01:28 -04:00
Gytis Repečka
6da10f28ac
Modified less/Makefile: added /bin/lessc path which is returned by which lessc in CentOS 7 when lessc is installed via npm. 2019-05-02 12:07:01 +03:00
Matt Baer
601fc5d93e
Merge pull request #97 from dariusk/master
Tweak Makefile for MacOS
2019-04-30 15:33:57 -04:00
Darius Kazemi
91a181f628 Adding another possible path for lessc to Makefile 2019-04-30 10:40:00 -07:00
Matt Baer
fdbefa806f
Merge pull request #95 from TeDomum/master
Fix the build in Docker after enabling go modules
2019-04-19 09:01:44 -04:00
kaiyou
70f754e8af Install the writefreely cmd properly 2019-04-19 13:05:01 +02:00
kaiyou
402e9e822c Fix the build in Docker after enabling go modules
Enabling go modules requires that GO111MODULE is set, so
we set it as an environment variable in the Dockerfile.

Also, go-bindata is meant to be installed globally, so we
force the install before enabling Go modules. Also, we update
Go to 1.12 to fix a couple module builds.
2019-04-19 12:55:54 +02:00
Matt Baer
7a07e1009b Include -config and -init-db steps in make install
This also moves development instructions to documentation repo.
2019-04-16 11:27:27 -04:00
Matt Baer
771c7acf5f Run migrations on db initialization
This makes it so we can keep all schema changes in the `migrations`
module, instead of adding them there *and* in the schema files. It
fixes #92 and should prevent these kinds of issues in the future.
2019-04-15 13:48:19 -04:00
Matt Baer
c08484aa9c Fix excessive p spacing in blockquotes 2019-04-13 12:04:17 -04:00
Matt Baer
e80f99a72e Fix draft post metadata
Previously it referenced an image on write.as and had the incorrect
og:url property. This also fixes the canonical URL on single-user
instances. Closes #91
2019-04-12 14:56:46 -04:00
Matt Baer
1dc93c076d Revert "Support new commentsEnabled property"
This reverts commit 5e7da6678d.

There are better standards in progress like a `capabilities` object:
https://litepub.social/litepub/lice.html
2019-04-11 22:04:51 -04:00
Matt Baer
831209f4b6 Merge branch 'develop' 2019-04-11 22:03:16 -04:00
Matt Baer
1f973464bc Merge branch 'master' of github.com:writeas/writefreely 2019-04-11 22:03:03 -04:00
Matt Baer
238a913ce3 Make WriteFreely spacing consistent 2019-04-11 21:33:33 -04:00
Matt Baer
63a2225b7f Add admin dashboard link to dropdown navs 2019-04-11 21:11:30 -04:00
Matt Baer
af0f6302a2 Replace --reset-pass instructions with admin guide link 2019-04-11 21:10:45 -04:00
Matt Baer
7ab5350a94 Bump version to 0.9.0 2019-04-11 21:04:48 -04:00
Matt Baer
51ac06a51b Move Docker instructions to writefreely/documentation 2019-04-11 20:44:44 -04:00
Matt Baer
07ab0cdb9c Add invites flag in NodeInfo
This indicates whether or not invites are enabled on this instance. It
requires an upgrade to writefreely/go-nodeinfo v1.2.0
2019-04-11 20:37:01 -04:00
Matt Baer
9cb0f80921 Support changing instance page titles
Now admins can choose a title for their About and Privacy pages; now
editable through the instance page editor.

This adds `title` and `content_type` fields to the `appcontent` table,
requiring a migration by running `writefreely --migrate`

The content_type field specifies that items we're currently storing in
this table are all "page"s; queries for fetching these have been updated
to filter for this type. In the future, this field will be used to
indicate when an item is a stylesheet (ref T563) or other supported
type.

Ref T566
2019-04-11 13:56:07 -04:00