Skip to content

Commit

Permalink
feat(docs): content update
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Aug 19, 2015
1 parent 2c31245 commit ff4d47d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 6 deletions.
6 changes: 4 additions & 2 deletions _app/_posts/note/2014-04-01-custom-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ layout: post
title: Unique Post Styling via Custom CSS
category: note
tags: customization
scheme-text: "rgba(100, 16, 0, .5)"
scheme-code: "#fff"
scheme-text: "#000"
scheme-link: "#a73300"
scheme-hover: "#ff4e00"
scheme-code: "#a73300"
css: |
body {
background-image: linear-gradient(to bottom, #fff500, #ff8f00);
Expand Down
43 changes: 40 additions & 3 deletions _app/_posts/note/2014-06-10-themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The theme specific config `curtana.yml` should have the same filename as your th

More info about theme structure you can check out my default theme [Curtana](http://github.com/amsf/amsf-curtana).

You can also have multiple themes in your project, as many as you like. For example if you have themes Bootstrap and Ghost installed, the file structure should be:
You can also have multiple themes in your project, as many as you like. For example if you also have themes Bootstrap and Ghost installed, the file structure should be:

```
├── _app/
Expand All @@ -122,7 +122,8 @@ You can also have multiple themes in your project, as many as you like. For exam
| | | | └── example-fluid-container.md
| | | | └── ...
| | | └── curtana/
| | | | └── example-page.md
| | | | └── example-about.md
| | | | └── example-news.md
| | | | └── ...
| | | └── ghost/
| | | | └── example-archive.md
Expand Down Expand Up @@ -262,6 +263,42 @@ Template:
{{ '{% endif ' }}%}
```

### Theme Features

There're some features can be integrated into your theme.

#### Smooshing Assets

For better performance, Almace Scaffolding will find all the CSS, script links and images in compiled HTML, and outputs a version with all the CSS, scripts and images (Base64) written inline. Sounds cool? but it needs theme support. Here's how:

You can simply add the query string `?assets-inline` at the end of the file you'd like to be smooshed in production site:

```html
<!-- This CSS will be smooshed into HTML -->
<link rel="stylesheet" href="{% raw %}{{ '/css/app.css?assets-inline' | prepend: amsf_theme_assets }}{% endraw %}">

<!-- This script will be smooshed into HTML -->
<script src="{% raw %}{{ '/js/app.js?assets-inline' | prepend: amsf_theme_assets }}{% endraw %}"></script>
```

#### User Custom Styles Support

Define the following code snippet into your theme styles (Less) will allow users to custom your theme without touching the theme files:

```css
// Import user custom styles
@import "../../../_less/custom";
```

#### User Custom Scripts Support

Define the following code snippet into your theme template (it's recommended to put it in footer) will allow users to add custom scripts without touching the theme files:

```html
<!-- User custom scripts -->
<script src="{% raw %}{{ '/js/custom.js?assets-inline' | prepend: amsf_user_assets }}{% endraw %}"></script>
```

## Publishing Themes

You really like your custom design and wanna show it off to the world? Cool, you can create (pack) you own theme by the following command:
Expand All @@ -270,6 +307,6 @@ You really like your custom design and wanna show it off to the world? Cool, you
$ grunt theme-save
```

The activated theme will be save to AMSF cache (`_amsf/`) with correct file and directory structure, then you can upload your theme to GitHub.
The activated theme will be saved to AMSF cache (`_amsf/`) with correct file and directory structure, then you can upload your theme to GitHub.

Still confusing? see my default theme [Curtana](http://github.com/amsf/amsf-curtana) for reference.
2 changes: 1 addition & 1 deletion _app/_posts/note/2014-06-11-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ category: note
tag: getting-started
---

## Customizing
## Configuration SettingsPermalink

- All AMSF built-in settings can be configured at [`_config.yml`](https://github.com/sparanoid/almace-scaffolding/blob/master/_config.yml).
- Theme specific variables can be found at `./_app/_data/theme-name.yml`.
Expand Down
21 changes: 21 additions & 0 deletions _app/_posts/note/2014-06-11-customizing-styles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
layout: post
title: Customizing Styles
category: note
tags: customization
---

You can customize the basic look and feel without touching the theme files by changing `custom.js` and `custom.less`:

```
├── _app/
| ├── assets/
| | └── _js/
| | | └── custom.js
| | └── _less/
| | | └── custom.less
| | └── themes/
| | | └── ...
```

These files won't be overwritten when you update Almace Scaffolding or update your themes.

0 comments on commit ff4d47d

Please sign in to comment.