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

error in comments.html line 3 when replacing .test-slug with [page.slug] #61

Open
basemwahba opened this issue Mar 6, 2020 · 1 comment

Comments

@basemwahba
Copy link

Thanks for this simplest minimal Jekyll site

In _includes/comments.html, I have replaced .test-slug with [page.slug]. Final code will be: {% assign comments = site.data.comments[page.slug] | sort %}

In _config.yml, I have removed test-slug from staticman path. Final code will be: path: "_data/comments"

In index.html, I have replaced test-slug with {{ page.slug }}. Final code will be: <input name="options[slug]" type="hidden" value="{{ page.slug }}">

This is my repository https://github.com/basemwahba/again

May you please advise? Thanks so much

@VincentTam
Copy link
Owner

Sorry for late reply. I was corrupted by a compute game :(
I don't know Jekyll, even though I worked with it a year ago to provide Staticman support. I wonder if the homepage has page slug. If you run a web dev tool in any mainstream modern web browser, you would see that the value for the hidden field options[slug] is empty. I dunno if that affects the results. From the Networks pane in the web dev tool, I couldn't observe any POST request sent to your staticman API.
https://github.com/basemwahba/again/blob/916acf720c05093c9e5f990168016339b1e390f0/index.html#L10

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

No branches or pull requests

2 participants