# Local versus github links in scribble

**URL:** https://racket.discourse.group/t/local-versus-github-links-in-scribble/2818
**Category:** Questions & Answers
**Created:** [March 21, 2024, 10:07pm UTC](https://racket.discourse.group/t/local-versus-github-links-in-scribble/2818 "2024-03-21T22:07:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)
#### Post date: [March 21, 2024, 10:07pm UTC](https://racket.discourse.group/t/local-versus-github-links-in-scribble/2818/1 "2024-03-21T22:07:44Z")

</div>

local versus github links in scribble

defmodule and hyperlinks act differently when installing from github or locally.  
I resolved the problem as follows:

```scheme
@(define-for-syntax local #f)
@; set to #t when installing locally

@(define-syntax (nbhll stx)
   (syntax-case stx ()
     ((_ x y ...)
      (if local
        #'(nb (hyperlink x y ...))
        #'(nb (hyperlink (string-append "../../" x) y ...))))))

@(define-syntax (Defmodule stx)
   (if local
     #'(defmodule "some-file.rkt" #:packages ())
     #'(defmodule some-file/some-file #:packages ())))

```

(nb stands for non-breaking)  
I guess there is a simpler method, may be a variable to be defined in an info file???

---

<div class="post-metadata">

### Author: ![sorawee](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sorawee](https://racket.discourse.group/u/sorawee)
#### Post date: [March 22, 2024, 10:10am UTC](https://racket.discourse.group/t/local-versus-github-links-in-scribble/2818/2 "2024-03-22T10:10:43Z")

</div>

Can you elaborate more on what the problem is?

IIRC, someone said that the module path to `defmodule` should never be relative, so I am skeptical that `(defmodule "some-file.rkt" #:packages ())` will work well.

` `

---

<div class="post-metadata">

### Author: ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)
#### Post date: [March 22, 2024, 12:41pm UTC](https://racket.discourse.group/t/local-versus-github-links-in-scribble/2818/3 "2024-03-22T12:41:00Z")

</div>

I am almost certain that you need to use one of the command line options from:

[https://docs.racket-lang.org/scribble/running.html#(part.\_xref-flags)](https://docs.racket-lang.org/scribble/running.html#%28part._xref-flags%29)

But I am not sure which one.

---

<div class="post-metadata">

### Author: ![benknoble](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/benknoble/32/16_2.png) [@benknoble](https://racket.discourse.group/u/benknoble)
#### Post date: [March 22, 2024, 3:45pm UTC](https://racket.discourse.group/t/local-versus-github-links-in-scribble/2818/4 "2024-03-22T15:45:19Z")

</div>

I don’t personally do anything to make my scribblings (package documenation) behave differently for local vs other forms of installation. Even my GitHub Actions to deploy docs use the same files.

---

<div class="post-metadata">

### Author: ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)
#### Post date: [March 22, 2024, 7:15pm UTC](https://racket.discourse.group/t/local-versus-github-links-in-scribble/2818/5 "2024-03-22T19:15:08Z")

</div>

Well, I’ll stick to my two syntaxes. After making and testing all locally, the only thing I have to do when transferring my stuff to GITHUB, is to change variable local from #t to #f. Easy enough.

![324ADA0EF8D34B2E9DDEC96E1494687E.png](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/d/da850086ff533ecfa00a4857472bd7da6e7ec869.png)
