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

Prepend url, too, in feed.xml. #2319

Merged
merged 2 commits into from May 7, 2014
Merged

Prepend url, too, in feed.xml. #2319

merged 2 commits into from May 7, 2014

Conversation

parkr
Copy link
Member

@parkr parkr commented May 7, 2014

Per the convo on 2dec333:

@albertogg:

@parkr what about all the variables {{ site.baseurl }} variables used in the feed.xml, _includes/head.html _incluedes/header? do you suggest changing them?

@parkr:

I would prefer not to use them in a perfect world, but this works.

@albertogg:

But they are being used in all those files I stated.

[...]

@troyswanson:

Those ought to be absolute URLs, no?

@parkr:

Yeah.

NOW THEY ARE!!!!!!!!!!

screen shot 2014-05-07 at 12 09 21 am

@troyswanson
Copy link
Member

💥 GET A LIFE, @parkr (jk, you're awesome)

@parkr
Copy link
Member Author

parkr commented May 7, 2014

Did we miss anything, @albertogg?

@albertogg
Copy link
Member

jumm, I'm checking.

@albertogg
Copy link
Member

I what about _includes/head.html do you prefer absolute URLs?

@troyswanson
Copy link
Member

It is kind of weird for that http://yourdomain.com URL to be there on dev. If you prepend all of your stuff with those (like your CSS and JS), then they just won't load.

@albertogg
Copy link
Member

yes @troyswanson, that's true... and it's what got me thinking

@parkr
Copy link
Member Author

parkr commented May 7, 2014

What if we suggest using a _config_dev.yml file that just contains:

url: "http://localhost:4000"

Then they run jekyll serve -w -c _config.yml,_config_dev.yml in dev. and just jekyll build for production.

@parkr
Copy link
Member Author

parkr commented May 7, 2014

It feels overly complicated to me... I wish we could just run jekyll <subcmd> --dev or something

@albertogg
Copy link
Member

IMHO think that will complicate things a bit. I will get rid of those prepend things if they aren't needed

@troyswanson
Copy link
Member

I was just thinking that, actually. Traditionally, we encouraged folks to add something to the jekyll command, like jekyll <subcmd> --baseurl "", right? I think the only thing people will need to change on dev is that URL business.

@albertogg
Copy link
Member

Remember that the template is a "base" for people and It doesn't need to be "perfect" just what we consider "best" practice and also be what we consider a good starting point.

@parkr
Copy link
Member Author

parkr commented May 7, 2014

Ok, I just messed around with it for a while – I think I got it perfect.

@albertogg
Copy link
Member

Question: Isn't the default baseurl = / ? when it's not declared in the _config.yml?

@parkr
Copy link
Member Author

parkr commented May 7, 2014

The default is now "" as of 97e9fb2. We can drop it, but it's nice to have for projects on GHP and to see the difference b/w url and baseurl.

parkr added a commit that referenced this pull request May 7, 2014
@parkr parkr merged commit 0905b2c into master May 7, 2014
@parkr parkr deleted the use-urls branch May 7, 2014 04:39
parkr added a commit that referenced this pull request May 7, 2014
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants