Incorporated remark.js

I’ve incorporated remark.js into my blog, natively. The first presentation isn’t pretty (yet), but can be seen at levpoem.co.il. Press “wireless rdma” on the menu to see the presentation (navigation menus removed from the page).
The trick was to read the remark markdown slide file without it’s being rendered by hugo. Had to pull the file in as a partial. At the moment, the partial (that is the slides markdown) file’s name is hardwired because I couldn’t figure out how to get the file name. Help appreciated. Ideally, it should have the same name as its associated content file.
Sources are at https://github.com/yitzhakbg/levpoem.

1 Like
.BaseFileName

Should give you the filename.

Thank you. How can I strip the file name only? That is, if .BaseFileName gives say /dir1/dir2/file.name and I want to use the file name in /newdir1/newdir2/file.name, how can I get file.name alone?

Not sure, but you can have a look at the different “filename related” fields and methods on Page:

https://godoc.org/github.com/spf13/hugo/hugolib#Page

You can, as an example, navivage from page to file: Page.Source … which has a File embedded:

https://godoc.org/github.com/spf13/hugo/source#File

Got a much better way to incorporate remarkjs slides.
See https://github.com/yitzhakbg/levpoem.