Closed 4Luke4 closed 2 years ago
Please use the relurl function as discussed, so this will work properly also for @burner1024's projects.
Please use the relurl function as discussed, so this will work properly also for @burner1024's projects.
Isn't that only for yml
files...?
I edited only standard html
files this time...
To work in opcodes, relurl.html should also be included in op-list.html.
To work in opcodes, relurl.html should also be included in op-list.html.
Is everything OK, now?
Include before the for loop, otherwise it'll be included hundreds of times
Fixed.
It's fine if @burner1024 doesn't care, otherwise just adding the include doesn't change anything.
At the moment opcode descriptions are not being imported. But they likely will be sooner or later.
I think it makes sense to have a consistent policy for links, applying relurl everywhere. Anyway, it's not something that's going to be done quickly, IESDP is too vast. Probably just fix them along the way while working on something else, like this pull?
I agree, that's why I proposed to use it. @4Luke4 you can search for relurl to see how it's used as a liquid filter.
@4Luke4 you can search for relurl to see how it's used as a liquid filter.
Will do. Feel free to merge then...
Sorry, but the consensus above was to fix this now, not later, so we can get farther incrementally.
Sorry, but the consensus above was to fix this now, not later, so we can get farther incrementally.
@burner1024
OK, so what exactly...? Should I add {% include relurl.html %}
to some other file...?
I think what @lynxlynxlynx means is that urls in this pull should be changed to follow the new scheme (with relurl filter.)
I think what @lynxlynxlynx means is that urls in this pull should be changed to follow the new scheme (with relurl filter.)
Could you please check if everything is fine now...?
<a name="class" href="{{ '#op337' | prepend: relurl }}">opcode #337</a>
"class" is just an example, for when you do want to add a name to the link, and markdown doesn't support it, and then we use html intead. You don't need to add it to every link. And there's no need to add relurl to anchors that lead to the same page. They are relative anyway:
<a href="#op337">opcode #337</a>
<a name="class" href="{{ '../file_formats/ie_formats/eff_v2.htm' | prepend: relurl }}">EFF</a>
All urls should start from root of the site. No ../
anywhere:
<a href="{{ '/file_formats/ie_formats/eff_v2.htm' | prepend: relurl }}">EFF</a>
All urls should start from root of the site. No
../
anywhere:
This leads to an error
`/file_formats/ie_formats/eff_v2.htm' not found.
Where? Push to your branch, point the exact link, I'll check.
Maybe a missing include?
Maybe a missing include?
Where exactly...?
Is there an {% include relurl.html %}
somewhere before the call in that file or where it gets included itself?
Where? Push to your branch, point the exact link, I'll check.
Done.
The url {{ '/file_formats/ie_formats/eff_v2.htm' | prepend: relurl }}
leads to the aforementioned error...
Is there an
{% include relurl.html %}
somewhere before the call in that file or where it gets included itself?
There is one in _includes/op-list.html
...
Yes, it's not working. Apparently collection content
gets evaluated before the inclusion.
Yes, it's not working. Apparently collection
content
gets evaluated before the inclusion.
Ok, so what now...?
I quickly tried liquify/markdownify filters, didn't help, but maybe @lynxlynxlynx has a better idea.
If eventually opcodes are going to be moved to _data
, can just leave them as is for now, and fix later.
Put the include in the opcode file itself, then it should work.
Right, except there's hundreds of them, not a very clean solution.
Most don't link anywhere, so it's fine in the interim. Easy to automatically remove when a better solution is available too.
Put the include in the opcode file itself, then it should work.
Done.
@burner1024
Do you want me to remove <code>
tags when using <a href>
...?
op335 still needs updating
op335 still needs updating
Done.
Thanks and thanks for the patience!
@4Luke4
<code><a href=x>y</a></code>
turns into `[x](y)`
, which when processed by jekyll stays verbatim. Whereas [`x`](y)
turns into a proper link.@lynxlynxlynx
- Whereas
[`x`](y)
turns into a proper link.
True, but then x
will no longer be highlighted in blue...
As a result, I think I'll remove the <code>
tags...
@burner1024
Added some rudimentary info about how to bypass the bug affecting these two opcodes.