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

docfile-like builtin for filename only #1673

Closed
IanDarwin opened this issue Jan 14, 2016 · 3 comments
Closed

docfile-like builtin for filename only #1673

IanDarwin opened this issue Jan 14, 2016 · 3 comments

Comments

@IanDarwin
Copy link

IanDarwin commented Jan 14, 2016

The docfile built-in attribute actually produces the full path rather than the file, e.g,.
/Users/ian/workspace/project/src/doc/ref/intro/0105-bleah.adoc.

It would be nice if there were a way to directly get just the filename, 0105-bleah.adoc

@mojavelinux
Copy link
Member

You can get the basename from the attribute "docname". In your case, it would be "0105-bleah". If you always use .adoc as the AsciiDoc file extension, you can build it using {docname}.adoc.

I suppose we should add an attribute for infilesuffix (to complement outfilesuffix). Do you like that idea?

@IanDarwin
Copy link
Author

Ah, docname isn't in the reference manual so I didn't see it. Thanks!

I'm less concerned about the file suffix.

@mojavelinux mojavelinux added this to the v1.5.5 milestone Jan 15, 2016
@mojavelinux
Copy link
Member

Thanks for pointing that out @IanDarwin. I added it to the user manual.

I think we should still add docfilesuffix (rather than infilesuffix) for completeness.

@mojavelinux mojavelinux self-assigned this Jan 15, 2016
@mojavelinux mojavelinux modified the milestones: v1.5.5, v1.5.6 Oct 3, 2016
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Dec 30, 2016
@mojavelinux mojavelinux removed the next label Jul 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants