dugoly-blog

A fully implemented component for a blog without the need for a manual database connection. for more information go to dugoly, Developers tools

Install

npm install --save dugoly-blog

Usage

import React, { Component } from 'react'

import Blog from 'dugoly-blog'
class Example extends Component {
  render() {
    return <Blog ownerUid="skjdfsjfds" BlogTitle="this is my blog!" />
  }
}

props

  • ownerUid - the uid (user id) from dugoly This parameter is necessary to identify the owner of the blog (the user who has the right to write posts and edit posts) Without this component the blog cannot be identified, edited or read! In order to get the desired value to ownerUid you must find the user's uid in dugoly. How to do it? - See explanation below
  • bCode - Optional parameter to distinguish between different blogs of the same user, enter a unique value as you wish.
  • BlogTitle- The title of the blog, for display on the site, please note: this title is not saved in db and is not dependent on the blog, entering the same blog data on different sites with a different title, you will display the same blog and the same posts on each site, only by changing the title.
  • dir- Optional, gets the blog writing direction, by default it is left to right (ltr), can be set from right to left (rtl).
Note: The default link to the main instance of the blog is to blogy.click
But you can set your site as the main instance by dugoly blog updater

Note: From version 1.0.5 there is another prop - "withRouter" that includes the object that contains the "RelativePath" component that specifies the location of the blog
(Note: Do not set this location on the router as "exact")
Example: withRouter = {{RelativePath: "/ blog"}}
The value entered in RelativePath is the relative position of the blog on the site (not the whole path!)
WithRouter means that the library comes with a router so that the posts do not appear on the same main page of the blog but on the page "/ post / postId" relative to the original page where the blog appears
The default withRouter is false
Using a main instance for a post, customized - requires that the specified address be positively used withRouter

General instructions for using the component

In order to view the blog and its contents, there is no need for dugoly-login at all, but in order to edit and add blog posts, you need to login by dugoly Logging in with dugoly will enter the user's ID values in cookies, and if he is defined as the blog owner, he will be able to edit and add blog posts In order to log in and verify user information with dugoly you must install the dugoly-login component (click for more explanation)

How do I get the uid?

Go to the dugoly website to the get my uid page at the link: https://dugoly.com/managementInterface/geyMyUid.html . Once you have logged in with the authentication details of the user who will be the blog owner, you will receive the uid there You can also get them at any site that logs in with dugoly in cookies Or, if you have a site and the above user logged in to your site with dugoly, you can see its details in the management interface

Instructions for implementing rss feed Click on this link

Additional libraries

To view dugoly's list of libraries click here

License

MIT © omershiran motto - Application and website development