Giter VIP home page Giter VIP logo

papyrs's Introduction

Papyrs

Papyrs - Blog on web3


GitHub release Follow Papyrs on Twitter Chat on Discord


⚠️ Deprecated

Papyrs is still available for use, but new user sign-ups have been disabled. The platform is no longer being actively developed or maintained.


Papyrs

Papyrs is an open-source, privacy-first, decentralized blogging platform that lives 100% on chain. Papyrs runs on the Internet Computer, the world's first blockchain that runs at web speed and serves content on the web.

Links & Projects

Here are some useful links:

  • See the HACKING document to run locally the app or fetch published blog posts.
  • Reach out to us on Discord.
  • Wanna help? Check out the CONTRIBUTING guidelines.
  • Have a look at the LICENSE for information about licensing and limitation.

This repo is the web editor of Papyrs. It can be used as a standalone app but uses other projects we are developing to be fully deployed:

  • IC: canisters and sign-in providers
  • CDN: libraries and assets we are using across the platform
  • Unsplash-proxy: a proxy we have to use to query Unsplash
  • Stylo: another kind of rich text editor
  • Kit: the templates for the blog posts we deploy for the users
  • DeckDeckGo: various web components, utilities and the providers for the offline persistence and synchronization of the data

Other handy tools:

  • Papyrs to markdown: Chrome markdown-plugin that can be used to convert a blog post to markdown

Architecture overview

All programs on the Internet Computer are Wasm modules, or canisters (canister smart contracts). The Papyrs web editor is deployed on the IC through Fleek.

The web editor persists blog post data in the browser in indexedDB. This means that Papyrs can be used by anyone without any authentication. Blog posts can be loaded from and exported to the file system.

Architecture with offline data only

However, if users are interested in storing their data "in the cloud" automatically and sharing their blog posts online, authentication with Internet Identity will be required. Once authenticated each user gets two canisters:

  • a private "data" canister that contains raw blog post data, used in the editor, and
  • a "storage" canister that holds and publicly serves blog post and asset data (html, images, js, css, etc).

Architecture with online canisters

papyrs's People

Contributors

bytesun avatar mrnmkmn avatar omahs avatar peterpeterparker avatar sohamratnaparkhi 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

Watchers

 avatar  avatar

papyrs's Issues

nested list is breaking the editor UI

Expected Behavior

Nested list should have some limits in my opinion. If not, it should at least not break the editor UI.

Actual Behavior

Nested list does not have any limit and that is also causing UI issues in the editor.

Reproduction

Steps to reproduce:

  1. Keep nesting the list in the editor

Screenshots

sr-2022-07-29_13.52.34.mp4

Environment

  • Browser(s): Chrome (Latest version)
  • Operating System (e.g. Windows, macOS, Ubuntu): Pop!_OS 22.04

how do i delete an image

Expected Behavior

i expected to be able to delete an image

Actual Behavior

i have no idea how to actually delete an image

Reproduction

Steps to reproduce:

  1. start a post
  2. add image
  3. try to delete it -- now way to select it or backspace through it

Environment

  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):
    OS X / Chrome

fix: social image not rendered if uploaded to Papyrs

Actual Behavior

Twitter cannot render the social image if the image if uploaded to Papy. This is because crawlers are blocked and should not crawl the images folder because the images can be private.

e.g.

https://twitter.com/showying_art/status/1564126822199345154

https://jiypc-raaaa-aaaal-abb3a-cai.raw.ic0.app/d/c3f-japanese-ic-community

https://jiypc-raaaa-aaaal-abb3a-cai.raw.ic0.app/robots.txt

Disallow: /images/

Solution

  • simple: do not use Papy images for og meta tag but only the auto generated images
  • complicated: update robots.txt with list of images that can be crawler

Screenshots

Capture d’écran 2022-08-29 à 08 49 57

feat: keep track of code options

Feature Description

It would be nice to keep track of code options - e.g. if I add a piece of code to an article and then set "c# and no line numbers", next time I add another piece of code, it should inherits the same settings until I change then again. It can make easier to write a blog post that is not about javascript.

We can probably handle the last code settings in session storage or local storage.

feat: better chinese support

Feature Description

Since many of them write in Chinese, it would be great if they could write from top to bottom (and, ideally, right to left).

feat: publish twitter etc. to kit

Feature Description

User social handles such as twitter, linkedin etc. are not published to the main index.html of the users' assets canister.

In addition to name, photo and description, it would be cool to add these social links too.

Note

All information are optional.

LaTeX formula input

Feature Description

Recently GitHub added support for LaTeX in markdown. It would be nice to see such a thing in papyrs too.

Use Case

If one wants beautifully typeset formulas in a blog article, inline or block LaTeX syntax gives the most bang for the buck.

feat: delete action hidden - display message

Feature Description

Not displaying the "delete post" action on the posts page does not make obvious the action is not present because the current edited post cannot be deleted (that's given).

Instead of hiding the action, it should be displayed but display an information when clicked "sorry this post cannot be deleted, it is currently edited" (something like that).

Screenshot - Mockup

Capture d’écran 2022-05-10 à 21 11 14

editing existing code with < and >

Bug Description

code editor is a little bit buggy - if you put an ampersand (&) into it, save and then try to edit the entry, it will replace the ampersand with &amp; which is incorrect; and, actually, it doesn’t always highlight the syntax as it should - for example, JSON highlighting wasn’t working for me;

feat: language as publish metadata

Feature Description

When user publish / share a new article, he/she should be able to select the language (iso code, en etc.) of the article.

This language should then be applied to the metadata of the published post <html lang="LANG"/>

Capture d’écran 2022-08-07 à 16 37 04

fix: prevent data overwrite

Feature Description

When user sign in, the document available locally - if it contains any changes - will be sync with the cloud.
If user has the document loaded on multiple devices, there is a chance that data are going to be overwritten.

Likewise, if use edit a post on multiple devices at the same time, data can be overwritten has there are no checks - currently - that the modified data is actually the current one.

That's why the store - the smart contract -should check updated_at dates before doing any updates - i.e. put and delete.

This has to be implemented in the Motoko code of the providers (https://github.com/papyrs/ic).

The dapp should be updated accordingly and should display only one - "cannot sync, maybe reload the document from the posts page..." in case of error.

Japanese writing not working well

Expected Behavior

Bug Behavior

Japanese text written on the title or body goes to next line and is duplicated because the enter key is pushed twice when Japanese is typed.

Reproduction

Steps to reproduce:

  1. Write in Japanese
  2. You can see duplicated text at the next line.

Video about the bug

Gif

Environment

  • Browser(s): Google Chrome
  • Operating System: macOS

feat: sitemap & rss feed for blogs

Feature Description

It would be cool to have a rss feed per blog and of course to update the feed each time a new article is published

docs: add markdown plugin to README

Feature Description

We've got a cool Chrome markdown-plugin (repo - web store) that can be use to convert a blog post to markdown but it isn't yet referenced in this README. Would probably be nice to mention it.

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.