Skip to content

Customization of _config.yml via jekyll-init script does not work #5

@S0AndS0

Description

@S0AndS0

Describe the bug

Lines 181 through 193 of jekyll-init that handle the following options...

--title
--email
--twitter-username
--github-username

... do not seem to edit the _config.yml file as intended.

Furthermore, when --title parameter is used the repository name is overwritten, and the --title parameter is not parsed correctly when spaces are present.

To Reproduce

  • Example one input...
ssh HOST jekyll-init\
  --title 'test title'\
  --email 'test@example.tld'\
  --twitter-username 'S0_And_S0'\
  --github-username 'S0AndS0'\
  test-repo\
  --help
  • Example one output...
# ...
# title
#  Name of repository to internalize or add Jekyll gh-pages branch to
# ...
# --title test
# --email 
# --twitter-username 
# --github-username USER
  • Example one _config.yml (snip)
title: test
email: your-email@example.com
twitter_username: jekyllrb
github_username: USER
  • Example two input...
ssh HOST jekyll-init\
  --title='test title'\
  --email='test@example.tld'\
  --twitter-username='S0_And_S0'\
  --github-username='S0AndS0'\
  test-repo\
  --help
  • Example two output...
# ...
# title
#  Name of repository to internalize or add Jekyll gh-pages branch to
# ...
# --title test
# --email test@example.tld
# --twitter-username S0_And_S0
# --github-username S0AndS0
  • Example two _config.yml (snip)
title: test
email: test@example.tld-email@example.com
twitter_username: jekyllrb
github_username: S0AndS0

In both of the above examples a repository is created under ~/git/title instead of ~/git/test-repo

Expected behavior

In either of the above cases the configuration file should be similar to...

title: test title
email: test@example.tld
twitter_username: S0_And_S0
github_username: S0AndS0

... and the repository should be created under ~/git/test-repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions