Skip to content

Get rid of {{ site.github.url }}#91

Merged
dlech merged 1 commit into
ev3dev:masterfrom
dlech:url-cleanup
Jan 7, 2016
Merged

Get rid of {{ site.github.url }}#91
dlech merged 1 commit into
ev3dev:masterfrom
dlech:url-cleanup

Conversation

@dlech
Copy link
Copy Markdown
Member

@dlech dlech commented Jan 4, 2016

  • Also get rid of absolute links to http://www.ev3dev.org
  • Introduce publish.rb script to publish to personal gh-pages branch
    (this was the whole reason for using site.github.url in the first place)

Fixes #90

@dlech
Copy link
Copy Markdown
Member Author

dlech commented Jan 4, 2016

@WasabiFan, take this for a spin. You can see the live preview (generated by ./publish.rb dlech) at http://dlech.github.io/ev3dev.github.io/.

@WasabiFan
Copy link
Copy Markdown
Member

Search is broken; make sure to update that as well. The search code uses URLs in two places: in search.js it loads the search index, and in the search index JSON file it sets the URLs to go to. You can look at the branch from my previous PR to see how you can send relative links in the JSON and modify them in the JS if you want to do it that way.

Comment thread news/index.html Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that's a good sign 😉

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cleaned up this mess and force pushed, so should be better now.

@dlech
Copy link
Copy Markdown
Member Author

dlech commented Jan 4, 2016

Search is broken

Yup, there if a TODO in publish.rb for that 😉

@WasabiFan
Copy link
Copy Markdown
Member

there if a TODO in publish.rb for that 😉

I haven't gotten that far in the diff yet 😉 I'm multitasking

@dlech dlech force-pushed the url-cleanup branch 4 times, most recently from 3dfe7bd to 1f2d1ed Compare January 4, 2016 05:04
@WasabiFan
Copy link
Copy Markdown
Member

It doesn't look like the atom feed was changed; you may or may not want to change that, depending on the behavior you're looking for.

Comment thread repo-metadata.html
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could do {{ site.github | jsonify }} instead here to get the whole hierarchy

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. This file is not actually used at the moment though.

@dlech
Copy link
Copy Markdown
Member Author

dlech commented Jan 4, 2016

I figured that the atom feed needed absolute urls, so I left them. And I figured that it didn't matter if it work anywhere else. If it ever gives us trouble, github recently allowed jekyll-feed. But, if it ain't broke, don't fix it.

Comment thread publish.rb
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this assumes that you're on master... it should check the current branch instead I suppose

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, this is starting with a new empty git repository in a temporary directory. Assuming master is 100% safe unless there is a way to locally configure git to use another name for the default branch in a new empty repository.

@WasabiFan
Copy link
Copy Markdown
Member

Looks good. Once you merge this, I can update my CI branch from master and modify the script to work for my needs there. If you have already configured command-line parsing at that point, the changes should be fairly trivial.

Although, now that I think about it, maybe this script shouldn't publish by default -- it would just create the files. Then you could add --publish wasabifan to publish to a repo. Otherwise I can add a --no-publish flag to use on the CI server.

@WasabiFan
Copy link
Copy Markdown
Member

Oh, and we will need to update the project publishing tutorial for these changes; you just won't be able to preview your changes unless you want to do it on the command line.

@WasabiFan WasabiFan mentioned this pull request Jan 7, 2016
* Also get rid of absolute links to http://www.ev3dev.org
* Introduce publish.rb script to publish to personal gh-pages branch
  (this was the whole reason for using site.github.url in the first place)

Fixes ev3dev#90
dlech added a commit that referenced this pull request Jan 7, 2016
Get rid of {{ site.github.url }}
@dlech dlech merged commit da0b3fd into ev3dev:master Jan 7, 2016
@dlech dlech deleted the url-cleanup branch August 12, 2016 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants