Commit graph

138 commits

Author SHA1 Message Date
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
Marcel van der Boom
3b4d14f194 Only push language uri once on load stack 2018-11-29 17:36:50 +01:00
Marcel van der Boom
c6e4967728 Add support for all languages
- dynamically construct a list of languages to load
- fire hightlighting once last file has loaded
2018-11-29 16:25:53 +01:00
Matt Baer
3dd6e34914 Fix whitespace in templates 2018-11-23 12:42:30 -05:00
Matt Baer
2b5e869916 Rename render.tmpl to post-render.tmpl 2018-11-23 12:37:59 -05:00
Matt Baer
246a6dc554 Fix whitespace in highlight JS 2018-11-23 12:37:59 -05:00
Marcel van der Boom
a54f5fc9d8 Fix typos 2018-11-22 16:03:44 +01:00
Marcel van der Boom
d63db27917 Merge remote-tracking branch 'upstream/master' into codehighlight
* upstream/master:
  Work as a standalone server, including TLS
  Include About/Privacy page content in page description
  Show instance stats on About page
  Change default database name to writefreely
  Use and validate database type before connecting
  Mention Contributing Guide in README
  Add AUTHORS.md
  Fix About page link in Admin dash
  Include version in archives made by `make release`
  Remove keys.sh from make release
  Add make release
2018-11-22 15:09:58 +01:00
Marcel van der Boom
e400fe1649 Only load highlght css when needed 2018-11-22 15:01:11 +01:00
Marcel van der Boom
add06ee56c Only load js when there are blocks to highlight
Crux was the load event for the script tag inserted.
2018-11-22 14:31:25 +01:00
Matt Baer
8a5811e3e9 Fix About page link in Admin dash 2018-11-21 11:12:44 -05:00
Marcel van der Boom
7181fd9d9e Remove code for CodeHighlighting UI
We load it always, no need for a user config UI
2018-11-20 22:11:09 +01:00
Marcel van der Boom
a659acdc14 Bring all MathJax logic into one common template
Might as well do this right away, we're here anyway.
2018-11-20 22:01:25 +01:00
Marcel van der Boom
a82882fddc Put the highlight logic into one common template
It now loads unconditionally and highlights all code blocks.

TODO: optimize to not load when there are no blocks
2018-11-20 21:51:39 +01:00
Marcel van der Boom
03ac402c37 Use the same highlightjs library everywhere 2018-11-20 18:37:56 +01:00
Marcel van der Boom
348d548793 Add code highlighting option
This is a first stab at having a configurable code highlighting option,
similar to the MathJax rendering option. This change makes a checkbox
in the settings for code highlighting using the highlightjs.org
library.
What works: code highlighting in multi-user env is like I would
expect. single and anon(?) needs work

Things to resolve/consider:
- does the .IsCode test for code highlighting need to stay? At least
this and that should use the same version of the highlight.js lib.
- can the common templating part be 'included' somehow?
- the anon vs single-user vs multi-user code is not completely
clear (to me)
- bring js to local instead of cloudfare cdn (perhaps combine with
MathJax)
2018-11-20 11:29:12 +01:00
Matt Baer
bdc4f270f8 Support editing About and Privacy pages from Admin panel
This allows admin to edit these pages from the web, using Markdown. It
also dynamically loads information on those pages now, and makes loading
`pages` templates a little easier to find in the code / more explicit.

It requires this new schema change:

CREATE TABLE IF NOT EXISTS `appcontent` (
  `id` varchar(36) NOT NULL,
  `content` mediumtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

This closes T533
2018-11-18 21:58:50 -05:00
Matt Baer
7d87aad55a Add basic admin dashboard with app stats
Start of T538
2018-11-18 20:18:22 -05:00
Matt Baer
778098d925 Remove JS editor remnants
This was another issue mentioned in #28
2018-11-16 12:20:36 -05:00
Matt Baer
9d42d89a27 Fix "view blog" links on customize page in single mode
This closes #21
2018-11-14 15:37:10 -05:00
Matt Baer
1836735499 Add login link on single-user blog
This closes #15
2018-11-12 19:47:14 -05:00
Matt Baer
561568343a Use avatar as blog link social media image 2018-11-11 15:34:26 -05:00
Matt Baer
001fc8bb2d Fully support single-user mode
- New editor nav
- New backend nav
- Support for drafts
- Different footers on backend
2018-11-09 22:10:46 -05:00
Matt Baer
44e0657ef9 Update footer links with guide link, version num 2018-11-09 14:38:03 -05:00
Matt Baer
5e53a1788d Add user management pages 2018-11-08 01:23:08 -05:00
Matt Baer
ebeacff43c Add collection handlers, routes, feeds, sitemaps 2018-11-08 01:22:18 -05:00
Matt Baer
af872127c6 Add user-facing templates and pages 2018-11-08 01:13:00 -05:00
Matt Baer
86e7ba2579 Add editor
This includes the '/' route handler
2018-11-08 00:11:42 -05:00