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

Path parameterization in _config.yaml #279

Open
nfrankel opened this issue Nov 6, 2023 · 1 comment
Open

Path parameterization in _config.yaml #279

nfrankel opened this issue Nov 6, 2023 · 1 comment

Comments

@nfrankel
Copy link

nfrankel commented Nov 6, 2023

I'm faced with an issue. I'd like that images for every post should be stored under a parent folder + the path slug. I've tried the following to no avail:

asciidoctor:
  attributes:
    imagesdir: /assets/resources/{page.outputpath}@

I've tried with and without the trailing @ (to override it). I've tried with and without the page prefix.

I wonder if it's possible.

@mojavelinux
Copy link
Member

mojavelinux commented Nov 6, 2023

No, this is not a feature that this plugin offers. You can reference other attributes defined in the configuration using {name-of-attribute}, but you can't just make up a syntax that's not documented and expect it to work.

What you might be able to do is use an Asciidoctor extension that modifies the imagesdir attribute per file being converted. The output path is available via the outpath document attribute within the extension.

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