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

Docs: Autocompletion for _config.yml #7884

Closed
pke opened this issue Oct 31, 2019 · 12 comments
Closed

Docs: Autocompletion for _config.yml #7884

pke opened this issue Oct 31, 2019 · 12 comments

Comments

@pke
Copy link

pke commented Oct 31, 2019

Summary

Create a JSON Schema for publishing at http://schemastore.org so one can get a little help in form of suggestions and validation from supported editors (VSCode) when editing the _config.yaml files.

Would you accept a PR with a JSON Schema?

@pke pke added the feature label Oct 31, 2019
@DirtyF
Copy link
Member

DirtyF commented Oct 31, 2019

Submit a PR to https://github.com/schemastore/schemastore/pulls and let us know when it's available we'll mention it in our documentation.

@DirtyF DirtyF changed the title feat: Docs: Autocompletion for _config.yml Oct 31, 2019
madskristensen pushed a commit to SchemaStore/schemastore that referenced this issue Nov 7, 2019
@pke
Copy link
Author

pke commented Nov 9, 2019

@DirtyF its available now http://json.schemastore.org/jekyll

I already have a minor fix in the works, but generally it should already work.

@ashmaroli
Copy link
Member

baseurl need not be a string. The default value is nil

@pke
Copy link
Author

pke commented Nov 10, 2019

What else can it be? If you don't want to specify it, just don't specify it in the _config.yml. If you however specify it, it must be a valid URI.
Or am I missing something?

@ashmaroli
Copy link
Member

If you however specify it, it must be a valid URI.

I just meant to say, the type array for baseurl would be "type": ["string", "null"]

For a site designed to be mounted at URL https://example.com/, the recommended values are null, "" or "/".
For a site designed to be mounted at URL https://example.com/blog/, the recommended values are just "blog", "/blog", or "/blog/"

@pke
Copy link
Author

pke commented Nov 10, 2019

Ok I will add this change. But just to clarify, what would happen if the baseurl is not set at all in your both described URL scenarios?

@ashmaroli
Copy link
Member

It defaults to Ruby nil:

"baseurl" => nil, # this mounts at /, i.e. no subdirectory

(Since you're working on patch, you should also correct rogue to rouge if not included in the patch already..)

@pke
Copy link
Author

pke commented Nov 10, 2019

I understood that, because I checked the source.

So if the user does not specify it, it will default to nil. No need to include a choice then to set it to nil. Why would you explicitly set it to nil in the config in the first place?

I'll however change the format to be just a string, since "/blog" is not a valid URI.
So the property is in reality more like a "URL base" (to compose relative links) than a base URL ;)

@ashmaroli
Copy link
Member

So the property is in reality more like a "URL base" (to compose relative links) than a base URL ;)

Yeah. This property has confused users endless. Some have even interpreted it to be similar to HTML <base />. Internally, the property is used by the Liquid filter relative_url, URL templates and a mounting point for the local dev server.

zhuravlikjb pushed a commit to zhuravlikjb/schemastore that referenced this issue Nov 25, 2019
@jekyllbot jekyllbot added the stale Nobody stepped up to work on this issue. label Jan 10, 2020
@pke
Copy link
Author

pke commented Jan 10, 2020

The schema is already live, since... last year ;)
http://json.schemastore.org/jekyll

Feel free to close this here and maybe follow up with a docs note about the schema support? @DirtyF

@jekyllbot jekyllbot removed the stale Nobody stepped up to work on this issue. label Jan 10, 2020
@jekyll jekyll deleted a comment from jekyllbot Jan 10, 2020
@DirtyF DirtyF added the pinned label Jan 10, 2020
@DirtyF DirtyF assigned DirtyF and unassigned pke Jan 10, 2020
@DirtyF
Copy link
Member

DirtyF commented Jan 10, 2020

@pke Any guidance on how to use it with VSCode or other editors?

@pke
Copy link
Author

pke commented Jan 10, 2020 via email

@DirtyF DirtyF closed this as completed Feb 14, 2020
@jekyll jekyll locked and limited conversation to collaborators Feb 13, 2021
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