Giter Site home page Giter Site logo

writefreely / writefreely Goto Github PK

View Code? Open in Web Editor NEW
4.1K 55.0 291.0 15.22 MB

A clean, Markdown-based publishing platform made for writers. Write together and build a community.

Home Page: https://writefreely.org

License: GNU Affero General Public License v3.0

Shell 0.66% Makefile 0.73% Go 84.23% JavaScript 5.23% Dockerfile 0.23% Less 8.83% HTML 0.10%
writing publishing blogging web-application go activitypub federation beta writefreely markdown

writefreely's Introduction

 

WriteFreely


Latest release Build status Go Report Card

 

WriteFreely is a clean, minimalist publishing platform made for writers. Start a blog, share knowledge within your organization, or build a community around the shared act of writing.

Try the writing experience

Find an instance

Features

Made for writing

Built on a plain, auto-saving editor, WriteFreely gives you a distraction-free writing environment. Once published, your words are front and center, and easy to read.

A connected community

Start writing together, publicly or privately. Connect with other communities, whether running WriteFreely, Plume, or other ActivityPub-powered software. And bring members on board from your existing platforms, thanks to our OAuth 2.0 support.

Intuitive organization

Categorize articles with hashtags, and create static pages from normal posts by pinning them to your blog. Create draft posts and publish to multiple blogs from one account.

International

Blog elements are localized in 20+ languages, and WriteFreely includes first-class support for non-Latin and right-to-left (RTL) script languages.

Private by default

WriteFreely collects minimal data, and never publicizes more than a writer consents to. Writers can seamlessly create multiple blogs from a single account for different pen names or purposes without publicly revealing their association.

Write.as

The quickest way to deploy WriteFreely is with Write.as, a hosted service from the team behind WriteFreely. You'll get fully-managed installation, backup, upgrades, and maintenance — and directly fund our free software work ❤️

Learn more on Write.as.

Quick start

WriteFreely deploys as a static binary on any platform and architecture that Go supports. Just use our built-in SQLite support, or add a MySQL database, and you'll be up and running!

For common platforms, start with our pre-built binaries and head over to our installation guide to get started.

Packages

You can also find WriteFreely in these package repositories, thanks to our wonderful community!

Documentation

Read our full documentation on WriteFreely.org —️ and help us improve by contributing to the writefreely/documentation repo.

Development

Start hacking on WriteFreely with our developer setup guide. For Docker support, see our Docker guide.

Contributing

We gladly welcome contributions to WriteFreely, whether in the form of code, bug reports, feature requests, translations, or documentation improvements.

Before contributing anything, please read our Contributing Guide. It describes the correct channels for submitting contributions and any potential requirements.

License

Copyright © 2018-2022 Musing Studio LLC and contributing authors. Licensed under the AGPL.

writefreely's People

Contributors

antolius avatar cjeller1592 avatar clarfonthey avatar colin-axner avatar conor-f avatar d4rklynk avatar dak425 avatar dariusk avatar davralin avatar dependabot[bot] avatar echoesactiii avatar eli-oat avatar gytisrepecka avatar heyakyra avatar joyeusenoelle avatar jsoref avatar kaiyou avatar koehn avatar mrvdb avatar ngerakines avatar nkoehring avatar obayanju avatar paddatrapper avatar pascoual avatar shleeable avatar techknowlogick avatar testwill avatar thebaer avatar viktorvaczi90 avatar vv-ee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

writefreely's Issues

Accepts of follows are on the wrong origin

from what i can tell:
https://github.com/writeas/writefreely/blob/c996ae1cadbc48974094b656884dc09ca93d30d5/activitypub.go#L262
this seems to e.g. generate https://puckipedia.com/1234-5678-accept from a follow of id https://puckipedia.com/1234-5678, which should not be accepted by any software ever. (i'm looking at you, yes you). If this is correct, this seems to be a violation of the spec (in that "every object should be resolvable", which i don't really care about for more transient objects like accepts), as i could've already put an object at this location. As such, Kroeg wisely rejects the Accept.

Tagged posts query fails in SQLite

Describe the bug

Unhandled exception? From here: https://github.com/writeas/writefreely/blob/v0.6.0/handle.go#L336 I can't tell exactly. My logs are full of these with variations of: /tag:{some string here}/feed/

ERROR: 2019/01/06 17:01:18 log.go:26: Failed selecting from posts: near "RLIKE": syntax error
ERROR: 2019/01/06 17:01:18 log.go:26: User: None

runtime error: invalid memory address or nil pointer dereference: goroutine 3730 [running]:
runtime/debug.Stack(0xc0004b6280, 0xc00119d600, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0xa7
github.com/writeas/writefreely.(*Handler).Web.func1.1.1(0xc00055e6a0, 0xc00119d600, 0x19bbc00, 0xc0008d6700, 0xc00028f9f0, 0xbf04aaf78bb065a1, 0x411bf38c1b9f, 0x2d60740)
        /ext-go/1/src/github.com/writeas/writefreely/handle.go:336 +0x2ae
panic(0x16f22a0, 0x2c680a0)
        /usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/writeas/writefreely.ViewFeed(0xc0004b6280, 0x19bbc00, 0xc0008d6700, 0xc00119d600, 0xc0005cee10, 0x0)
        /ext-go/1/src/github.com/writeas/writefreely/feed.go:78 +0x3f9
github.com/writeas/writefreely.(*Handler).Web.func1.1(0xc00055e6a0, 0xc00119d600, 0x19bbc00, 0xc0008d6700, 0x1, 0x18d82b8, 0x0, 0x0)
        /ext-go/1/src/github.com/writeas/writefreely/handle.go:368 +0x121
github.com/writeas/writefreely.(*Handler).Web.func1(0x19bbc00, 0xc0008d6700, 0xc00119d600)
        /ext-go/1/src/github.com/writeas/writefreely/handle.go:382 +0x63
net/http.HandlerFunc.ServeHTTP(0xc0005b4ce0, 0x19bbc00, 0xc0008d6700, 0xc00119d600)
        /usr/local/go/src/net/http/server.go:1964 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0004b6e10, 0x19bbc00, 0xc0008d6700, 0xc00119d600)
        /ext-go/1/src/github.com/gorilla/mux/mux.go:114 +0xe0
net/http.(*ServeMux).ServeHTTP(0x2d602a0, 0x19bbc00, 0xc0008d6700, 0xc00119c100)
        /usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc0005596c0, 0x19bbc00, 0xc0008d6700, 0xc00119c100)
        /usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc0006a6320, 0x19bc040, 0xc00034af80)
        /usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2851 +0x2f5
2019/01/06 17:01:18 Web deferred internal error render
2019/01/06 17:01:18 "GET /tag:Routed/feed/" 500 2.116462ms "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.
google.com/bot.html)"

Expected behavior

What should've happened?
Exception handled

Application configuration

  • Single mode or Multi-user mode? Single
  • Database? sqlite
  • Open registration? no
  • Federation enabled? yes

Version or last commit: 0.6.0

MathJax does not render in draft

In 0.7.1, MathJax does not render equations when viewing a draft, but it does when viewing a published post.

Including the mathjax template in templates/post.tmpl fixes this.

Can't change drafts' created date

Describe the bug

When change a draft post's date, it shows "404 page not found".
But that date is actually changed.

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Login
  2. Post some stuff and save to drafts.
  3. Edit that post's date.

Expected behavior

"Changes saved"?

Application configuration

  • Single user mode

Version or last commit:
0.6.0

"No such table: users" on fresh SQLite instance

Describe the bug

When creating a new instance of Writefreely with SQLite backend, writefreely --config command asks for admin's username and password, however on this step no schema is imported yet, which leads to

2019/01/08 07:46:07 Connecting to sqlite3 database...
2019/01/08 07:46:07 Creating user {MY_USER}...
ERROR: 2019/01/08 07:46:07 log.go:26: Rolling back users INSERT: no such table: users
ERROR: 2019/01/08 07:46:07 log.go:26: Unable to create user: no such table: users

After this error I had to run writefreely --init-db and then repeat writefreely --config to successfully finish my blog setup.

Expected behavior

When using SQLite backend, schema import should be done automatically, since there's no pre-built database like MySQL

Application configuration

  • Single mode or Multi-user mode? Single mode
  • Database? [mysql/sqlite] SQLite
  • Open registration? [yes/no] No
  • Federation enabled? [yes/no] Yes

Version or last commit: 0.7.0

Quick Start with MySQL

Issue

Following the quick start guide doesn't work as expected. If you are using MySQL as your database, you won't be able to complete the config without errors, as --init-db has to be run first. This creates a chicken/egg problem as running --init-db first errors out because it needs a config file. You have to run config twice to make it work.

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Just start a clean blog and follow the instructions as written.

Expected behavior

Config should complete successfully.

Application configuration

  • Single mode [single]
  • Database? [mysql]
  • Open registration? [yes]
  • Federation enabled? [yes]

Version or last commit:
0.6.0

Weird footnote display

Describe the bug

Sometimes the following, in a markdown file:

<sup>
    <a id="fnr.1" class="footref" href="#fn.1">1</a>
</sup>

Will be transformed into the following html:

<sup>
    <a id="fnr.1" class="footref">
        <span>#</span><span class="p-category">fn</span>
    </a>.1”&gt;1
</sup>

Some weird interaction of the href hashtag?

Steps to reproduce (if necessary)

Steps to reproduce the behavior:
Not sure. In a minimal markdown file things worked ok, so I couldn't reproduce. But checkout broken footnote links here.

Expected behavior

Instead of being displayed like:
#fn.1”>1

The footnote link would be:
1

Field 'description' doesn't have default value

ERROR: 2018/11/11 11:57:33 log.go:26: Rolling back collections INSERT: Error 1364: Field 'description' doesn't have a default value
ERROR: 2018/11/11 11:57:33 log.go:26: Unable to create user: Error 1364: Field 'description' doesn't have a default value

I had to manually change
description varchar(160) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
to
description varchar(160) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT ''

however after that it shows the same problem with privacy field. Either something wrong with my mySQL or with your schema.sql.
Server version: 5.7.18-0ubuntu0.16.10.1 (Ubuntu)

Docker build doesn't compile static assets

Describe the bug

v0.7 added a build dependency on go-bindata for including database schema files in the final binary. But when building the Docker image, the static data file isn't generated at the correct time, and the build fails.

I could use help on this from anyone with more Docker experience, cc @koehn @BenOvermyer @kaiyou @jlelse

Steps to reproduce (if necessary)

  1. Run make build-docker
  2. Wait a while
  3. Get app.go:276:18: undefined: Asset (normally defined in the generated bindata.go file)

Expected behavior

Image successfully builds

Application configuration

N/A

Version or last commit: v0.7.0

"View blog" button in Settings leads to wrong page

Describe the bug

When running single-user instance, "View blog" button in settings leads to non-existing page

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Go to Settings
  2. Click on View Blog

Expected behavior

You should be redirected to main (?) page

Actual behaviour

You're redirected to "https://YOUR_BLOG/ADMIN_USER" page, which doesn't exist.

Application configuration

  • Single mode or Multi-user mode? Single mode
  • Open registration? [yes/no] No
  • Federation enabled? [yes/no] Yes

Version or last commit: 0.2.1

feature request: support flag or config for changing config file and resource directories

I apologize for submitting a feature request here and not on the forums, but I don't want to create another account that I'll only use rarely.


Many OSs and distros have their own standards about where certain files live. This is a minor security issue and lets them separate read/write privileges for various programs and daemons. For example, on Arch and many other Linux distros it is common to have config files that only need read access by the main writefreely user in eg. /etc/writefreely/, binaries in /usr/bin/writefreely, read-only but shared resources in /usr/share/writefreely/{static,pages,templates}/, and persistent application storage in /var/lib/writefreely/{data,keys}/ or similar.

Having a command line flag or config value to set these locations would be helpful. Something along the lines of -c=/etc/config and then another flag for resources or a config entry for the other directories would be useful.

Thank you for your consideration, and this great software!

not displaying blogs/posts list

I setup testing instance of WF on my windows machine. It works great. Good job!

However, when I try to visit list my of blogs/post (as logged-in user) it throws Error 500. In webserver log there is something about null pointer dereference:

ERROR: 2018/11/08 13:10:56 log.go:26: runtime error: invalid memory address or n
il pointer dereference: goroutine 106 [running]:
runtime/debug.Stack(0xc042561708, 0x16086e0, 0x2439440)
        C:/Go/src/runtime/debug/stack.go:24 +0xae
github.com/writeas/writefreely.(*Handler).User.func1.1.1(0xc042386880, 0x188b8c0
, 0xc042106fc0, 0xc0424ede00, 0xc042561b70, 0xbef127d40dfb135c, 0x7adb1de9d, 0x2
44b1e0)
        C:/Users/Admin/go/src/github.com/writeas/writefreely/handle.go:83 +0x2ab

panic(0x16086e0, 0x2439440)
        C:/Go/src/runtime/panic.go:502 +0x237
html/template.(*Template).lookupAndEscapeTemplate(0x0, 0x178edc1, 0xb, 0x0, 0x0,
 0x0)
        C:/Go/src/html/template/template.go:144 +0x4a
html/template.(*Template).ExecuteTemplate(0x0, 0x18879c0, 0xc042106fc0, 0x178edc
1, 0xb, 0x16727c0, 0xc0426d1230, 0xc042561960, 0x15)
        C:/Go/src/html/template/template.go:133 +0x4a
github.com/writeas/writefreely.showUserPage(0x188b8c0, 0xc042106fc0, 0x178edc1,
0xb, 0x16727c0, 0xc0426d1230)
        C:/Users/Admin/go/src/github.com/writeas/writefreely/templates.go:42 +0x
156
github.com/writeas/writefreely.viewCollections(0xc0421328d0, 0xc0426e2580, 0x188
b8c0, 0xc042106fc0, 0xc0424ede00, 0xc0424ede00, 0xc042561b70)
        C:/Users/Admin/go/src/github.com/writeas/writefreely/account.go:772 +0x3
99
github.com/writeas/writefreely.(*Handler).User.func1.1(0xc042386880, 0x188b8c0,
0xc042106fc0, 0xc0424ede00, 0x17e40a8, 0x0, 0x0)
        C:/Users/Admin/go/src/github.com/writeas/writefreely/handle.go:98 +0x135

github.com/writeas/writefreely.(*Handler).User.func1(0x188b8c0, 0xc042106fc0, 0x
c0424ede00)
        C:/Users/Admin/go/src/github.com/writeas/writefreely/handle.go:108 +0x61

net/http.HandlerFunc.ServeHTTP(0xc0423873c0, 0x188b8c0, 0xc042106fc0, 0xc0424ede
00)
        C:/Go/src/net/http/server.go:1947 +0x4b
github.com/gorilla/mux.(*Router).ServeHTTP(0xc04217d3b0, 0x188b8c0, 0xc042106fc0
, 0xc0424ede00)
        C:/Users/Admin/go/src/github.com/gorilla/mux/mux.go:162 +0xf4
net/http.(*ServeMux).ServeHTTP(0x244ad20, 0x188b8c0, 0xc042106fc0, 0xc0424ed600)

        C:/Go/src/net/http/server.go:2337 +0x137
net/http.serverHandler.ServeHTTP(0xc0422a85b0, 0x188b8c0, 0xc042106fc0, 0xc0424e
d600)
        C:/Go/src/net/http/server.go:2694 +0xc3
net/http.(*conn).serve(0xc0423e79a0, 0x188bc40, 0xc0423aa940)
        C:/Go/src/net/http/server.go:1830 +0x658
created by net/http.(*Server).Serve
        C:/Go/src/net/http/server.go:2795 +0x282

Question about moderation for federated AP posts

Firstly, so excited to see this functionality working, so cool! Something I was thinking about though is adding fediverse post links that are created by write.as at the end of entries (sort of like, wanna comment? Here's the post on the fediverse!)

However something I noticed is that comments on these posts are vulnerable to spam / harassment since one can't manage the moderation aspects w/o logging into account.

Not sure how this is managed, but would it be possible to expose creds for AP account in order to manage comment deletion, blocks, etc?

Thanks again for all your work on platform! So nice to use

Can't edit a post's metadata.

Describe the bug

Can't edit a post's metadata.

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Publish a post.
  2. Then go back to edit, and click "Edit post metadata", this should jump to example.com/post-name/edit/meta
  3. jump back to example.com/post-name/edit

Expected behavior

It should edit the post's metadata.

Application configuration

  • Single-user mode

Version or last commit:
0.4.0

Mardown nested list rendering issue

Describe the bug

* foo
  * bar
  * baz

will render to:

<li>foo
  <ul><li>...</li></ul>
</li>

instead of:

<li><p>foo<p>
  <ul><li>...</li></ul>
</li>

which is more of what I'm used to.

You can see how it screws up the list: https://dpc.pw/social . After I add missing <p></p>, it looks OK again.

Steps to reproduce (if necessary)

Create a post with:

* foo
  * bar
  * baz

Expected behavior

Text should be in <p>? I think.

Application configuration

NA

Commenting

Suggesting a thing that's pretty standard around the Fediverse: show replies to an article as a comment section.

Also, add an option to enable/disable them, globally or on a singular article.

After update through API, editor shows old content

When updating a post through the API while also checking the editor on the website, the editor does not use the updated content which came in, but seems to be using a local browser storage entry draft...... to show the editable content.

Steps to reproduce the behavior (I have used the writefreely.el package):

  1. Create a post through the api as draft
  2. Got to the site, find the post and edit
  3. Do other things on site
  4. Post update through api
  5. Go back to post and edit

Editor will show initial content created in 1. or, if applicable any changes made in the editor in step 2. (but not published)

Expected behavior

Post should be updated according to latest update through api. It looks as if the local storage does not get invalidated properly.

Application configuration

  • Multi-user / open reg / federation enabled
  • latest git version

New posts have Scheduled mark

I'm running WriteFreely and MySQL on the same dedicated server which has UTC+3 as its timezone. My PC from which I'm making posts is also on UTC+3.
I even performed a clean install of WriteFreely. Downloaded source code, edited schema.sql by adding DROP TABLE IF EXISTS {table_name} before any CREATE TABLE commands.

After going through initial setup, I open my instance and make post. It shows as "Scheduled", though it is visible for everyone. You can check it yourself by visiting {removed}

I even tried re-creating instance once more and added SET time_zone = '+03:00' in schema.sql, with no luck

Originally posted by @MasterGroosha in #7 (comment)

crash report

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x55678e69dc9f]

goroutine 16687 [running]:
github.com/writeas/writefreely.handleFetchCollectionInbox.func3(0xc4203a01a8, 0xc4203a01b0, 0xc420c1f540, 0xc4203a01b8, 0xc420b46478, 0xc4201ecc90, 0xc4203a01c0, 0xc420170680, 0xc420b46479)
        /home/blog/go/src/github.com/writeas/writefreely/activitypub.go:370 +0x9bf
created by github.com/writeas/writefreely.handleFetchCollectionInbox
        /home/blog/go/src/github.com/writeas/writefreely/activitypub.go:323 +0x736

User templates not found on Windows

Describe the bug

On Windows, users see a Server Error page on routes that use templates under templates/user/. This is because the template lookup (e.g. account.go:799) has a forwardslash hard-coded, instead of using the correct slash for the OS.

Report

Originally reported on the forums.

Application configuration

  • OS: Windows only
  • Single mode or Multi-user mode? all
  • Database? all
  • Open registration? n/a
  • Federation enabled? n/a

Version or last commit: v0.7.0

Build broken by forked dependency when using go modules

When building with Go 1.11 with GO111MODULE=on set, the build is broken because it imports github.com/writeas/activity, but the activity package has its own import path set to github.com/go-fed/activity. If a forked version of the activity package is going to be used, the module name may need to be changed as well.

caddy server configuration

Hello, I want to use caddy server instead of nginx, but I don't know how to write the configuration file. Can you give an example?

Can't announce articles from writefreely instances on litepub

Announcing a post fails on litepub because the given object URI cannot be reused. This is technically a violation of both ActivityPub as well as LitePub standards.

05:35:17.818 [info] {
  "type": "Undo",
  "to": [
    "https://pleroma.site/users/kaniini/followers",
    "https://pleroma.site/users/kaniini"
  ],
  "published": "2018-11-10T05:34:53.551223Z",
  "object": {
    "type": "Announce",
    "to": [
      "https://pleroma.site/users/kaniini/followers",
      "https://blog.writefreely.org/api/collections/writefreely"
    ],
    "published": "2018-11-10T05:34:07.348041Z",
    "object": "https://blog.writefreely.org/api/posts/84rth4rg4b1ksw9x",
    "id": "https://pleroma.site/activities/6c918db7-5940-43de-93a5-4408bedfc7c8",
    "context_id": 14964830,
    "context": "https://pleroma.site/contexts/df27ab3f-9660-4f9f-ad2c-1dd51a5ca220",
    "cc": [
      "https://www.w3.org/ns/activitystreams#Public"
    ],
    "actor": "https://pleroma.site/users/kaniini"
  },
  "id": "https://pleroma.site/activities/5aea13d6-683a-4927-8cc4-8bde293a7383",
  "context_id": 14964830,
  "context": "https://pleroma.site/contexts/df27ab3f-9660-4f9f-ad2c-1dd51a5ca220",
  "cc": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "actor": "https://pleroma.site/users/kaniini",
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://litepub.github.io/litepub/context.jsonld"
  ]
}

We can prove the object is not reusable by trying to fetch it as we would any other capability URI:

raccoon:~$ curl -H 'Accept: application/json' 'https://blog.writefreely.org/api/posts/84rth4rg4b1ksw9x'
404 page not found
raccoon:~$ curl -H 'Accept: application/activity+json' 'https://blog.writefreely.org/api/posts/84rth4rg4b1ksw9x'
404 page not found
raccoon:~$ curl -H 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' 'https://blog.writefreely.org/api/posts/84rth4rg4b1ksw9x'
404 page not found

It's a shame because I wanted to share your FOSS announcement with the world.

Problems posting via API -- id:spamspamspamspam

Describe the bug

I'm sorry if this isn't the correct place to ask this question.

I notice I can't publish a post with the following string:

{"title":"FOO","body":"# Heading\n\nThis is a reference <sup id=\"23a0cb26bdc81155a95e825421dd7106\"><a href=\"#Friedrich2000\" title=\"Friedrich, Siegert, Peinke, L\\uck, Siefert, Lindemann, Raethjen, Deuschl \\&amp; Pfister, {Extracting model equations from experimental data}, {Physics Letters, Section A: General, Atomic and Solid State Physics}, v(3), 217--222 (2000).\">Friedrich2000</a></sup>.  Bibliography test.  \n\n  \n# Bibliography\n<a id=\"Friedrich2000\"></a>[Friedrich2000] Friedrich, Siegert, Peinke, L\\\"uck, Siefert, Lindemann, Raethjen, Deuschl & Pfister, Extracting model equations from experimental data, <i>Physics Letters, Section A: General, Atomic and Solid State Physics</i>, <b>271(3)</b>, 217-222 (2000). <a href=\"http://dx.doi.org/10.1016/S0375-9601(00)00334-0\">doi</a>. [â](#23a0cb26bdc81155a95e825421dd7106)\n\n."}

I do get a 201 response, yet with id:spamspamspamspam.
Apparently it works for posting if I'm authenticated, but then I cannot update it via the API.

The offending part of the string seems to be the DOI link, as the following also doesn't work:

{"title":"FOO",
 "body":"<a href=\"http://dx.doi.org/10.1016/S0375-9601(00)00334-0\">doi</a>}

Interestingly, it seems the mechanism checking for <a> html tags thinks that dx.doi.org is a suspicious domain and throws a false positive. (Or the mechanism bans links to paywalled scientific journals in the name of open science?)

I was wondering if it's possible to whitelist this particular domain, which is relatively well established in academy.

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

# Data being the json above
curl https://write.as/api/posts -H "Content-Type: application/json" -X POST -d "$DATA"

Expected behavior

Post should've been publish or updated and rendered:

screen shot 2018-11-22 at 18 45 13

Question: Any reason why this would not work with PostgreSQL?

The server I am planning on using this on only has PostgreSQL installed, just wondered if there was anything in the queries being used that would be incompatible with that database? I haven't tried it yet, but I seem to remember PostgreSQL being a good drop in replacement for MySQL.

User creation timestamp set to zeros somewhere after Dec. 14, 2018

After upgrading to latest git (0.7-ish) looking at the user list in the admin settings. The created field of users registered after Dec. 14 or so has the creation timestamp set to '0000-00-00 00:00::00'.

I can't see anything wrong with our particular instance (qua.name) so registering this here to see if others see it too.

db:mysql (mariadb)
multiuser/registration open

Support for other databases

Is there interest in adding sqlite, boltdb/bbolt, or postgres support to writefreely? The first two, in particular, are well-placed for use with small deployments and lower the setup barrier significantly.

I'm happy to contribute code for this, but since it implies additional maintenance burden, I thought I'd check to see if it'd be welcome first!

Config bind address

I'm running writefreely in a Docker container and I'd like it to bind to other than localhost:8080 (preferably 0.0.0.0:8080) so I can forward connections into it from my web server. How can I configure this?

NOW doesn't exist in sqlite

Describe the bug

ERROR: 2019/01/06 23:49:35 log.go:26: Couldn't add follower in DB: no such function: NOW

NOW doesn't exist in SQLite it seems in 0.6.0 its here: https://github.com/writeas/writefreely/blob/v0.6.0/activitypub.go#L401
master currently its here: https://github.com/writeas/writefreely/blob/master/activitypub.go#L411

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Turn on debugging ( actually I don't think needed to make it show up )
  2. Have someone follow your blog from mastodon or elsewhere in the fediverse

Expected behavior

no error :)

Application configuration

  • Single mode or Multi-user mode? single
  • Database? sqlite
  • Open registration? no
  • Federation enabled? no

Version or last commit: 0.6.0

Documentation issue: MySQL version

Describe the bug

When importing the provided schema.sql of 0.2.1 with MySQL < 5.6 this error appears:

ERROR 1293 (HY000) at line 99: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Which is a known problem and is fixed with 5.6.
Yes I know 5.5 is old, but I suggest adding (5.6+) on https://writefreely.org/start at "A MySQL database" - it could make sense to also check the corresponding MariaDB version (should be 10.0 but I'm not sure) - if it works at MariaDB at all?

Version or last commit:
0.2.1

Admin account isn't created correctly with --config

Describe the bug

When you just run ./writefreely --config and supply admin username and password, admin account isn't created correctly.

SQLite3 showing that there's no registered users

"User doesn't exist" on writefreely login

Output during --config

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Download and extract writefreely 0.8.0 somewhere (tried on both /opt, used sudo all the way through, and on my home folder with no sudo)
  2. Run writefreely --config
  3. Do a setup that is similar to the log provided above or to the application configuration provided below, provide admin credentials.
  4. Run sqlite3 writefreely.db, run select * from users;
  5. Observe that there's no users.

Expected behavior

An admin user should've been created.

Application configuration

  • Single mode or Multi-user mode? Single mode
  • Database? SQLite
  • Open registration? no
  • Federation enabled? yes

Version or last commit:
0.8.0 for Linux, directly from releases, running on a Ubuntu 16.04 xenial server.


As a sidenote:

  1. I pasted my password on the box there and it was a 64 character a-zA-Z0-9 password, but it appeared there and writefreely gave it a checkmark (:heavy_check_mark:).
  2. Doing ./writefreely --create-admin username:password with the same credentials did create the account, and now I can use writefreely.

Time/Date issue

Describe the bug

So I'm in UTC+8, and I want to edit the post's time.
Assume now my local time is 2018-10-04 17:43:00.
First, type the time and click save.
Then for a few seconds, it changes the time to 2018-10-04 09:43:00 (minus 8 hours) and have a UTC outside the label.
Then the page refreshed, and now it said the time is 2018-10-05 01:43:00 (plus another 8 hours).

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Post or edit any posts.
  2. Change the date.

Expected behavior

Save my local time 2018-10-04 17:43:00.

Application configuration

  • Single mode

Version or last commit: 0.6.0

Broken build on 0.7.0

Similar to #17, the build appears to be broken again when using modules.

Right now the error is:

go: github.com/writeas/[email protected]: parsing go.mod: unexpected module path "github.com/go-fed/activity"

In the tag for github.com/writeas/[email protected] it is still named github.com/go-fed/activity in the mod file; the problem is already fixed, but no new release of github.com/writeas/activity has ever been made that writefreely can use.

Getting mysqld error on schema import

Describe the bug

Getting:

ERROR 1067 (42000) at line 99: Invalid default value for 'updated'

When running:

mysql -u USERNAME -p writefreely < schema.sql

Running mysqld 5.7.24 on Ubuntu 18.04.1.

Version or last commit:
v0.2

Evidently this commit isn't fixing it for me, nor this workaround.

Hanging on creating user

Describe the bug

While running: writefreely --config and choosing the sqlite3 driver it hangs on creating user geekgonecrazy...

I've tried on ubuntu 16.04 as well as on osx mavericks. Both sit there and hang on the creating user stage. I tried starting that with -debug but doesn't seem to spit any information out. I can see when I change the filename that the sqlite file is for sure getting created.

Seems to be related to: https://github.com/writeas/writefreely/blob/master/app.go#L487 if I increase this to 2 it seems to work. So something during the create user process must not be releasing connection or attempting to create a new one instead of reusing?

Expected behavior

Process should have completed.

Application configuration

  • Single mode or Multi-user mode? Single mode
  • Database? sqlite
  • Open registration? no
  • Federation enabled? yes

Version or last commit: 0.6.0

No login button

On the main page, there's no login button. It took me a while to think about manually adding /login to URL and proceeding to auth page.

Maybe there's something wrong on my side, since I'm also having issues with installation.

MathJax setting does not stick

In blog settings, the MathJax checkbox does not work, i.e. stays 'off' after save.

  • console gives error on jseditor not defined, but I guess that is a remnant of removing user js from write.as
  • tried with 2 browsers, same result

It's possible to create users with invalid usernames via admin tool

Originally reported in this thread.

Describe the bug

The admin user creation process allows creating users like pandora_parrot and pandyBird, both of which the web UI prevents.

Expected behavior

The user creation process should run the username through normalization funcs and either return the normalized version or throw an error.

Version or last commit: v0.6.0

Special characters throw Invalid JSON for POST

Describe the bug

When sending text with special characters, such as an ellipsis or curly quotes , the API request returns an error. The JSON being sent validates with a linter, but not is not valid here. Typing these characters in the editor works as expected.

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Send a POST to /api/posts or api/collections/{COLLECTION_ALIAS}/posts with a JSON object using a special character from above.

Expected behavior

The JSON payload should be accepted as valid and a new entry should be made.

Application configuration

  • Multi-user mode
  • Open registration yes
  • Federation enabled yes

Version or last commit:
writefreely v0.4.0

Please be consistent with version and tag names

Currently if a version is a .0 release the release is, eg. 0.3 and the tag is v0.3.0. This makes for download URLs such as:

https://github.com/writeas/writefreely/releases/download/v0.3.0/writefreely_0.3_linux_amd64.tar.gz

during packaging, it would be nice if these were the same so that users don't have to store two different versions. Eg. if it were:

https://github.com/writeas/writefreely/releases/download/v0.3.0/writefreely_0.3.0_linux_amd64.tar.gz

instead a single variable could be used to substitute for both. It's a minor annoyance, but I'd appreciate it if these could be consistent in the future all the same.

Thanks for your consideration.

Change long dash in blog titles per language

I write my stuff in German and would love to have a typographically-correct German dash if possible.

Since you already have some language detection at work, maybe you could substitute the mdash for an ndash? That would be swell!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.