
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
mkdocs-placeholder-plugin
Advanced tools
This plugin allows you to have placeholders in your site, that can be dynamically replaced at runtime using JavaScript (see demo page).
This README is just a short intro to the package.
For a quick start and detailed information please see the documentation for the last release.
The documentation is also available in the docs
folder of the source code and can be built locally with MkDocs.
If you want to use the latest development version (may be broken/buggy from time to time), you can install it by:
Cloning the repository:
git clone https://github.com/six-two/mkdocs-placeholder-plugin
cd mkdocs-placeholder-plugin
Building/Downloading the JavaScript files. Choose any of the following ways:
./build-docs.sh
script.Dockerfile
in the typescript
directory.
The whole thing can be done by running the buils.sh
script in the root directory:
./build.sh
Once you see mkdocs running, you can terminate it with Ctrl-C
.curl https://dev.mkdocs-placeholder-plugin.six-two.dev/placeholder.min.js -o src/mkdocs_placeholder_plugin/assets/placeholder.min.js
curl https://dev.mkdocs-placeholder-plugin.six-two.dev/placeholder.min.js.map -o src/mkdocs_placeholder_plugin/assets/placeholder.min.js.map
Installing the package with pip:
python3 -m pip install .
The corresponding documentation is hosted at https://dev.mkdocs-placeholder-plugin.six-two.dev.
Type mismatch: inline_editor_icons should be boolean, but is undefined
. If you encounter this issue, make sure to update to the latest version with pip install -U mkdocs-placeholder-plugin
or pin the fixed version with pip install mkdocs-placeholder-plugin==0.5.0-1
.inline_editors: false
to the settings
attribute in your placeholder-plugin.yaml
.normal_is_alias_for: dynamic
to the settings
attribute in your placeholder-plugin.yaml
.inline_editor_style
setting.<div class="placeholder-settings-panel"></div>
.import_rules_from
attributeemail
, linux_interface
, mac_address
, uuid
validators
section -> easier to reuse custom validators.placeholders
section.mkdocs.yml
.<placeholdertable>
).Apply all changes
buttons. See issue #3This release may be a bit buggy due to the rewrite and the documentation is not entirely accurate yet. I will update the docs after I also clean up / rewrite the python code (planed for v0.4.0).
default-function
and a validator rule's match_function
are now evaluated using new Function(...)
instead of eval(...)
, so you need to add a return statement.auto-input-table
is empty, now a info box is shown (instead of nothing / an empty table).auto_placeholder_tables_javascript
had no effect.Enter
on text fields without validators did not try to reload the page,domain
, file_name_linux
, file_name_windows
, hostname
, ipv4_address
, ipv4_range_cidr
, ipv4_range_dashes
, ipv6_address
, path_linux
, path_windows
, port_number
, url_any
, url_http
regex
or match_function
placeholder_extra_js
field to plugin configuration (for loading custom functions)default-function
attribute for placeholdersPlaceholderData
and PlaceholderPlugin
objects.
These interfaces are not stable, so you should probably not try to rely on them to much.replace_everywhere
attribute for placeholdersEnter
add_apply_table_column
Material for MkDocs
themedescription-or-name
column type to placeholder tables.Enter
is pressed (to immediately show the new values).
This is enabled by default.description
)<placeholdertable>
elements-v
flag (mkdocs serve -v
)mkdocs-placeholder-replace-static.py
input
element references a non-existent variableThis is just for me :)
Run linters:
mypy src
pyflakes src
Check npm code with podman:
podman run -it --rm --workdir /typescript -v "$(pwd)/typescript:/typescript" localhost/placeholder-npm:latest npm run lint
Or with docker:
docker run -it --rm --workdir /typescript -v "$(pwd)/typescript:/typescript" placeholder-npm:latest npm run lint
Update the changelog in this README file.
Update version number in ./setup.cfg
and typescript/src/api.ts
.
Run ./build.sh
to compile the latest JavaScript code and test that it works. python -m build
will only build the latest Python code, and incompatibilities between Python and JS code can break the release.
Disable debug_javascript
in placeholder-plugin.yaml
.
Build and update package.
Create a commit for the release (Version 0.X.Y
) and push it.
Add a tag named 0.X.Y
:
git tag 0.X.Y
Update the latest-release
branch, so that the documentation website gets updated:
git push
git branch --force latest-release HEAD
git push --tags origin latest-release
If you don't have them, install pip-tools
:
python3 -m pip install pip-tools
Then update requirements.txt
:
pip-compile -U
These are only used for the build process, so keeping them up to date is not that critical.
Start a container with nodeJS:
podman run -it --rm -v "$(pwd)/typescript:/mnt" node:latest bash
In the container run the following commands to update the typescript/package*.json
files on the host:
cd /mnt
npm i -g npm-check-updates
ncu -u
npm i --package-lock-only
Then rebuild the docker image on the host:
cd typescript/
podman build --tag placeholder-npm .
FAQs
Add dynamic placeholders to your mkdocs page
We found that mkdocs-placeholder-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.