# Incorporated remark.js

**URL:** https://discourse.gohugo.io/t/incorporated-remark-js/2017
**Category:** support
**Created:** [November 5, 2015, 12:16am UTC](https://discourse.gohugo.io/t/incorporated-remark-js/2017 "2015-11-05T00:16:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yitzhakbg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yitzhakbg/32/247_2.png) [@yitzhakbg](https://discourse.gohugo.io/u/yitzhakbg)
#### Post date: [November 5, 2015, 12:16am UTC](https://discourse.gohugo.io/t/incorporated-remark-js/2017/1 "2015-11-05T00:16:03Z")

</div>

I’ve incorporated remark.js into my blog, natively. The first presentation isn’t pretty (yet), but can be seen at [levpoem.co.il](http://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](https://github.com/yitzhakbg/levpoem).

---

<div class="post-metadata">

### Author: ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)
#### Post date: [November 5, 2015, 9:20am UTC](https://discourse.gohugo.io/t/incorporated-remark-js/2017/2 "2015-11-05T09:20:53Z")

</div>

> [@yitzhakbg](#):
>
> file’s name is hardwired because I couldn’t figure out how to get the file name. He

```auto
.BaseFileName

```

Should give you the filename.

---

<div class="post-metadata">

### Author: ![yitzhakbg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yitzhakbg/32/247_2.png) [@yitzhakbg](https://discourse.gohugo.io/u/yitzhakbg)
#### Post date: [November 5, 2015, 9:38am UTC](https://discourse.gohugo.io/t/incorporated-remark-js/2017/3 "2015-11-05T09:38:35Z")

</div>

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](http://file.name) alone?

---

<div class="post-metadata">

### Author: ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)
#### Post date: [November 5, 2015, 1:03pm UTC](https://discourse.gohugo.io/t/incorporated-remark-js/2017/4 "2015-11-05T13:03:20Z")

</div>

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](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](https://godoc.org/github.com/spf13/hugo/source#File)

---

<div class="post-metadata">

### Author: ![yitzhakbg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yitzhakbg/32/247_2.png) [@yitzhakbg](https://discourse.gohugo.io/u/yitzhakbg)
#### Post date: [November 18, 2015, 8:41pm UTC](https://discourse.gohugo.io/t/incorporated-remark-js/2017/5 "2015-11-18T20:41:40Z")

</div>

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