Git Product home page Git Product logo

Comments (11)

JugglerX avatar JugglerX commented on June 16, 2024 1

We can keep it open for a bit until the real solution is in place.

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024 1

thanks for all your help so far mate, really appreciate it!

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

will do.

Thing is currently the live demo is basically a duplicate of the theme which lives in a separate repo. Normally I work on that repo and deploy the changes to netlify. Then I just copy over the files using a build script into this themes repo. So some of the data that is unique to the live demo is getting copied over where it shouldn't. I just need to make this process a little bit more efficient, I don't enjoy having to manually edit the files for the theme every time I deploy.

from hugo-hero-theme.

onedrawingperday avatar onedrawingperday commented on June 16, 2024

One way to go about this within Hugo would be assigning an Enviroment Variable for Netlify and then in your theme's templates you use the getenv function to have these meta tags called as you need them.

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

I'm already using a Netlify environment variables for the google analytics code (maybe on another theme). So yeah this is a nice approach.

It's more about having to manage 2 separate repos.

But I'm just looking at your pull request where you added themesDir = "../.." to the exampleSite/config.toml - It seems like I can actually run hugo from the exampleSite directory on my local and the site runs using the example content!

This makes me think I can probably just deploy to Netlify from this theme repo. On Netlify the hugo command needs to be run from the root of the repo but maybe I can do something like below as the build command

hugo --config exampleSite/config.toml --contentDir exampleSite/content --themesDir ../

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

I've removed the meta tags that had the live demo data just so it doesn't pollute things for anyone who uses the theme right now. I'll work on a more permanent solution.

from hugo-hero-theme.

onedrawingperday avatar onedrawingperday commented on June 16, 2024

Ok. 👍

I'm closing this issue.

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

What I really want to do is.

Be able to work with just this repo. And this repo should only be the theme so it's compatible with hugoThemes.

Clone this repo to my local and run hugo server and see the working site with the real example content without having to put it inside an existing hugo project and copy the exampleSite to the root.

Be able to git push to this repo and have it build on Netlify using hugo or hugo with a bunch of cli config options.

be able to have unique live demo data, that is not included in the repo >_<

be able to submit this repo to Netlify themes, and make it compatible with the 1 click deploy

from hugo-hero-theme.

onedrawingperday avatar onedrawingperday commented on June 16, 2024

be able to have unique live demo data, that is not included in the repo >_<

Currently there is gohugoio/hugo#5074
When it is resolved generating pages from data sources will be a lot easier.

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

The meta tags are now configured in the config.toml

[params]
  google_analytics_id=""

  [params.homepage_meta_tags]
    meta_description = "Hero is a multipurpose Hugo theme with fullscreen hero images and fullwidth sections. It contains content types for a business or portfolio site."
    meta_og_title = "Hugo Hero Theme"
    meta_og_type = "website"
    meta_og_url = "https://hugo-hero.netlify.com"
    meta_og_image = "https://github.com/JugglerX/hugo-hero-theme/blob/master/images/tn.png"
    meta_og_description = "Hero is a multipurpose Hugo theme with fullscreen hero images and fullwidth sections. It contains content types for a business or portfolio site."
    meta_twitter_card = "summary"
    meta_twitter_site = "@zerostaticio"
    meta_twitter_creator = "@zerostaticio"

I have also added instructions in the README.MD on how to update these.

from hugo-hero-theme.

onedrawingperday avatar onedrawingperday commented on June 16, 2024

Great! :+1

from hugo-hero-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.