We moved from a single-project organization to the Sveti Foundation umbrella, strengthening our growing ecosystem.
npm packages are now under the @sveti/ scope.
➀ne unopinionated Plugin
npm install @sveti/one-plugin
Then addPlugin() in your config:
import onePlugin from "@sveti/one-plugin";
export default function ($config) {
$config.addPlugin(onePlugin);
}
Live examples:
Plugin features
All https://buildawesome.one/plugin/features/ except mdAutoRawTags are included by default,
but you can toggle them like this:
$config.addPlugin(onePlugin, {
autoLinkFavicons: false,
mdAutoRawTags: true,
});
Plugin filters
All https://buildawesome.one/plugin/filters/ are included by default,
but you can toggle them like this:
$config.addPlugin(onePlugin, {
filters: { attr_set: false },
});
➀ne opinionated Config
npm install @awesome.me/buildawesome @sveti/one-config
Everything is installed automatically; the only manual step is to create a default layout.
For example, using the built-in Blades templates:
mkdir _includes
cd _includes/
ln -s ../node_modules/@sveti/blades/_includes/blades
echo "{% extends 'blades/html.njk' %}{% set site = { styles: ['https://cdn.jsdelivr.net/npm/@sveti/blades@3/css/blades.min.css'] } %}" > default.njk
cd ..
echo "Hello, world! 🎈" > index.md
Done! 🥷
: Now you can see the Build Awesome One in action by using its own built-in config:
npx @awesome.me/buildawesome --serve --config=node_modules/@sveti/one-config/buildawesome.config.js
—
If you don’t want to type --config=... every time, save it in your package.json:
"scripts": {
"build": "buildawesome --config=node_modules/@sveti/one-config/buildawesome.config.js",
"start": "npm run build -- --serve"
}
Now you can simply npm run start / build! 🥷
Live examples:
You can also import and use it as a base config:
import oneConfig from "@sveti/one-config";
export default async function ($config) {
await oneConfig($config);
$config.addPlugin(...);
}
Live example: https://github.com/open-sveti/one-examples/tree/main/og-images
All-in-➀ne Starter
https://starter.buildawesome.one/
Examples
https://github.com/open-sveti/one-examples
Documentation
评论