Skip to content

Commit 7baeb0c

Browse files
committed
note about global paths in github.io
1 parent 96055e8 commit 7baeb0c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,15 @@ When the markdown is translated to `html`, the single `\` disappears, which remo
165165
#### Notes on paths and links
166166

167167
##### Relative paths in markdown files
168+
168169
When the markdown file is rendered using the `<zero-md>` element, the element translates the file to `html`, which is read directly when viewing the `html` page. For this reason, the paths in the markdown files should be written relative to the `html` page, not relative to the markdown file.
169170

170171
For example, in the `template` markdown files, which is placed in multiple folders, the path to the `quickguide.html` file would normally be "../../quickguide.html". However, because the file is rendered into an `html` page that will be next to the `quickguide.html` page, you should write the path as only "quickguide.html." This is because "quickguide.html" is the path relative to the `html` page into which the markdown will be translated.
171172

172173
A note about referencing `id` attributes in anchor links:
173174

174175
##### Referencing `id` attributes
176+
175177
Anchor links in markdown files can reference the following `id` attributes:
176178

177179
1. `id`s that are inside the same markdown file
@@ -183,6 +185,20 @@ They cannot, however, reference `id`s that are inside other markdown files.
183185

184186
##### Image paths on github.io
185187

188+
For simplicity between paths, a majority of images are referenced with their global path. An example of this path is displayed below.
189+
190+
```
191+
<img src="/documentation/quickguide/intro/images/sv-pipeline.png">
192+
```
193+
194+
On SimVascular's website, this will render correctly. However, if you have forked the simvascular.github.io and build and run the page through your github account, the images will not render correctly. This is because the fork you have made is a Project site instead of a User or Organization site. The difference between the two is detailed [here](https://www.tracktownsoftware.com/jekyll/github/2020/12/22/GitHubPagesUserVsProjectSites.html).
195+
196+
To still be able to view images, there are two options.
197+
198+
1. Rename your fork of simvascular.github.io to your_github_username.github.io to make your fork a User site instead of a Project site.
199+
200+
2. View your fork of the website from a local server instead of viewing it when it is deployed from your account with github pages.
201+
186202
#### Other notes for writing markdown
187203

188204
Markdown is sensitive to spaces and new lines. Headers without a space after the last "#" will not render correctly.

0 commit comments

Comments
 (0)