Open bammerlaan opened 5 years ago
Voor navigatiemenu:
`
<a class="link bammerlaan-blauw hover-mid-gray mh2 pv1"
href="http://localhost:4001/">
Home
</a>
<a class="link bammerlaan-blauw hover-mid-gray mh2 pv1"
href="http://localhost:4001/concertagenda">
Concertagenda
</a>
<a class="link bammerlaan-blauw hover-mid-gray mh2 pv1"
href="http://localhost:4001/bio">
Bio
</a>
<a class="link bammerlaan-blauw hover-mid-gray mh2 pv1"
href="http://localhost:4001/zangles">
Zangles
</a>
<a class="link bammerlaan-blauw hover-mid-gray mh2 pv1"
href="http://localhost:4001/media">
Media
</a>
<a class="link bammerlaan-blauw hover-mid-gray mh2 pv1"
href="http://localhost:4001/contact">
Contact
</a>
</nav>`
Dat misschien in een html-bestand in _layouts. Dan code toevoegen voor dropdown menu, dan verwijzen binnen de nav class om opmaak te behouden?
https://forestry.io/blog/creating-a-multilingual-blog-with-jekyll/ used for bilingual site. Also http://chocanto.me/2016/04/16/jekyll-multilingual.html
- Comment-sectie toevoegen aan blog. Wachten tot de documentatie van staticman wordt geupdated, of iets anders vinden... Dit misschien?
Based on the output of Google translate
Add comment section to blog. Wait until the staticman documentation is updated, or find something else ... Maybe this?
Minimal Mistakes's documentations has a section about Staticman v3: https://mmistakes.github.io/minimal-mistakes/docs/configuration/#staticman-v3
In fact, you can try Staticman without waiting for the documentation update. To start with, you might try my minimal Jekyll + Staticman example: https://git.io/smdemo.
@VincentTam Oh, thanks so much for your tip! I hadn't really expected anyone but me reading this, but I suppose I should stick to English a bit more. I'll give the methods in your links a try, thanks!
Added tags to site using http://longqian.me/2017/02/09/github-jekyll-tag/
Now finished with all major to-do's for the website. Next step: bask.
Thanks for your interest in my demo site. The original option[slug]
in your Staticman form at https://github.com/bammerlaan/bammerlaan.github.io/commit/bf892a972cc7a1e1af4448b1ca3b95a22f319041 was calculated based on the MD5 hash of the file path of the post in your form and it looked alright. In that way, comment reply :speech_balloon: could be sorted in subfolders :open_file_folder: by :scroll: posts.
To get things working, you only need to match the HTML form input's "name" attribute (e.g. fields[foo]
, options[slug]
, etc) with your root-level staticman.yml
. To facilitate the debugging process, it's advised in eduardoboucas/staticman#219 to use API clients like Postman in case of errors from the Staticman API server.
I've hard-coded test-slug
to minimise the use of Jekyll and to make things easier to comprehend. That's only for educational proposes, and it's, IMO, not pratical for multi-page sites.
In fact, my Staticman demo sites on Framagit on https://framagit.org/staticman-gitlab-pages show an array of demo sites, including Minimal Mistakes, Beautiful Jekyll, Hugo Future Imperfect Slim, etc.
@VincentTam I'm afraid I don't completely understand what you said... Is there an example somewhere where you use this other method? Is it very wrong how I incorporated Staticman now? Because I have to say I'm pretty happy with how it's working at the moment.
I'm afraid I don't completely understand what you said...
Which part?
Is there an example somewhere where you use this other method?
You mean the md5
method in this line?
https://github.com/bammerlaan/bammerlaan.github.io/blob/67c3b033076b8075f70e2b4be4afd098e575a728/_includes/signoff.html#L17
Many, actually every example in my list of themes at https://framagit.org/staticman-gitlab-pages.
Is it very wrong how I incorporated Staticman now? Because I have to say I'm pretty happy with how it's working at the moment.
There's no right or wrong, but having comments sorted according to different posts is better than mixing them together. For example, consider the site https://zcrc.me. In the post New year, new blog, the comments are "testing comments". In another post OpenDingux release 2019.06.01, the comments are technical questions. Surely, one doesn't want to mix up the two. The options.slug
in
https://github.com/bammerlaan/bammerlaan.github.io/blob/67c3b033076b8075f70e2b4be4afd098e575a728/staticman.yml#L65-L68
and some other lines helps distinguishing them.
@VincentTam But... My comments are sorted according to different posts right now, aren't they? Granted, not using an md5 hash, but each blog post has its own directory with comments in/_data/comments
. (There's still a test-slug
directory there, too, but that's just a leftover I still need to clean up.)
I think there may be some sort of miscommunication going on, you're linking to earlier versions of my signoff.html
file where I was still trying to figure things out. Right now I have separate comments for each blog post, and the same blog post in a different language still has the same comments, just like I want (because I don't mind bilingual comments).
The only disadvantage is that I have to manually make a new comment directory for each new blog post, but I can live with that.
So here's how I interpreted my implementation. Here I make my options.slug
variable have the same value as my page.lang-ref
variable, which is a variable identifying the same blog post in different languages:
https://github.com/bammerlaan/bammerlaan.github.io/blob/master/_includes/signoff.html#L7
and then here I actually point my comment form to the directory in /_data/comments/
:
https://github.com/bammerlaan/bammerlaan.github.io/blob/master/staticman.yml#L72-L79
I'm completely new at Git, so maybe I haven't followed a proper convention somewhere causing this confusion?
But... My comments are sorted according to different posts right now, aren't they?
Thanks for response. I shouldn't have left the remarks about test-slug
if I had seen https://github.com/bammerlaan/bammerlaan.github.io/blob/9351766947891f48925c4b67c80378fb17e75dd0/_includes/comments.html#L4
md5
is a one of the possible methods. In fact, it can be any injective function on the set of page paths (so that no two pages are mapped to the same options.slug
).
From what I can see in your site.data.comments
, they seem well organised. I haven't actually tested, but I've one doubt over your manual manipulation of this directory.
The only disadvantage is that I have to manually make a new comment directory for each new blog post, but I can live with that.
That shouldn't be valid if your syntax for the static site generator (e.g. Jekyll, Hugo, etc) is good enough. Again, take Minimal Mistakes and Beautiful Hugo as examples. Staticman should automatically handle the paths, as the author of Staticman's native GitLab support has written in https://github.com/eduardoboucas/staticman/pull/219#issuecomment-419757921.
Some bloggers has remarked the "necessity" to manually commit the _data/comments
:file_folder: due to their use of the static site generator's functionality to read the filesystem (something like Hugo's readDir
)—that's not Staticman's problem at all. Replacing that with something like Jekyll's site.data.comments
in Minimal Mistakes would do.