Skip to content
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

Refactor scripts in footer.html partial #55

Open
iwtga opened this issue Jun 6, 2023 · 0 comments · May be fixed by #56
Open

Refactor scripts in footer.html partial #55

iwtga opened this issue Jun 6, 2023 · 0 comments · May be fixed by #56

Comments

@iwtga
Copy link

iwtga commented Jun 6, 2023

The current cookie banner code has some issues such that the code formatters flag it as incorrect code. It is because it doesn't follow the correct coding guidelines.

The cookie banner script lies in layouts/partials/footer.html

The line which assigns the cookie expiry date is as:

 expires: {{ site.Params.cookies.expire_days }}

This assignment causes the code formatters to go berserk.

The correct assignment would be:

expires: Number('{{ .Site.Params.cookies.expire_days }}')

Same goes for the script in the same file where the index URL is assigned as:

var indexURL = {{ "index.json" | absURL }}

The correct way would be:

var indexURL = '{{ "index.json" | absURL }}'
@iwtga iwtga changed the title Refactor Cookie Banner Code Refactor Cookie Banner Script Jun 6, 2023
@iwtga iwtga changed the title Refactor Cookie Banner Script Refactor scripts in footer.html partial Jun 6, 2023
@iwtga iwtga linked a pull request Jun 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant