
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
This is the site generator for aep.dev and its forks. It takes AEP files in a git repository and outputs a static website.
We are not fans of rolling our own tools when off-the-shelf alternatives exist. However, the AEP project has grown sufficiently mature to warrant it.
GitHub Pages normally automatically builds documentation with Jekyll, but as the AEP system has grown, we are beginning to reach the limits of what Jekyll can handle, and other off-the-shelf generators had similar issues:
There are some additional advantages that we unlock with a custom generator:
This is essentially split into three parts:
aep_site/
):
aep_site/models/
) that represent the
fundamental concept of an AEP site. These are rolled up into a singleton
object called Site
that is used everywhere. All models are
dataclasses that get sent to templates.aep_site/publisher.py
) that is able to
slurp up a repo of AEPs and build a static site.aep_site/server.py
) that can run a development
server.support/templates/
) are Jinja2 templates containing (mostly)
HTML that makes up the layout of the site.support/assets/
and support/scss/
) are other static files. SCSS
is automatically compiled into CSS at publication.Of the models, there are three models in particular that matter:
site
variable.aep
variable.scope
variable.Templates are jinja2 files in the templates/
directory.
Note: We run Jinja in with "strict undefined", so referencing an undefined variable in a template is a hard error rather than an empty string.
There are two entry points for the app. The publisher
(aep_site/publisher.py
) is the program that iterates over the relevant
directories, renders HTML files, and writes them out to disk. The app
(aep_site/server.py
) is a lightweight Flask app that provides a development
server.
These entry points are routed through the CLI file (aep_site/cli.py
); when
this application is installed using pip, it makes the aep-site-gen
(publisher) and aep-site-serve
(server) commands available.
This site generator includes a basic extension system for AEPs. When processing AEPs as plain Markdown files, it will make any Markdown (level 2 or 3) header into a block. Therefore...
## Foo bar baz
Lorem ipsum dolor set amet
Becomes...
{% block foo_bar_baz %}
## Foo bar baz
Lorem ipsum dolor set amet
{% endblock %}
That allows an overriding template to extend the original one and override sections:
{% extends aep.templates.generic %}
{% block foo_bar_baz %}
## My mo-betta foo bar baz
Lorem ipsum dolor set something-not-amet
{% endblock %}
If you want to contribute to this project you will want to have a setup where you can make changes to the code and see the result of your changes as soon as possible. Here is a quick way to set up a local development environment that will enable you to work on the code without having to reinstall the command line scripts.
You'll need venv. On Linux, install with,
sudo apt-get install python3-venv
$ mkdir src
$ cd src
$ git clone https://github.com/aep-dev/site-generator.git
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install --editable .
$ aep-site-serve /path/to/aep/data/on/your/system
For quick serving, a docker container can also be used, wrapped in
a convenience script serve.sh
.
./serve.sh
FAQs
Static site generator for aep.dev and forks.
We found that aep-site-generator 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.