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.
Export documents to a single file. It makes use of a template so the format can be whatever you want (JSON, CSV, One big HTML file, what-ever)
Description: Export documents to a single file. It makes use of a template so the format can be whatever you want (JSON, CSV, One big HTML file, what-ever).
mkdocs > 1.1
Configuration options:
export_filename: Name of the exported file. Defaults to docs.json
export_folder: Folder to save export into. Defaults the global site_dir
setting (works with mkdocs serve
as well)
export_template: Path to the file which contains the template for the export page. It is None
by default, which means that the package-provided template is used. It can be an absolute path, or relative to the folder in which mkdocs
is run.
Add configuration to mkdocs.yml
plugins:
- mkdocsexport:
export_filename = "filename.ext"
export_folder = "path/to/folder"
export_template = "path/to/template"
Install this plugin (it will also install mkdocs if required)
pip install mkdocsexport
or
pip install git+https://github.com/philips-labs/MkdocsExportPlugin.git
The layout of the exported page is a jinja2 template file. The package provides such a template by default, with the following content:
[
{% for page in pages %}
{
"title": "{{page.title}}",
"file": "{{page.file.name}}",
"content":"{{page.content|escape}}"
}{%if loop.nextitem %},{%endif%}
{% endfor %}
]
You can also provide your own template. The page
object contains all the metadata in a mkdocs page, and in addition a .filename
attribute, which contains the file name of the source of the page (relative to the docs folder), which can be used to link to that page.
FAQs
Export documents to a single file. It makes use of a template so the format can be whatever you want (JSON, CSV, One big HTML file, what-ever)
We found that mkdocsexport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.