Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
docula.config.mjs
file to customize the build process. With PRE and POST methods.npx docula init
This will create a folder called site with the following structure:
site
├───site.css
├───logo.png
├───favicon.ico
├───README.md
├───docula.config.mjs
Note: for typescript do 'docula init --typescript'
Simply replace the logo, favicon, and css file with your own. The readme is your root project readme and you just need to at build time move it over to the site folder. If you have it at the root of the project and this is a folder inside just delete the README.md file in the site folder and docula will copy it over for you automatically.
npx docula
This will build your site and place it in the dist
folder. You can then host it anywhere you like.
If you want to use your own template you can do so by adding a docula.config.ts
file to the root of your project. This file will be used to configure the build process.
or at the command line:
npx docula --template path/to/template
If you want to build multiple pages you can easily do that by adding in a docs
folder to the root of the site folder. Inside of that folder you can add as many pages as you like. Each page will be a markdown file and it will generate a table of contents for you. Here is an example of what it looks like:
site
├───site.css
├───logo.png
├───favicon.ico
├───docula.config.mjs
├───docs
│ ├───getting-started.md
│ ├───contributing.md
│ ├───license.md
│ ├───code-of-conduct.md
The readme.md
file will be the root page and the rest will be added to the table of contents. If you want to control the title or order of the pages you can do so by setting the title
and order
properties in the front matter of the markdown file. Here is an example:
title: Getting Started
order: 2
docula comes with some helper functions that you can use in your markdown files.
doculaHelpers.getFrontMatter(fileName)
- Gets the front matter of a markdown file.doculaHelpers.setFrontMatter(fileName, frontMatter)
- Sets the front matter of a markdown file.doculaHelpers.createDoc(source, destination, frontMatter?, contentFn[]?)
- Creates a markdown file with the specified front matter and content. The contentFn is a function that is executed on the original content of the file. This is useful if you want to remove content from the original file.In some cases your markdown file will have html content in it such as the logo of your project or a badge. You can use the doculaHelpers.removeHtmlContent()
helper function to remove that content from the page. Here is an example:
You can use the doculaHelpers.getFrontMatter()
and doculaHelpers.setFrontMatter()
helper functions to get and set the front matter of a markdown file. Here is an example:
const frontMatter = doculaHelpers.getFrontMatter('../readme.md');
frontMatter.title = 'My Title';
doculaHelpers.setFrontMatter('../readme.md', frontMatter);
Code of Conduct and Contributing guidelines.
MIT © Jared Wray
FAQs
Beautiful Website for Your Projects
The npm package docula receives a total of 186 weekly downloads. As such, docula popularity was classified as not popular.
We found that docula 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.