iA-Writer-Templates-Dev
Preview and create your own templates for iA Writer with ease.
Requirements
Setup
- Clone or download this repository.
- Navigate to the repository in your Terminal.
- Run
yarn
to install dependencies. - Run
gulp
to start the development server
Development
Put your template bundles in src/templates
and rename style.css
to style.scss
.
The styles are parsed by SASS and PostCSS Autoprefixer. This allows to write CSS without relying on vendor prefixes.
SCSS allows importing additional and shared files. For example a _typography.scss
placed in src/styles
could be imported by writing @import '../../../../styles/typography';
inside the style.scss
in a template bundle, which is useful if you plan to create multiple bundles sharing some code.
Sample content can be put into src/content
, one Markdown file per template bundle. Make sure the names match. Since this project can't use the same Markdown engine that iA Writer uses, the rendered Markdown is only an estimate. If something looks off or is not supported check your bundle in iA Writer. It is not planned to reimplement the exact rendering.
Output
Output is stored in the dist
folder.
Notes
Since CSS is not quite made for print, please keep in mind that A4 (210mm by 297mm) roughly translates to 596 by 842 px. The demo pages contain CSS which adds this height as a min-height to the body.
Credits
- Kristina for the idea