Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
markedpage
Advanced tools
Readme
A Markdown provider for my sveltekit static blog.
<!-- more -->
tag, it will add excerpt into frontmatterconst config = {
title: 'TestWebSite',
classifier: [
{ id: 'post', params: { path: '/_posts/' }, type: 'directory' },
{ id: 'tag', params: { keys: ['tag', 'tags'] }, type: 'frontmatter' }
],
marked: {
options: {},
extensions: {}
}
};
export default config;
/
|_docs
|_posts
|_2022-04-28-post1.md
// example.ts
import type { DirectoryClassifierResult } from 'markedpage';
import { getPage, classifiedSet } from 'markedpage';
import type { RequestHandler } from '@sveltejs/kit';
export const get: RequestHandler = async () => {
// Get list.
const pageSet: DirectoryClassifierResult = await classifiedSet('post');
const pages = pageSet.pages;
// Get page.
const page = await getPage('post1');
const context = await page.render();
return {
body: {
pages: pages,
metadata: page.frontMatter,
body: context
}
};
};
<!-- 2022-04-28-firstpage.md -->
title: FirstPost
tags:
- test
---
This is summary field.
<!-- more -->
This is context block.
It will be passed to
{
frontMatter: {
title: 'FirstPost',
tags: [ 'test' ],
excerpt: 'This is summary field.',
created: 2022-04-28T00:00:00.000Z
},
sourcePath: 'docs/2022-04-28-firstpage.md',
indexPath: 'docs/2022-04-28-firstpage',
render: [Function: render],
raw: [Function: raw],
slugKey: 'firstpage'
}
markedpageVitePlugin()
to config.plugins// vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
import { markedpageVitePlugin } from 'markedpage';
import siteConfig from './src/site.config.js';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit(), markedpageVitePlugin(siteConfig)]
};
export default config;
// src/routes/
<script lang="ts">
import { invalidate } from '$app/navigation';
import { page } from '$app/stores';
import { onContentUpdate } from 'markedpage';
onContentUpdate((payload) => {
let slug = $page.params.slug;
// update endpoint data.
invalidate(`/api/posts.json`);
invalidate(`/api/posts/${slug}.json`);
});
</script>
https://github.com/saweima12/markedpage-example
_draft
field support in FrontMatter.(It will not be added to list in production)FAQs
Markdown source provider & classification utilities
We found that markedpage 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.