Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace .asc with .adoc is the official extension for Asciidoctor #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/md/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Keys marked with a * must be provided.
| `ignored-sitemap-paths` | A vector of regexes matching paths that you want to ignore when generating a sitemap. |
| `previews?` | Set this to `true` if you would like to display a list of recent posts rather than a full, single post on your home page. Discussed [here](/docs/customizing-the-index.html). `post-per-page` and `blocks-per-preview` must provided if this is `true`. |
| `post-per-page` | If post previews are enabled then this is the maximum number of previews on a page. Defaults to 5. |
| `blocks-per-preview` | The default number of (html) blocks to display per post preview. This can be overwritten by adding `<!--more-->` to your .md or .asc file to indicate where you'd like to break off your post. Defaults to 2. |
| `blocks-per-preview` | The default number of (html) blocks to display per post preview. This can be overwritten by adding `<!--more-->` to your .md or .adoc file to indicate where you'd like to break off your post. Defaults to 2. |
| `:description-include-elements` | The HTML elements from a preview whose content should be included in the plain-text `:description` of the page/post. Defaults to paragraphs and all headings, i.e. `#{:p :h1 :h2 :h3 :h4 :h5 :h6}`. |
| * `clean-urls` | `:trailing-slash`, `:no-trailing-slash`, and `:dirty` are valid options. Set this to `:trailing-slash` to emit html as subdirectories, e.g., `prefix/root/page-name/index.html`. Links would then end in `/page-name/`. Set this to `:no-trailing-slash` if you use GitHub Pages and prefer URLs not contain a final trailing slash. Links would then end in `/page-name`. <strong>Note:</strong> `:no-trailing-slash` will not work on all hosting providers such as Amazon S3. Set this to `:dirty` will result in `prefix/root/page-name.html`. Links would then end in `/page-name.html` **Note 2:** You can override the default URL with a smart use of <a href="/docs/customizing-cryogen.html"><code>:update-article-fn</code></a>. |
| `collapse-subdirs?` | Set this to `true` if you have your posts or pages organized in subdirectories and do not want that structure reflected in the url. e.g., `/awesome-post/` instead of `/2016/awesome-post/`. |
Expand Down
4 changes: 2 additions & 2 deletions content/md/docs/creating-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Similar to your posts, all of your pages should reside under the `page-root` fol

## Creating Pages

To create a new page, just make a new Markdown/AsciiDoc file under your `page-root`. You don't need to include a date in the file name or in the metadata like you did a post but words should still be dash-separated and the file must have a `.md` or `.asc` extension. For example:
To create a new page, just make a new Markdown/AsciiDoc file under your `page-root`. You don't need to include a date in the file name or in the metadata like you did a post but words should still be dash-separated and the file must have a `.md` or `.adoc` extension. For example:

```
about.md
my-projects.md
contact-me.asc
contact-me.adoc
```

### Page Contents
Expand Down
2 changes: 1 addition & 1 deletion content/md/docs/customizing-cryogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ See the cryogen 0.2.3 [auto-link customization gist](https://gist.github.com/hol


#### Override the default URI based on a custom article metadata
You have the post `2019-12-31-my-awesome-post.asc`, which would normally be displayed at https://blog.example.com/2019-12-31-my-awesome-post/ but you don't want to have the date in the URL. (You could simply move the date from the file name into the `:date` metadata but let's assume you don't want to for a reason.) So you have added the desired URL slug to the post:
You have the post `2019-12-31-my-awesome-post.adoc`, which would normally be displayed at https://blog.example.com/2019-12-31-my-awesome-post/ but you don't want to have the date in the URL. (You could simply move the date from the file name into the `:date` metadata but let's assume you don't want to for a reason.) So you have added the desired URL slug to the post:

```clojure
{:title "Awesome!" :slug "my-awesome-post"}
Expand Down
2 changes: 1 addition & 1 deletion content/md/docs/klipse.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Reagent and/or Ruby evaluation.

Alternatively, for asciidoc:

`hello-world.asc`
`hello-world.adoc`

{:title "A post"
:layout :post
Expand Down
4 changes: 2 additions & 2 deletions content/md/docs/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ my-blog
├── content
│   ├── asc
│   │   ├── pages
│   │   │   └── adoc-page.asc
│   │   │   └── adoc-page.adoc
│   │   └── posts
│   │   └── 2014-10-10-adoc-post.asc
│   │   └── 2014-10-10-adoc-post.adoc
│   ├── md
│   │   ├── pages
│   │   │   ├── about.md
Expand Down
2 changes: 1 addition & 1 deletion content/md/docs/switching-markdown-asciidoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Cryogen comes with [Markdown](https://daringfireball.net/projects/markdown/) support by default and you can only use one or the other.

If you want to use [AsciiDoc](http://asciidoctor.org/docs/what-is-asciidoc/) instead of Markdown, open the `project.clj` in your created blog and change the line in `:dependencies` that says `cryogen-flexmark` to `cryogen-asciidoc`.
Instead of looking for files ending in `.md` in the `content/md` directory, the compiler will now look for files ending in any of the following extensions in the `content/asc` directory: `.adoc`, `.ad`, `.asciidoc`, `.asc`.
Instead of looking for files ending in `.md` in the `content/md` directory, the compiler will now look in the `content/asc` directory for files ending in `.adoc`. (For backwards compatibility, it actually also looks for `.ad`, `.asciidoc`, and `.asc`. But only `.adoc` is the official file extension, and newer features such as xref only work with that.)

If you want to configure Cryogen's use of AsciiDoc or create AsciiDoc
extensions, see the repository for [cryogen-asciidoc](https://github.com/cryogen-project/cryogen-asciidoc).