Skip to content

Tsukumogami-Software/milou

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

554 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐶 Milou a static press kit generator

Screenshot

Milou is a static site generator that helps you create beautiful and informative press kits to showcase your company and products to the press. It lets you present your brand story, press releases, media assets, and key team members in a structured and engaging manner.

Features

  • Static site generation: Milou generates static HTML files, with fast-loading times, accessibility by default, and responsive design
  • YAML configuration: Simple and human-readable configuration format
  • Boilerplate templates: Let Milou give you a template configuration and fill in the blanks with your content

Showcase

Getting started

Installation

You will need a terminal and Node.js.

Install Milou using npm:

npm install -g milou

Company

Create a new directory containing your company data:

mkdir mypresskit
cd mypresskit
milou new

The root directory of your project contains your company data. You should present your company by filling in the generated data.yml file in this directory. You can use this example of a completed company data.yml file as a reference.

You should put images for your company in the images subfolder. Images named header.* (e.g. header.png or header.jpg) will be used in the page header. Files prefixed by logo (e.g. logo01.png or logo.jpg) will be put in the logos section of your page. Any other image in this folder will be included as an image in the generated press kit.

Images contained in sub-folders, such as images/screenshot, will be displayed in a sub-section of the images section.

To include a custom CSS file, create a file named style.css in your company folder. It will be automatically included in every page.

Product

Create a new sub-directory containing a product:

mkdir myproduct
cd mypresskit
milou new -t product

The product folders will contain data for your software, games, or any other kind of product. Like for companies, write your content in the generated data.yml file in this directory. You can this example file as a reference.

Images should also be included in the new images subfolder.

Build

Your project should now look like this:

📄 data.yml
📂 images/
  📄 header.png
  📄 logo.png
📂 myproduct/
  📄 data.yml
  📂 images/
    📄 header.png
    📄 logo.png
    📄 screenshot1.png
    📄 screenshot2.png

From the root directory of your project, you can now build your static site:

milou build .

This will output the static HTML, CSS, and images in the build folder. You can now start a web server to serve your content:

cd build
npx serve

Upload this folder to any static site host (GitHub pages, Netlify, CloudFlare pages, etc...) to make your press kit accessible to the whole world.

Command line reference

milou new [options] <destination>

Create an empty `data.yml` file and its `images/` folder in the <destination> folder (current working directory by default).

  There are two template types available: company (default) or product.

Options:
  -V, --version         output the version number
  -t, --type [company]  set the type of the new `data.yml` file (default: "company")
  -h, --help            display help for command
milou build [options] <entry point>

Generate a press kit based on information found in `data.yml` files.

Options:
  -V, --version               output the version number
  -o, --output [destination]  output the build folder to the [destination] (defaults to ./build) (default: "/Users/alicegg/Code/mypresskit/myproduct/build")
  -w, --watch                 watch project for changes and re-generate if needed
  -p, --port [8080]           set the server port to [8080] (default: 8080)
  -D, --clean-build-folder    delete the build folder beforehand
  -T, --ignore-thumbnails     use original images in galleries instead of thumbnails (will increase pages size)
  --no-zip                    disable creating archives for images
  --s3-bucket [bucket]        the S3 bucket to use for storing archives
  --s3-public-url [url]       the public URL of your S3 bucket for archives
  -h, --help                  display help for command

Troubleshooting

Image archives are too large

Milou will automatically create .zip archives containing the images and logo available on each page. This helps journalists easily download all your assets (instead of having to manually right click on each image).

The resulting file might be very large and go above the limit set by your hosting provider.

If you are not interested in this feature, you can simply disable it using the --no-zip command line argument.

Otherwise, you can upload those archives to an S3-compatible storage (AWS S3, CloudFlare R2, Google Cloud Storage, etc...). You'll need to make sure those environment variables are configured with your credentials:

  • AWS_ENDPOINT_URL_S3
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION

Then pass the bucket you want to target using the --s3-bucket argument, as well as the public URL of you bucket using --s3-public-url.

Credits

Milou was forked from presskit.html, made by Pixelnest Studio.

Presskit.html was inspired by presskit(), made by Rami Ismail.

Packages

 
 
 

Contributors