Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
File based Content Management System, easy to use with content stored in native file system
File-CMS is a filesystem-based Content Management System (CMS), offering functionality similar to a headless CMS. It provides APIs to fetch content from files stored in a specified convention, making content management easy and developer-friendly.
Filesystem-Based: File-CMS allows you to manage your content directly within the filesystem, making it easy to use version control tools like Git or any other Source Code Management (SCM) system to track changes.
Headless CMS: Like a traditional headless CMS, File-CMS separates content management from front-end presentation. You can fetch content via APIs, giving you full flexibility over how and where your content is displayed.
Markdown Support: Create the content in Markdown format along with metadata
Developer-Friendly: With a simple setup, File-CMS is designed with developers in mind. It integrates seamlessly into modern development workflows, enabling efficient content management and versioning without the need for complex backend systems.
Version Control Integration: Since content is stored as files, you can manage updates, rollback changes, and collaborate with others using Git or any other SCM system. This ensures a clear history of content updates, branching, and merging capabilities.
Store Content: Store your content in the filesystem using a predefined structure or convention.
Version Control: Use Git or any other SCM to version and manage content.
Fetch Content: Use the provided API to fetch the content from the filesystem, and integrate it into your application’s front-end, mobile app, or any other service.
rootDir
.blog
, product
, page
).[slug].md
.Each content file is divided into two sections:
title
, date
, author
).Example of a content file:
```YAML
title: "Sample Blog Post"
author: "John Doe"
date: "2024-09-06"
tags: ["blog", "example"]
```
# Welcome to the Sample Blog Post
This is an example of content written in Markdown.
NOTE: Make sure Meta section starts with
```YAML
and ends with```
The content returned from the API follows this structure:
{
"type": "blog",
"slug": "sample-blog-post",
"content": "Content in Markdown",
"title": "Sample Blog Post",
"author": "John Doe",
"date": "2024-09-06",
"tags": ["blog", "example"]
}
No Databases: Manage content without needing a database. File-CMS uses the filesystem, simplifying your infrastructure.
Versioning Made Easy: Leverage the power of Git or any SCM for full control over content revisions, changes, and collaboration.
Decoupled Architecture: Fetch content via APIs and render it anywhere—whether in a web application, mobile app, or other environments.
npm install file-cms
/rootDir/
/blog/
post-1.md
post-2.md
/product/
product-1.md
import { Config, getContent } from 'file-cms';
Config.setRootDir('/rootDir'); // set the root dir to path where the content is stored
const content = getContent('blog', 'post-1'); // getContent by type and slug
console.log(content);
import { Config, listContent } from 'file-cms';
Config.setRootDir('/rootDir'); // set the root dir to path where the content is stored
const contents = listContent(
{ // Content filters
type: 'blog',
tags: {
has: "serverless"
}
},
["type", "slug", "title"], // select attributes
sortCompareFn // sort compare function
); // list all contents of type blog and containing serverless keyword in the meta section
console.log(contents);
Check tests folder for more examples
Contributions are welcome! Please read the fork and open a PR to improve File-CMS.
File-CMS is released under the MIT License. See the LICENSE file for more details.
This project is a part of the Open Source Initiative from Sodaru Technologies
Write an email to opensource@sodaru.com for queries on this project
FAQs
File based Content Management System, easy to use with content stored in native file system
The npm package file-cms receives a total of 1 weekly downloads. As such, file-cms popularity was classified as not popular.
We found that file-cms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.