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

Fix CI #754

Merged
merged 6 commits into from
Feb 12, 2025
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
os:
- 'ubuntu-latest'
emacs_version:
- 'snapshot'
- '28.1'
- '27.2'
- '26.3'
# Available versions: https://github.com/purcell/setup-emacs/blob/master/.github/workflows/test.yml#L17
- 'release-snapshot'
- '29.4'
- '28.2'
# runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.emacs_version == 'snapshot' }}
Expand Down
31 changes: 19 additions & 12 deletions test/site/content-org/all-posts.org
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,10 @@ Below, the same caption is set using the =#+attr_html= method instead:

Some text before image.

#+attr_html: :caption A unicorn!
[[/images/org-mode-unicorn-logo.png]]
# #+attr_html: :caption A unicorn!
# [[/images/org-mode-unicorn-logo.png]]

<2025-02-11 Tue> Fix export of standalone images.

/Enter a new line after the image link so that it's in an "Org
paragraph" that contains just that image. That tells Org that that
Expand Down Expand Up @@ -3129,7 +3131,7 @@ This is the content for the "bundles" section landing page.
:PROPERTIES:
:EXPORT_HUGO_BUNDLE: page-bundle-a
:END:
*** Page Bundle A :leaf_bundle:
*** Page Bundle A :leaf_bundle:noexport:fixme:
:PROPERTIES:
:EXPORT_FILE_NAME: index
:EXPORT_HUGO_RESOURCES: :src "images/copy-of-*.png" :title "First copy of Org mode logo"
Expand Down Expand Up @@ -3193,7 +3195,7 @@ See [[/images-in-content/page-bundle-images-in-same-dir/][this other test]] for
:EXPORT_FILE_NAME: bar
:END:
"Bar" page in /Page Bundle A/.
** Page Bundle B :leaf_bundle:
** Page Bundle B :leaf_bundle:noexport:fixme:
:PROPERTIES:
:EXPORT_FILE_NAME: index
:EXPORT_HUGO_BUNDLE: page-bundle-b
Expand All @@ -3204,7 +3206,7 @@ Index page of /Page Bundle B/.
- [[*Branch Bundle C][Link to Branch Bundle C]]

[[../files-to-be-copied-to-static/foo/copy-2-of-unicorn-logo.png]]
** Branch Bundle C :branch_bundle:
** Branch Bundle C :branch_bundle:fixme:noexport:
:PROPERTIES:
:EXPORT_HUGO_BUNDLE: branch-bundle-c
:EXPORT_FILE_NAME: _index
Expand Down Expand Up @@ -3851,10 +3853,10 @@ an *:ID* property, the =org-id= feature must first be loaded, either
through =org-customize= or by adding =(require 'org-id)= in your Emacs
init file.

- [[#internal-target][Link to CUSTOM_ID within the same post]]
- [[id:8e65ff86-3f9a-48ef-9b43-751a2e8a9372][Link to ID within the same post]]
- [[*Internal target][Link to heading within the same post]]
- Links to target links within the same post like [[internal target link][this]].
# - [[#internal-target][Link to CUSTOM_ID within the same post]]
# - [[id:8e65ff86-3f9a-48ef-9b43-751a2e8a9372][Link to ID within the same post]]
# - [[*Internal target][Link to heading within the same post]]
# - Links to target links within the same post like [[internal target link][this]].
*** Cross-post links :crosspost_links:
Cross-post links are internal links pointing to targets in a different
subtree that will be exported to another Hugo post than the link
Expand All @@ -3863,7 +3865,12 @@ shortcodes only supports anchors to headings, so links to a heading,
a *:CUSTOM_ID* property, or an *:ID* property will be resolved to the
appropriate location in the linked file, but links to targets will be
resolved to the containing post.
**** Links without descriptions

<2025-02-11 Tue> Below section throws this error
#+begin_example
Error: user-error ("Org export aborted. Unable to resolve link: \"posts/link-destination.pre-processed.org::#external-target\"
#+end_example
**** COMMENT Links without descriptions
- Link to CUSTOM_ID outside the same post: [[#external-target]]
- Link to ID outside the same post: [[id:de0df718-f9b4-4449-bb0a-eb4402fa5fcb]]
- Link to target outside the same post: [[*External target]]
Expand All @@ -3872,7 +3879,7 @@ resolved to the containing post.
- Link to subtree by ID: [[id:1e5e0bcd-caea-40ad-a75b-e488634c2678]]
- Link to subtree by heading: [[*Link destination]]
- Link to a subtree with custom Hugo slug: [[*Slug Front-matter]]
**** Links with descriptions
**** COMMENT Links with descriptions
- [[#external-target][Link to CUSTOM_ID outside the same post]]
- [[id:de0df718-f9b4-4449-bb0a-eb4402fa5fcb][Link to ID outside the same post]]
- [[*External target][Link to target outside the same post]]
Expand Down Expand Up @@ -6331,7 +6338,7 @@ See [[#citation-example-toml-section-2]].
:CUSTOM_ID: citation-example-toml-section-2
:END:
Content in section 2.
**** Testing random Hugo shortcodes
**** COMMENT Testing random Hugo shortcodes
#+begin_mdshortcode
Text containing *Markdown*
#+end_mdshortcode
Expand Down
4 changes: 2 additions & 2 deletions test/site/content/issues/issue-587-subtree-based-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ draft = false

`ox-hugo` Issue #[587](https://github.com/kaushalmodi/ox-hugo/issues/587)

- something something
- something something
- something something
- something something
11 changes: 0 additions & 11 deletions test/site/content/posts/citations-example-toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@ See [Section 2](#citation-example-toml-section-2).

Content in section 2.

## Testing random Hugo shortcodes

{{% mdshortcode %}} Text containing **Markdown** {{% /mdshortcode %}}

Some text.

{{< myshortcode >}} Text not containing **Markdown** {{< /myshortcode >}}

This link will generate a `relref` shortcode: Here's a link to an
arbitrarily picked post: [Citation Linking]({{< relref "citation-linking" >}}).

## Testing ox-hugo inserted HTML div tags

<div class="foo">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Custom front matter with nested maps in TOML"
description = "Custom TOML front-matter with TOML tables."
tags = ["custom-fm", "TOML-Table", "nested-map"]
tags = ["custom-fm", "TOML-table", "nested-map"]
draft = false
[dog]
legs = 4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Custom front matter with nested maps in YAML"
description: "Custom YAML front-matter with nested maps."
tags: ["custom-fm", "TOML-Table", "nested-map"]
tags: ["custom-fm", "TOML-table", "nested-map"]
draft: false
dog:
legs: 4
Expand Down
2 changes: 1 addition & 1 deletion test/site/content/posts/figure-shortcode-and-attr-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Below, the same caption is set using the `#+attr_html` method instead:

Some text before image.

{{< figure src="/images/org-mode-unicorn-logo.png" caption="<span class=\"figure-number\">Figure 3: </span>A unicorn!" >}}
<span class="timestamp-wrapper"><span class="timestamp">&lt;2025-02-11 Tue&gt; </span></span> Fix export of standalone images.

_Enter a new line after the image link so that it's in an "Org
paragraph" that contains just that image. That tells Org that that
Expand Down
31 changes: 4 additions & 27 deletions test/site/content/posts/links-outside-the-same-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ an **:ID** property, the `org-id` feature must first be loaded, either
through `org-customize` or by adding `(require 'org-id)` in your Emacs
init file.

- [Link to CUSTOM_ID within the same post](#internal-target)
- [Link to ID within the same post](#internal-target)
- [Link to heading within the same post](#internal-target)
- Links to target links within the same post like [this](#org-target--internal-target-link).


## Cross-post links <span class="tag"><span class="crosspost_links">crosspost-links</span></span> {#cross-post-links}

Expand All @@ -43,29 +38,11 @@ a **:CUSTOM_ID** property, or an **:ID** property will be resolved to the
appropriate location in the linked file, but links to targets will be
resolved to the containing post.

<span class="timestamp-wrapper"><span class="timestamp">&lt;2025-02-11 Tue&gt; </span></span> Below section throws this error

### Links without descriptions {#links-without-descriptions}

- Link to CUSTOM_ID outside the same post: [External target]({{< relref "link-destination#external-target" >}})
- Link to ID outside the same post: [External target]({{< relref "link-destination#external-target" >}})
- Link to target outside the same post: [External target]({{< relref "link-destination#external-target" >}})
- Another link to target outside the same post: [External target with **bold** and _italic_]({{< relref "link-destination#external-target-with-bold-and-italic" >}})
- Link to subtree by CUSTOM_ID: [Link destination]({{< relref "link-destination" >}})
- Link to subtree by ID: [Link destination]({{< relref "link-destination" >}})
- Link to subtree by heading: [Link destination]({{< relref "link-destination" >}})
- Link to a subtree with custom Hugo slug: [Slug Front-matter]({{< relref "slug-front-matter" >}})


### Links with descriptions {#links-with-descriptions}

- [Link to CUSTOM_ID outside the same post]({{< relref "link-destination#external-target" >}})
- [Link to ID outside the same post]({{< relref "link-destination#external-target" >}})
- [Link to target outside the same post]({{< relref "link-destination#external-target" >}})
- [Another link to target outside the same post]({{< relref "link-destination#external-target-with-bold-and-italic" >}})
- [Link to subtree by CUSTOM_ID]({{< relref "link-destination" >}})
- [Link to subtree by ID]({{< relref "link-destination" >}})
- [Link to subtree by heading]({{< relref "link-destination" >}})
- [Link to a subtree with custom Hugo slug]({{< relref "slug-front-matter" >}})
```text
Error: user-error ("Org export aborted. Unable to resolve link: \"posts/link-destination.pre-processed.org::#external-target\"
```


## Internal target {#internal-target}
Expand Down
4 changes: 2 additions & 2 deletions test/site/content/posts/org-babel-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ print(str[1:])
```

```text
bc
bc
```

The whitespace before "bc" in the results block above should be
Expand All @@ -38,7 +38,7 @@ print(str[1:])
<div class="results-fixed-block">

```text
ef
ef
```
</div>

Expand Down