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

Is it possible to have a drop down in menu in blogdown ? #155

Closed
janeshdev opened this Issue Jul 17, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@janeshdev
Copy link

janeshdev commented Jul 17, 2017

I am using ghostwriter theme in blogdown and I was wondering if we could have a drop down menu using blogdown or not.

@yihui

This comment has been minimized.

Copy link
Member

yihui commented Jul 17, 2017

Sorry, I don't understand your question. What kind of drop down menus? Where do you want to put the menu?

@janeshdev

This comment has been minimized.

Copy link
Author

janeshdev commented Jul 17, 2017

Thanks for your response. I am sorry I was not clear. I wanted something like this:
image

My config.toml file looks like following:

baseurl = "/"
relativeurls = true
languageCode = "en-us"
title = "Jd's Notebook"
paginate = 10
theme = "ghostwriter"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\\.Rmd$", "_files$", "_cache$"]

[permalinks]
    post = "/:year/:month/:day/:slug/"

[[menu.main]]
    name = "About"
    url = "/about/" 
[[menu.main]]    
    name = "Github Configuration"
    url = "/github-configuration/index.html"
[[menu.main]]
    name = "Twitter"
    url = "https://twitter.com/janeshdev"
[[menu.main]]    
    name = "Github"
    url = "https://github.com/janeshdev"
[[menu.main]]    
    name = "DSI Posts"
    url = "/tags/dsi/"


[taxonomies]
  category = "categories"
  tag = "tags"
  
[params]
    description = "Janesh Devkota's personal notebook"

    # options for highlight.js (version, additional languages, and theme)
    highlightjsVersion = "9.9.0"
    highlightjsLang = ["r", "yaml"]
    highlightjsTheme = "github"

I don't want to change the position of the menu. It will be the default menu that is on the top of the website.

In simple words, I was wondering if I could add few items under About in the menu.

@yihui

This comment has been minimized.

Copy link
Member

yihui commented Jul 17, 2017

Okay. This is up to the theme support. You have to ask the author of the theme. I certainly cannot be the help desk for all Hugo themes :)

@janeshdev

This comment has been minimized.

Copy link
Author

janeshdev commented Jul 17, 2017

Thanks Yihui. I was wondering if there was any option such as [[menu.submain]] or [[submenu.main]] something like that on blogdown regardless of the theme user chooses. I will check with the theme owner.

@yihui

This comment has been minimized.

Copy link
Member

yihui commented Jul 17, 2017

Unfortunately, that is nearly impossible on the side of blogdown. The menu has to be supported by the theme.

@yihui yihui added this to the v0.1 milestone Aug 10, 2017

@yihui yihui closed this Aug 10, 2017

@oganm

This comment has been minimized.

Copy link

oganm commented Jan 4, 2019

Sorry for reviving this but I am confused about the current state of the default theme. I tried to create a dropdown menu by doing something like

[[menu.main]]
	name = "submenuName"
	parent = "parentIdentifier"
	url = "a link"

but it didn't work which made me assume it is not supported by default. Also nav.html didn't seem to have any child support so I decided to write my own. While doing that however, I noticed that the main.css of the theme has properties for li:first-child that I needed to overwrite using my own css. Was wondering what the point of these properties in the main.css were. Am I missing a default way to support dropdown menus or some other functionality involving child menus?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment