Skip to content

Conversation

@yasoob-blog
Copy link
Collaborator

Dear human,

Here's a new entry for your approval. 🎉

Merge the pull request to accept it, or close it to send it away.

❤️ Your friend Staticman 💪


Field Content
name Vin100 Tam
email 4980f828b9588a712cc2013ac10fd13a
reply_to
comment Your article deserves a static comment. However, as the author of the last article in the Sources, I've found some rooms of improvements for your guide.
  1. Staticman's v3 URL scheme has been available since Add GitLab support eduardoboucas/staticman#219. Your guide is still using the v2 URL scheme /v2/entry/.... You might want to update your guide to that, so as to cover GitLab Pages as well.

  2. When I wrote my self-hosting guide (another related article to the one that you linked) last year, I've put "port": 8080. In fact, that's unless since Heroku designates dynamically the port number. I've just edited my article to remove that API parameter.

  3. The creation of .gitkeep can be avoided if you use .Site.Data.comments instead of readDir "data/comments". Related discussion in above linked Staticman PR: Add GitLab support eduardoboucas/staticman#219 (comment).

  4. You're mixing JS code with HTML in your Go-HTML template code for the reply button. This doesn't comply with the pratice of separation of concerns.

    <button id="{{ ._id }}" class="btn-info" href="#comment-form" onclick="changeValue('fields[reply_to]', '{{ $.parentId }}')">Reply to thread</button>

    For a pure JS + Go-HTML (without jQuery) template of nested comment reply, you may take a look at Hugo Swift Theme's assets/js/*.js and layouts/partials/comments*.html.

P.S. I'm a collaborator of the aforementioned Hugo theme. |
| date | 2019-08-28T22:49:06.939Z |

@yasoob-blog yasoob-blog deleted the staticman_0a8bdcb0-c9e6-11e9-8238-9540886bfca2 branch September 16, 2019 12:56
@yasoob yasoob restored the staticman_0a8bdcb0-c9e6-11e9-8238-9540886bfca2 branch September 16, 2019 13:04
@yasoob yasoob reopened this Sep 16, 2019
@yasoob yasoob closed this Sep 16, 2019
@yasoob-blog yasoob-blog deleted the staticman_0a8bdcb0-c9e6-11e9-8238-9540886bfca2 branch September 16, 2019 13:19
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 this pull request may close these issues.

3 participants