Closed Healthedata1 closed 4 years ago
Why can't we keep using page.path? If someone decides to override the algorithm for what filenames are called, failing to use page.path will break stuff...
I thought the site.data.pages was generated from type and id not the file name? lemme double check first before I update it.
It is - but that's configurable. And if someone changes the configuration, that won't be reflected here.
I know the change is easy to make but I am just trying to understand the potential problem. I don't see how you can do what you say. The IG resource doesn't allow you to name the file anything you want an the ig-pub won't find it if you do. Can you describe to me how it is possible in a little more detail like what configuration exactly? The {{[type]}}-{{id]}} pattern seems to be baked into the java code and a change like that would mess up many things this since we use the pattern {{[type]}}-{{id]}} all over the place.
OK I think I get it you can recconfigure what they are called in config.json. but if that is the case then using the page.path won't work eithe since:
{% assign basepath = page.path | replace: '-mappings (or -definitions, or whatever ).html', '.html' %} won't work either.
The side effect is that the empty examples tab will be exposed instead of hidden.
That bit should work so long as they allow the extensions and end with .html. Agree that if they change more than that, the templates won't work at all. I'm just suggesting we should allow what flexibility we can.
I don't see how to do this outside of string literals for the existing layouts. e.g. in pseudo code
to get basepath...
split page path by "-" if the last element in the array in ['mappings', 'definitions', profile.xml, profile.json, profile.ttl] then pop and join with '-' and append the '.html'
so this depends solely on the configuration too and doesn't buy us anything... is there another way?
where are we with this- I disagree with your suggestion and think my way is simpler and better. It works for the base and if the config change then everything changes any way. So I don't see the issue.
and right is inconsistent with examples tabs dissappearing and reappearing depending on which tab you click.
I guess if it creates problems for others, we can always fix it later.