Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Use a consistent convention for path references #204

Open
wbamberg opened this issue Oct 28, 2019 · 1 comment
Open

Use a consistent convention for path references #204

wbamberg opened this issue Oct 28, 2019 · 1 comment

Comments

@wbamberg
Copy link

wbamberg commented Oct 28, 2019

In stumptown, HTML element pages can refer to their attributes by giving a path. They can also refer to their examples by giving a path. Unfortunately it seems we use a different convention for each:

examples:
    - examples/simple-example
    - examples/audio-element-with-video-element
    - examples/multiple-source-elements
attributes:
    element_specific: ./attributes
    global: /content/html/global_attributes

...attributes expects us to have a leading ./ for the current directory, examples omits it. We should be consistent.

@Elchi3 :

I like this one. (without any "../" or "./")

I guess we would need ../ and so on where the directory isn't under the current one?

@wbamberg wbamberg mentioned this issue Oct 28, 2019
@peterbe
Copy link
Contributor

peterbe commented Nov 4, 2019

I read examples/simple-example to mean the same as ./examples/simple-example. It'd basically be the same anyway if you path.join() with the current file's __dirname.
The only one that is bothersome is /content/html/global_attributes which feels magical and would not work to use path.join with, in any way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants