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

Align Org tags and hugo tags #89

Closed
simonthum opened this issue Oct 28, 2017 · 8 comments
Closed

Align Org tags and hugo tags #89

simonthum opened this issue Oct 28, 2017 · 8 comments

Comments

@simonthum
Copy link

I like to use the TAGS line to populate the list of tags I have available on a per-file basis. E.g.:

#+TAGS: wtf food drinks

However, ox-hugo puts them on all posts. IMO this is what

#+FILETAGS: wtf food drinks

would do in org-mode (see http://orgmode.org/org.html#Tag-inheritance). The point of the TAGS line is to merely have such idiosyncratic blog tags available in the tag editor (you can assign keys too).

@kaushalmodi
Copy link
Owner

That's a valid point. I'll add fixing this the first thing on my list.

@kaushalmodi
Copy link
Owner

To be clear, it will make more sense to apply this breaking change only to subtree based exports. I am assuming you are using subtree-based exports?

@simonthum
Copy link
Author

Yes definitively.

Along those lines, it would make a lot of sense to have the hugo section inherit from a subtree's property, too. This way I could use headings for different content types.

@kaushalmodi
Copy link
Owner

have the hugo section inherit from a subtree's property, too.

Sorry, I didn't follow that. Can you open a new issue with an example of your use case?

@simonthum
Copy link
Author

Sure.

@simonthum
Copy link
Author

See #90

kaushalmodi added a commit that referenced this issue Oct 29, 2017
Fixes #89

-   Restore the default Org behavior of `#+TAGS`. Now that keyword (and
    the `EXPORT_TAGS` property) is **not** used by `ox-hugo`.

-   File-based exports must now use `#+HUGO_TAGS` to set the post tags.
-   Subtree-based exports can use the `EXPORT_HUGO_TAGS` property to
    override Org-style tags on the same headline (and the ones inherited
    from Org-style tags from any of the parent subtrees and
    `#+FILETAGS`).
    -   Note that for subtree-based exports, `#+FILETAGS` can be used to
        set tags globally in the file. Earlier `#+TAGS` was used for
        that purpose.
-   Subtree-based exports can use the `EXPORT_HUGO_CATEGORIES` property
    to override Org-style categories (tags with "@" prefix) on the same
    headline (and the ones inherited from Org-style categories from any
    of the parent subtrees and `#+FILETAGS`).
    -   Note that for subtree-based exports, `#+FILETAGS` can be used to
        set categories (tags with "@") globally in the file.

** Why use #+FILETAGS and not #+TAGS??

- About `#+FILETAGS` -- [Tag Inheritance](http://orgmode.org/manual/Tag-inheritance.html)
- About `#+TAGS` -- [Setting Tags](http://orgmode.org/manual/Setting-tags.html)
kaushalmodi added a commit that referenced this issue Oct 29, 2017
Fixes #89

-   Restore the default Org behavior of `#+TAGS`. Now that keyword (and
    the `EXPORT_TAGS` property) is **not** used by `ox-hugo`.

-   File-based exports must now use `#+HUGO_TAGS` to set the post tags.
-   Subtree-based exports can use the `EXPORT_HUGO_TAGS` property to
    override Org-style tags on the same headline (and the ones inherited
    from Org-style tags from any of the parent subtrees and
    `#+FILETAGS`).
    -   Note that for subtree-based exports, `#+FILETAGS` can be used to
        set tags globally in the file. Earlier `#+TAGS` was used for
        that purpose.
-   Subtree-based exports can use the `EXPORT_HUGO_CATEGORIES` property
    to override Org-style categories (tags with "@" prefix) on the same
    headline (and the ones inherited from Org-style categories from any
    of the parent subtrees and `#+FILETAGS`).
    -   Note that for subtree-based exports, `#+FILETAGS` can be used to
        set categories (tags with "@") globally in the file.

** Why use #+FILETAGS and not #+TAGS??

- About `#+FILETAGS` -- [Tag Inheritance](http://orgmode.org/manual/Tag-inheritance.html)
- About `#+TAGS` -- [Setting Tags](http://orgmode.org/manual/Setting-tags.html)

=====
See https://ox-hugo.scripter.co/doc/tags-and-categories/
=====
@kaushalmodi
Copy link
Owner

@simonthum Please update from the master and try again (Melpa update should also be out in few hours).

See https://ox-hugo.scripter.co/doc/tags-and-categories/ for details.

@simonthum
Copy link
Author

Seems to work great. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants