From bf631f817a2def5e33a96c87349add102b5a6081 Mon Sep 17 00:00:00 2001 From: Jakub Holy Date: Wed, 22 Nov 2023 09:22:57 +0100 Subject: [PATCH] Replace .asc with .adoc is the official extension for Asciidoctor [.adoc is the only officially supported extension](https://asciidoctor.zulipchat.com/#narrow/stream/279644-users.2Fasciidoctorj/topic/xref.20for.20inter-page.20links.20only.20works.20with.20.2Eadoc.20extension.3F/near/403493474) and newer features might not work with others (such as using xref for intra-document references). --- content/md/docs/configuration.md | 2 +- content/md/docs/creating-pages.md | 4 ++-- content/md/docs/customizing-cryogen.md | 2 +- content/md/docs/klipse.md | 2 +- content/md/docs/structure.md | 4 ++-- content/md/docs/switching-markdown-asciidoc.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/content/md/docs/configuration.md b/content/md/docs/configuration.md index 64def4e..4c143d4 100644 --- a/content/md/docs/configuration.md +++ b/content/md/docs/configuration.md @@ -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 `` 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 `` 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`. Note: `: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 :update-article-fn. | | `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/`. | diff --git a/content/md/docs/creating-pages.md b/content/md/docs/creating-pages.md index 1239e33..3e21a74 100644 --- a/content/md/docs/creating-pages.md +++ b/content/md/docs/creating-pages.md @@ -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 diff --git a/content/md/docs/customizing-cryogen.md b/content/md/docs/customizing-cryogen.md index 96cb14a..302e678 100644 --- a/content/md/docs/customizing-cryogen.md +++ b/content/md/docs/customizing-cryogen.md @@ -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"} diff --git a/content/md/docs/klipse.md b/content/md/docs/klipse.md index 24df488..cc9225e 100644 --- a/content/md/docs/klipse.md +++ b/content/md/docs/klipse.md @@ -63,7 +63,7 @@ Reagent and/or Ruby evaluation. Alternatively, for asciidoc: -`hello-world.asc` +`hello-world.adoc` {:title "A post" :layout :post diff --git a/content/md/docs/structure.md b/content/md/docs/structure.md index 876c3a0..b8c5c41 100644 --- a/content/md/docs/structure.md +++ b/content/md/docs/structure.md @@ -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 diff --git a/content/md/docs/switching-markdown-asciidoc.md b/content/md/docs/switching-markdown-asciidoc.md index 5796833..8c45a2e 100644 --- a/content/md/docs/switching-markdown-asciidoc.md +++ b/content/md/docs/switching-markdown-asciidoc.md @@ -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).