
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
blog-easy-client
Advanced tools
blog-easy-client is a javascript client library for [bog-easy](https://github.com/allkods/blog-easy) which enables us to integrates a full automated blog system to a website without having to write any code. It consists of :
blog-easy-client is a javascript client library for bog-easy which enables us to integrates a full automated blog system to a website without having to write any code. It consists of :
A javascript client library for the browser (this repository)
Header
, Sub-headers
, Paragraphs
, Notes
, List
, images
, code-snippets
and many more elementsA Node.js package (for server)
npm i blog-easy-client
Once you have installed the blog-easy-client library, you can now init the client.
Using CDN
<script src="https://cdn.allkods.in/blog-easy-client.js"></script>
using NPM
import { blogEasy } from 'blog-easy-client'
blogEasy({
wrapper: /* The selected div container where all the elements will added */,
post: /* URL or route where the data will be posted */,
type: /* can be upload or edit */
})
blogEasy({
wrapper: document.getElementById('container'),
post: '/blogPost',
type: 'upload'
})
blogEasy({
wrapper: document.getElementById('container'),
post: '/blogPost',
type: 'edit'
})
To style elements you need to link your custom CSS and pass the class name to the elements as follow:
blogEasy({
wrapper: document.getElementById('container'),
post: '/blogPost',
type: 'upload',
class:{
header : 'custom_class_name',
subHeader : 'custom_class_name',
para : 'custom_class_name',
h3 : 'custom_class_name',
h4 : 'custom_class_name',
h5 : 'custom_class_name',
h6 : 'custom_class_name',
list : 'custom_class_name',
listElem : 'custom_class_name',
paraSpace : 'custom_class_name',
note : 'custom_class_name',
code : 'custom_class_name',
imageBox : 'custom_class_name',
coverImage : 'custom_class_name',
date : 'custom_class_name'
}
})
<form action="/blog" method="GET">
<input name= "search" type="search" value="<%= search %>" placeholder="your search query here....">
<button>Search</button>
</form>
The route for the action will be same as getting all blog post route
<% if(next) {%>
<a href="/blog?page=<%= page+1 %>&search=<%= search %>">Next</a>
<% } %>
<% if(back) {%>
<a href="/blog?page=<%= page-1 %>&search=<%= search %>">Back</a>
<% } %>
<% posts.forEach(post =>{ %>
<a href="/blog/<%= post.slug %>">
<div>
<p><%= post.title %></p>
<div style="
background:url('<%= post.coverImage %>');
background-size: cover;">
</div>
<p><%- readableDate %></p>
</div>
</a>
<% }) %>
<div><%- blogHtml %></div>
You can use
<%= blogTitle %>
and<%= blogImageSrc %>
in their meta tags for creating search engine friendly content
<a href="/blog/<%= slug %>/edit">
<button>Edit</button>
</a>
You can implement your own logic for showing button only if user is logged in or is admin
<form action="/post-delete" method="POST">
<input type="hidden" name="slug" value="<%= slug %>">
<button>Delete</button>
</form>
You can implement your own logic for showing button only if user is logged in or is admin
FAQs
A javascript client library for blog-easy which integrates a fully automated blog CMS (content management system) which makes it easy to create and publish blog post
We found that blog-easy-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.