Commit graph

77 commits

Author SHA1 Message Date
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
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
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
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
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
ad6fd5e809 Use "Draft" in post meta page
instead of "Anonymous".
2019-07-01 19:59:52 -04:00
Matt Baer
554995916e Replace top-left "w" button on post meta page
This was still a relic of Write.as. Now it has the same icon as the
WriteFreely editor.
2019-07-01 19:56:50 -04:00
Matt Baer
7aaff778da
Merge pull request #123 from writeas/private-instance
Private instances

Resolves T576
2019-07-01 19:14:20 -04:00
Matt Baer
fdcdfe4d25 Open landing page preview in new window 2019-07-01 19:05:47 -04:00
Matt Baer
a72ce2ef29 Make landing page dynamic
This enables admins to customize their landing / home page via the Admin
dashboard -- including the text at the top of the page and the section
below it. It keeps the current default text, falling back to it if the
user hasn't overwritten it.

Ref T565
2019-06-27 17:06:37 -04:00
Michael Demetriou
4feac6dcd2 Remove langs list from post-render as it does not actually
do anything useful (see https://github.com/writeas/writefreely/pull/128#issuecomment-506207107)
2019-06-27 18:15:58 +03:00
Michael Demetriou
0842119694 Change sh alias back to bash
because this is the alias in highlight itself.

(see https://github.com/writeas/writefreely/pull/128#issuecomment-505766645)
2019-06-27 00:12:18 +03:00
Michael Demetriou
c2d7c2c8b7 Fix #124 according to the snippet by @mrvdb
I changed the sh alias to shell instead of bash.

The additions to the `highlight(nodes)` function look redundant.
It works for me without them but maybe they cover an edge case I
cannot think about?
2019-06-25 21:17:30 +03:00
Matt Baer
35718cd239 Change blog visibility explanations on Private instance
Ref T576
2019-06-16 20:30:56 -04:00
Matt Baer
bf989eb696 Hide Reader link on private instance when unauth'd
Ref T576
2019-06-16 20:29:31 -04:00
Matt Baer
161f7a8de2 Support changing landing conf val from Admin UI
Closes T651
2019-06-16 17:38:34 -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
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
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
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
Matt Baer
4cad074b44 Link to version-specific writer's guide 2019-04-11 13:52:10 -04:00
Matt Baer
a850fa14cd Move instance page editing to dedicated section
This adds a "Pages" section to the admin part of the site, and enables
admins to edit the pre-defined About and Privacy pages there, instead of
on the dashboard itself.

It also restructures how these pages get sent around in the backend and
lays the groundwork for dynamically adding static pages. The backend
changes were made with more customization in mind, such as an
instance-wide custom stylesheet (T563).

Ref T566
2019-04-06 13:23:22 -04:00
Matt Baer
09fb73bdd5 Standardize admin navigation 2019-04-06 11:15:14 -04:00
Marcel van der Boom
f40ce14fb2 Resolve an edge case where last language has error
If there are multiple language blocks on a page, we set the
onload on the last one to load all highlighting at once.

If the last language block has an error, the onload would
never fire and thus all blocks would not be highlighted.

The simplest resolution is to fire the callback regardless. We've
already loaded everything so running the callback is not causing any
performance hit which is relevant I think.
2019-03-05 14:36:40 +01:00
Matt Baer
99489aa920 Change zip link to txt on Export page
"zip" doesn't really describe what the posts themselves are exported as.
"txt" does.
2019-02-25 15:49:11 -05:00
Matt Baer
c2436a43c5 Merge branch 'master' into develop 2019-02-04 10:14:59 +01:00
Matt Baer
a896d475e4 Clean up resource URLs on collection-tags template
This included files.writeas.org paths and other Write.as-specific logic.
2019-02-04 10:12:38 +01:00
Matt Baer
d8876058a6 Add WriteFreely version to admin dash 2019-01-18 11:33:57 -05:00
Matt Baer
70e823d6ab Support user invites
This includes:

- A new `user_invites` config value that determines who can generate
  invite links
- A new page for generating invite links, with new user navigation link
- A new /invite/ path that allows anyone to sign up via unique invite
  link, even if registrations are closed
- Tracking who (of registered users) has been invited by whom

It requires an updated database with `writefreely --migrate` in order to
work.

This closes T556
2019-01-18 00:05:50 -05:00
Matt Baer
bf7d422039 Add pager to admin user list
This enables paging through the entire list of users.

Ref T553
2019-01-05 09:37:53 -05:00
Matt Baer
0e722de82c Add admin user list
This enables admins on multi-user instances to see all users registered,
and view the details of each, including:

- Username
- Join date
- Total posts
- Last post date
- All blogs
  - Public info
  - Views
  - Total posts
  - Last post date
  - Fediverse followers count

This is the foundation for future user moderation features.

Ref T553
2019-01-04 22:28:29 -05:00
Matt Baer
e525bc32a7 Use language-specific dash in post titles
This closes #1
2018-12-24 13:58:32 -05:00
Matt Baer
25a68d0c0e Add Reader section
This adds a "Reader" section of the site for admins who want to enable
it for their instance. That means visitors can go to /read and see who
has publicly shared their writing. They can also follow all public posts
via RSS by going to /read/feed/. Writers on an instance with this
`local_timeline` setting enabled can publish to the timeline by going
into their blog settings and choosing the "Public" visibility setting.

The `local_timeline` feature is disabled by default, as is the Public
setting on writer blogs. Enabling it adds a "Reader" navigation item and
enables the reader endpoints. This feature will also consume more
memory, as public posts are cached in memory for 10 minutes.

These changes include code ported over from Read.Write.as, and thus
include some experimental features like filtering public posts by tags
and authors. These features aren't well-tested or complete.

Closes T554
2018-12-10 16:08:07 -05:00
Matt Baer
9e466a6d23 Locally host MathJax
This closes T551
2018-12-07 16:50:29 -05:00
Matt Baer
860e8c0120 Locally host highlightjs
Part of T551
2018-12-07 16:37:14 -05:00
Matt Baer
8cbc02d7cf Hide unneeded config values in single-user mode
(in the admin UI.)
2018-12-03 18:45:55 -05:00
Matt Baer
cbf6ff54df Add site_description config value
This changes what displays in the NodeInfo, and in the future might be
used for other things.
2018-12-03 18:36:33 -05:00
Matt Baer
573ce02739 Remove params from URL after loading admin panel
This ensures that refreshing the page doesn't include any past success /
failure messages.
2018-12-03 18:34:36 -05:00
Matt Baer
d2f89c6360 Open pages linked from admin UI in new window 2018-12-03 17:34:57 -05:00
Matt Baer
9fe4b09de5 Support editing some config values in admin UI
This is almost all of T541
2018-12-03 17:30:31 -05:00
Matt Baer
09a3fe09fe
Merge pull request #39 from mrvdb/codehighlight
Codehighlight, add support for all languages
2018-12-03 12:24:36 -05:00
Matt Baer
5fc41687be Fix whitespace 2018-12-03 12:18:04 -05:00
Matt Baer
fc856e36eb Fix editing metadata on single-user instances
This closes #40
2018-12-01 16:27:14 -05:00