-
Notifications
You must be signed in to change notification settings - Fork 2
remove hard coded values and add domain #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
remove hard coded values and add domain #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor fixes
}, | ||
"root" : {"template": "test_data/thipe-ayeye/templates/thipe-ayeye-root-template.html"} | ||
"root" : {"template": "test_data/thipe-ayeye/templates/thipe-ayeye-root-template.html"}, | ||
"domain": "https://ayeye-thipe-akerte.bird-apps.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The domain value should be without the protocol, so that templates can use http://
or https://
protocols as required.
"root": {"template":"test_data/example/templates/example-template.html"}, | ||
"domain": "https://example.com" | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per comment in config, remove the protocol from the config.
path: "ro-crate-preview.html", | ||
template: multiPageConfig.root.template | ||
template: multiPageConfig.root.template, | ||
domain: multiPageConfig.domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it is worth checking that the domain is valid? And check/remove trailing slashes?
<title>{{ title }}</title> | ||
|
||
{# Facebook sharing image (Open Graph) #} | ||
<meta property="og:url" content="{{ url }}" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that this {{ url }}
is wrong. Might need to be something like
{% set url = data.pages[data.entryPoint].domain ~ '/' ~ data.pages[data.entryPoint].path %}
<meta property="og:url" content="{{ url }}" />
{% set domain = data.pages[data.entryPoint].domain %} | ||
|
||
{% if domain %} | ||
<meta property="og:url" content="https://{{ domain }}/ro-crate-preview.html" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path here should be the path to the generated page. See comment in the subobj template for a hint
{% set domain = data.pages[data.entryPoint].domain %} | ||
|
||
{% if domain %} | ||
<meta property="og:url" content="https://{{ domain }}/ro-crate-preview.html" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path here should be the path to the generated page. See comment in the subobj template for a hint
No description provided.