Code Monkey home page Code Monkey logo

federated-blog's Introduction

WeBlog
Federated Blog

A federated blogging platform built for WeBuild Community. Federated blog is a network of interconnected blogs or websites, which called the Fediverse.

It was built for the Webuild community but please feel free to use it for your own community.

Install

Please make sure you have node and yarn (or npm) installed on your machine.

To run federated blog locally or on your own server:

  1. Clone this repo
git clone https://github.com/webuild-community/federated-blog.git
  1. Within your terminal, run yarn to install the dependencies
  2. Once the dependencies are installed, run yarn dev to start the dev server on localhost:3000

Don't forget to check out the channels.json, where RSS feeds storage.

To run in production:

  1. Builds the production application into the .next folder:
yarn build
  1. Start Node.js server:
yarn start

To run test:

yarn test

Contributing

Please see our CONTRIBUTING.md.

We have a list of good first issues that contain bugs or features which have a relatively limited scope. This is a great place to get started and get familiar with our contribution process.

federated-blog's People

Contributors

brokenricefilms avatar coder7een avatar duynglam avatar hta218 avatar huy-qn avatar huytd avatar huytq000605 avatar jangnh avatar ldhnam avatar ledongthuc avatar lqt93 avatar monodyle avatar namtx avatar nhanb avatar nhducit avatar nvh95 avatar pixelcarrot avatar qcam avatar tatthien avatar thanhnguyen-agilityio avatar thien-do avatar trinhlbk1991 avatar truongnmt avatar tuang3142 avatar tuhuynh27 avatar xuanvan229 avatar zerox-dg 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

Watchers

 avatar  avatar  avatar

federated-blog's Issues

Support mutilple languages

Because not all blogs are written in Vietnamese, our site need to support more than one language.

Acceptance criteria:

  • Have button to switch language.
  • Support at least 2 languages: Vietnamese and English.
  • Have translation word list of target languages.

Designation:

  • Using i18n lib.
  • Global state to manage.

Nice to have:

  • Auto detect language of browser and switch to the same language.

List post by user

We should have the ability to click on the author's name or avatar to list all posts by this author.

Write a proper README.md

It should highlight the following:

  • Project's description
  • How to install and run
  • How to contribute (Link to CONTRIBUTING.md)

Create ARCHITECTURE.MD

Create an ARCHITECTURE.MD file that:

  • Explain the project structure
  • Explain the architect of the project, how the user flow is, how the data goes through the backend and frontend
  • Explain how we curate the RSS feeds on index page and how did we show the post's content on read page

Code convention

Need prettier and eslint config for making a union code style for all contributors.

Cannot back to Home page when Randomly read an article several times

Steps to re-produce:

  1. Click on "Đọc ngẫu nhiên" (Read randomly) button.
  2. Redirect to an article page.
  3. Click on "Đọc ngẫu nhiên" (Read randomly) button again.
  4. Redirect to an article page.
  5. Click on "Quay về trang chủ" (Back to home page) button.

Expected result:

  • Back to home page

Actual result:

  • Back to previous page

Responsive button

Hello, I am poor. So I use iPhone 5. Please don't make me feel poor 🥲

image

Display user's avatar on each post

Instead of show the host name of the post, we should show the user's avatar and name instead:

image

This way, we can make it clear about the ownership of the post.


In order to do this, we need to make some enhancement on the RSS feed data we have, currently, it's just a plain list of feed URLs.

const FEEDS = [
  'https://thefullsnack.com/rss',
  'https://zerox-dg.github.io/blog/rss.xml',
  'https://quancam.net/rss',
  'https://learnlingo.co/feed/',
  ...
];

What I'm thinking about the new data structure would be:

const CHANNELS = [
  {
    feedUrl: 'https://thefullsnack.com/rss',
    displayName: 'HuyTD',
    avatarUrl: '...'
  }
]

cannot install on linux

og$ yarn
yarn install v1.22.21
[1/4] Resolving packages...
[2/4] Fetching packages...
error Error: https://registry.yarnpkg.com/@moai/core/-/core-1.2.0.tgz: Request failed "404 Not Found"
at ResponseError.ExtendableBuiltin (/usr/local/lib/node_modules/yarn/lib/cli.js:696:66)
at new ResponseError (/usr/local/lib/node_modules/yarn/lib/cli.js:802:124)
at Request. (/usr/local/lib/node_modules/yarn/lib/cli.js:66218:16)
at Request.emit (node:events:513:28)
at module.exports.Request.onRequestResponse (/usr/local/lib/node_modules/yarn/lib/cli.js:141751:10)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:695:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:536:22)
at TLSSocket.emit (node:events:513:28)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this comma

Support meta image for sharing

It would be really nice if we can have a "cover" image whenever we share a post on Facebook, Twitter or Slack. You can argue that user can directly share the original post to support cover image but still...it would be nice if we can generate a cover if it was shared via weblog.

I'm thinking of generating the cover image based on the post (pretty much like Github). A sample image could look like this:

image

We have 2 lock file

I don't know why we have package-lock.json and yarn.lock at the same time. Must be discussed and agreed to use one package manager.

Have a proper pagination

Currently we're using react-lazyload to workaround the need for pagination, this created a much bigger problem where we can't keep the scroll position after going back from read screen.

We should have a proper pagination.

Wrong pubDate order blog posts

Description:

  • Few links with newer published dates but's pushed to the end of paging.

Reproduce steps

  1. Go to the last page of read.webuild.community, e.g. https://read.webuild.community/page/15
  2. Check posts of thuc.space compare with others

Actual result

  • Posts of thuc.space is newer published date but it's below of others

Expected result

  • Correct order bases on pubDate

More information

  • RSS of thuc.space is in https://thuc.space/index.xml that has pubDate with a format "Fri, 23 Jul 2021 19:00:00 +0100", it can be a problem for parsing date

Build a pagination component

image

It should show the list of the available pages as decribed in the mockup.

Click on the three dot in the middle of the pagination should open a popover textbox, with Go button as well.

If there is only 1 page available, do not show the Previous/Next button, and show the disabled button with number 1 only.

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.