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

Provide url to Github origin markdown files, resolve #68

Closed
wants to merge 8 commits into from

Conversation

gsechaud
Copy link
Contributor

@gsechaud gsechaud commented Nov 29, 2016

Resolve #57

Setup:

  • Set github.base_dir to select the github repo.
  • Set github.paradox_dir to select the directory corresponding to paradox (src/main/paradox and build.sbt)

How:

  • To display the source link of the current file: @source[link]()
  • To display the source link of another file, use relative path: @source[link](../index.md)

@dwijnand
Copy link
Member

@gsechaud failed on Windows

@jonas
Copy link
Contributor

jonas commented Nov 29, 2016

I would suggest to not solve this by adding a new directive but rather to expose a variable to the theme and let the theme insert a link on each page. This would be much simpler to implement and doesn't require adding "boilerplate" to each documentation page.

@gsechaud
Copy link
Contributor Author

Ok I thought that would be nicer to give the possibility to the user to include "whatever" source he wants inside his markdown files, but as you explained, this makes things more complicated and not necessarily useful.

I'll change then asap the structure in order to only deal with source on templates side with themes, not on markdown side.

@jonas
Copy link
Contributor

jonas commented Nov 29, 2016

@gsechaud To include a source link we could extend the @github directive to support paths. I didn't do that initially but it would be nice to have. Based on the discussion in #60 then an explicit source link could be made using:

Link to @github[page source]($page.path$)

@gsechaud gsechaud closed this Dec 1, 2016
@gsechaud gsechaud mentioned this pull request Dec 1, 2016
@gsechaud gsechaud deleted the originSourceUrls branch January 10, 2017 08:54
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.

3 participants