Coder Social home page Coder Social logo

thematters / ipns-site-generator Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 2.0 7.93 MB

Matters Site Generator for IPFS/IPNS

Home Page: https://www.npmjs.com/package/@matters/ipns-site-generator

TypeScript 55.47% Nunjucks 44.53%
ipns ipns-ipfs site-generator

ipns-site-generator's People

Contributors

dependabot[bot] avatar gary02 avatar guoliu avatar robertu7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

zatol gary02

ipns-site-generator's Issues

Publish ActivityPub data into IPNS directory

Current

This package is used to create and update personal websites on IPNS. When publishing a new article, it creates a separate directory with HTML, JS, CSS, and media files, attaches it to the IPNS directory, and updates the RSS feed, JSON feed, and index.html.

New feature requested

  • Able to store ActivityPub data: JSON files of ActivityPub are stored in the same IPNS directory, alongside HTML, RSS, and JSON feed.
  • Render article comments: The HTML web app can retrieve ActivityPub data from relative paths and render article comments.
  • It should be able to accept an IPNS key pair and create or update the corresponding IPNS record
  • It should be able to be used with local or remote IPFS nodes, likely by accepting the address of the IPFS.

The final API could be:

f(Activity: any, IPFSNodeAddress: string, IPNSKeyPair: any, NewDirectory: bool) ->  UpdatedIPNSRecord: string

Related work

ActivityPub integration by Distributed Press: hyphacoop/distributed-press-organizing#80 It would be ideal if both features/modules share the same API.

ipfs article links not working if accessed via single article IPFS entry

analytic script for IPFS deliver

We need to add an analytic script to HTML files on IPFS in order to know the page views.

  • Analytics script should be injected to head in the HTML template
  • Analytics script should be loaded from https://static.matters.news/analytics.js. Currently, it's an obsolete script using segment, we should update it to firebase.
    • Firebase Doc can be found here. Note that it uses event screen_view, but we might want to use page_view for consistency with matters.news
    • The analytic script is stored in AWS S3 bucket matters-public-files and mapped to https://static.matters.news already. The updated script should be uploaded here and tested on firebase console to see if it works.
    • Then bump the version, and CI will publish a new version of the package.
    • Finally update the version number of this package on matters server.

`npm run test` failed

Describe the bug
two tests throw Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error

To Reproduce
Steps to reproduce the behavior:

  1. git clone this repo
  2. cd to root dir and run npm ci or npm i
  3. run npm run test
  4. See error

Expected behavior
test pass without errors

Screenshots
npm run test :
2022-08-16-113232_2096x941_scrot

Desktop (please complete the following information):

  • node: v16.16.0
  • npm: 8.11.0
  • git revision: 9242e4c

Additional context

I tried upgrading jest family to v28, but tests still failed with same errors after work out other problems brought by upgrade

Revise IPFS publishing flow for Circle articles

To avoid unnecessary changes to codebase, we'll keep most of publishing flow the same but revise content published to IPFS for Circle article:

  • Summarize post content and publish it to IPFS
  • Put the Circle page link at the end of the content

TBD:
IPFS content format with link to circle.

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.