Skip to main content

The really, really minimalistic static site generator

Project description

# Ampersand

The really, *really* minimalistic static site generator.

Ampersand is a minimal static site generator designed to help you manage
multiple translations of a website without needing to do so dynamically. On its
own, Ampersand is a command line utility that allows you to separate the text
content of your website from the markup and store it in a JSON file where you
can rebuild your page via Mustache templates.

Traditionally, managing translations of a website statically would look
something like this:

```
__ root
|
|__ scripts
| |__ scripts.js
|
|__ styles
| |__ styles.css
|
|__ lang
|__ en
| |__ index.html
| |__ about.html
| |__ ...
|
|__ fr
|__ index.html
|__ about.html
|__ ...
```

In this project, we have a website with two or more English pages that we
also translated into French. This works, but what happens when I want to make
some changes to `index.html`? In the past, it was as easy as making my changes
and saving. Now, I need to copy those changes over to the `fr` folder and
adapt.

It gets worse the more languages you add.

## How is Ampersand the solution?

Ampersand lets you create one HTML file that acts as a template and a series
of JSON files containing the translated phrases. With this, you can then compile
it into as many languages as you want.

Now, you can leave the translation to the globalization team and focus on
your code.

## Philosophy

So as you can tell, Ampersand is a pretty straightforward static site generator.
Some may even argue that it doesn't do much. This is because Ampersand is a
*minimalistic* static site generator. But of course, all static site generators
mention minimalism in their mission statement so saying it here doesn't mean
much. Never the less, Ampersand aims to do what it's supposed to do without
jumping through too many hoops that don't help it achieve its goal.

## Installation

Setting up Ampersand is fairly simple if you have `pip`. For those of you who
don't, [python.org](https://packaging.python.org/installing/) has it
documented.

```
$ pip install ampersand
```

For a bleeding edge and developer version, you can clone the repository:

```
$ git clone https://github.com/natejms/ampersand.git
$ cd ampersand
$ pip install .
```

To learn more about the usage of Ampersand, check out
[the documentation](https://github.com/natejms/ampersand/wiki)

## Contributing

Interested in making a contribution? Here's a few places where you might be
able to help out:

* Contribute patches and help develop new features
* Develop a plugin for Ampersand
* Work to improve the documentation
* Help spread the word

More information can be found in the CONTRIBUTING.md file of this repository.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ampersand-0.4.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ampersand-0.4.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file ampersand-0.4.0.tar.gz.

File metadata

  • Download URL: ampersand-0.4.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ampersand-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0c0fbd0b46a07979b2d1c0b082078dd9a211f396c7ac7c3ba294f81f3463c8ab
MD5 a17d8b91a0e42a30ec109c180a48df9f
BLAKE2b-256 2c8710d8c55bde0325c95c02124f2e6d277b964416351811c2a068da02fb9dee

See more details on using hashes here.

File details

Details for the file ampersand-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ampersand-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e8d1e9d48b8e8afa11dbc64c5ff37a18687800de8443079c4ee0271898a1701
MD5 5865c6f2195b537cd9cb0a03e81ac00b
BLAKE2b-256 18d9fca600b7731d20e592e4d316de26a37e961e7dfde28b65882e8602fa7f2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page