Giter Site home page Giter Site logo

Comments (5)

gcapes avatar gcapes commented on June 16, 2024 2

Thanks @tobyhodges and @maxim-belkin

This now works for me too. I have no idea why it didn't seem to before. I tried lots of stuff locally and remotely (hidden in force pushes). Must be some sort of new year related 'user error' on my part :)

from lesson-example.

maxim-belkin avatar maxim-belkin commented on June 16, 2024

Does {{ page.root }}/{% link _episodes/08-remote.md %}/#set-up-ssh-keys work?

from lesson-example.

maxim-belkin avatar maxim-belkin commented on June 16, 2024

Try using {{ relative_root_path }} instead of {{ page.root }}. relative_root_path is defined in _includes/base_path.html.

from lesson-example.

gcapes avatar gcapes commented on June 16, 2024

Thanks for the ideas @maxim-belkin. Unfortunately, neither worked. :(

Locally, page.root makes the link point to http://127.0.0.1:4000/setup/08-remote/index.html/#set-up-ssh-keys, so it looks like page.root is http://127.0.0.1:4000/setup/
relative_root_path results in http://127.0.0.1:4000/08-remote/index.html/#set-up-ssh-keys locally, but on GitHub it gives me http://gcapes.github.io/08-remote/index.html/#set-up-ssh-keys which is the same as when using page.root

So as before, page.root is resolving to http://gcapes.github.io/ instead of http://gcapes.github.io/git-course

Do you have any other ideas to resolve this?

from lesson-example.

tobyhodges avatar tobyhodges commented on June 16, 2024

Hey @gcapes, I forked your repo and found that I could get the link to resolve correctly locally, on GitHub Pages, and in an "offline" build of the site (with make site) by using page.root and removing the slash before the anchor in the link i.e.

[set up SSH keys]: {{ page.root }}{% link _episodes/08-remote.md %}#set-up-ssh-keys

Check out my version at https://github.com/tobyhodges/git-course/blob/gh-pages/setup.md and https://tobyhodges.github.io/git-course/setup.html

from lesson-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.