Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Socrates is a simple static site generator. It's geared towards blogs. You write your posts in your favorite plain text to HTML language (e.g. Markdown, textile, reStructuredText) and save them as text files on your harddrive. Socrates then takes them, and creates a full HTML site for you. For free, you will get a home page which lists latest posts, single post pages, category pages, archive pages, an about page and an atom feed.
First, you need to create a new blog::
$ socrates -i blog
This will create a blog
directory with a simple blog structure::
blog
posts
2010-your-post.md
pages
about.md
contact.md
layout
index.html
single.html
category.html
...
media
style.css
config.yaml
The posts
directory is where you will place your posts files. Anything
prefixed with _
or .
will be ignored. layout
is your basic theme or
a template. config.yaml
is a site-wide configuration file. Don't forget to
update the about file with relevant information.
You can also create a new blog in the current working directory::
$ socrates -i
When you are ready to generate your site, you run::
$ socrates -g blog
Or, ::
$ socrates -g
for current directory.
This will place all the generated files in blog/deploy
. You can then take
that directory and upload it to your server.
First, set up your virtual environment and pip install Socrates.
::
virtualenv env --no-site-packages
source env/bin/activate
pip install socrates
Or, to get the latest code, you can install from Github or Bitbucket.
::
pip install -e git://github.com/honza/socrates.git#egg=socrates
The next step is to install your templates. At the moment, you can choose
between Django templates
_ and Jinja2 templates
_. The default theme uses
Django.
Socrates supports Django templates and Jinja2 templates. You can specify which
templating engine you wish to use in the config.yaml
file. There are two
basic themes in the themes
directory to get you started.
Socrates will attemp to convert your text files into HTML using a text
processor. You should specify the name of the text processor in
config.yaml
. It should be all lowercase. Currently supported processors:
You can start a simple development server to aid you in development.::
$ socrates -r blog
Or, ::
$ socrates -r
for current directory.
During development and/or composing a layout theme, it might be useful to always re-generate all posts, without caching. To do so, you can run the following option: ::
$ socrates -c
The documentation is contained within the docs
directory and is written in
reStructuredText using Sphinx
_. The documentation is easily read in a
standard text editor. However, you can build an HTML version like so::
$ pip install sphinx
$ cd docs/
$ make html
$ open _build/html/index.html
Or, you can view the online version of the latest documentation
_.
Socrates is licensed under the terms of the 3-clause BSD license.
All contributions are welcome. Please do ask if a feature is wanted before starting work to avoid wasting your time.
Please report all bugs on Github. Mailing list
_. You can also come visit us
in #socrates
on freenode.
Socrates was originally written by Honza Pokorny. For a complete list of authors, please see the AUTHORS file.
Honza's blog <http://honza.ca>
_Adam's blog <http://thurloat.com>
_.. _Django templates: https://docs.djangoproject.com/en/1.3/#the-template-layer .. _Jinja2 templates: http://jinja.pocoo.org/docs/ .. _Sphinx: http://sphinx.pocoo.org/ .. _documentation: http://readthedocs.org/docs/socrates/en/latest/index.html .. _Mailing list: https://groups.google.com/group/python-socrates
FAQs
Socrates is a simple static site generator.
We found that socrates 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.