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

Use absolute path when opening new content in editor #1589

Closed
riklopfer opened this issue Nov 19, 2015 · 4 comments
Closed

Use absolute path when opening new content in editor #1589

riklopfer opened this issue Nov 19, 2015 · 4 comments

Comments

@riklopfer
Copy link

Currently, when hugo --source="/path/to/hugo/site" new post/test.md --editor="subl" is invoked from anywhere but inside the hugo site directory, it will create the file in the correct place, but the editor will open a non-existent file referenced by the relative path post/test.md

@kujohn
Copy link
Contributor

kujohn commented Dec 14, 2015

I was not able to use those two flags --source and --editor in conjunction with the new command.
Yields:

~  hugo --source="/Users/john/src/hugotest/" new posts/in.md
Error: unknown flag: --source                                  

kujohn added a commit to kujohn/hugo that referenced this issue Dec 14, 2015
@riklopfer
Copy link
Author

Humph. hugo --help doesn't mention --source?

anthonyfok added a commit that referenced this issue Dec 16, 2015
v0.15 had it, but I removed it inadvertently for 0.16-DEV
in commit 00d0477 in PR #1652.

Also add directory bash-completion for `--source`
for `hugo convert`, `hugo list` and `hugo new`.

See #1624, #1589
@anthonyfok
Copy link
Member

Humph. hugo --help doesn't mention --source?

For almost two weeks in Hugo v0.16-DEV: No, because I removed it, see #1624.
I have just added it back a few minutes ago in commit c1e134f after committing @kujohn's excellent fix to this issue. 😉

Cheers,
Anthony

@anthonyfok anthonyfok added this to the v0.16 milestone Dec 16, 2015
anthonyfok added a commit that referenced this issue Dec 16, 2015
Reason: The `--source` flag was added back to the `hugo new` commands
in commit c1e134f.

See #1624, #1589
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
v0.15 had it, but I removed it inadvertently for 0.16-DEV
in commit 00d0477 in PR gohugoio#1652.

Also add directory bash-completion for `--source`
for `hugo convert`, `hugo list` and `hugo new`.

See gohugoio#1624, gohugoio#1589
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
Reason: The `--source` flag was added back to the `hugo new` commands
in commit c1e134f.

See gohugoio#1624, gohugoio#1589
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants