artofthesmart / hypertext

An incredibly fast, compatible, and efficient Grav CMS theme.
http://hypertext.artofthesmart.com
MIT License
50 stars 14 forks source link

Adding external links? #37

Closed acaffeinateddev closed 4 years ago

acaffeinateddev commented 4 years ago

I went through the documentation, I googled for it, and I cannot for the life of me figure out how to add menu items that link to an external page. I see that in what is available that it says you can use the admin plugin to add pages, but I'm trying to avoid adding any plugins to this.

Thanks in advance!

artofthesmart commented 4 years ago

No worries! Go to the admin page, then to "themes", then click on the "Hypertext" theme, then "Headers, Footers, & Links" tab on the right, then at the bottom right click the blue "Add Item" button. That should do it. :)

acaffeinateddev commented 4 years ago

@artofthesmart Is it impossible to do this WITHOUT the admin plugin? I would rather just do this manually.

artofthesmart commented 4 years ago

Good question. That means you need to add it directly to your config yaml.

Take a look at Hypertext.yaml where you'll see all possible options. Lines 266 onward describe the parameters for setting up custom links.

The target file for you is going to be <GravCMS>/user/config/themes/hypertext.yaml.

You'll have a stanza near the bottom that contains parameters as defined like that blueprints.yaml file. Here's the bottom portion of my config for your reference:

menu:
  menuItems:
    -
      text: Twitter
      href: 'https://twitter.com/artofthesmart'
      isOffsite: false
      isNewWindow: false
      rel: ''
      name: ''
      title: ''
    -
      text: Github
      href: 'https://github.com/artofthesmart'
      isOffsite: false
      isNewWindow: false
      rel: ''
      name: ''
      title: ''
partials:
  footer:
    custom_footer_type: markdown
    custom_footer: 'All content is my own opinion, provided as-is, and has no warranty expressed or implied. None of it is financial, legal, or other professional advice. This site might use cookies to make your day better.'
acaffeinateddev commented 4 years ago

Great! Thank you so much!