kc0bfv / autophugo

AutoPhugo [ˌɔtoʊˈfjuːgəʊ] is a gallery/photoblog theme for Hugo that's a little more automatic than Phugo.
Other
97 stars 56 forks source link

_index.md creation - file empty #38

Closed pokemonbattledroid closed 2 years ago

pokemonbattledroid commented 2 years ago

Hi, Clearly doing something wrong, but I've made an 'assets' folder with folders inside it with jpgs.

So my project folder is travel travel/location/.jpgs travel/location2/.jpgs ...

From terminal I run hugo new location/_index.md, I get a new _index.md file in travel/content/location, but it's just the top bits and no content, depsite the assets folder having images.


title: "Location" date: 2022-02-28T17:23:13Z draft: true

Any help is appreciated, this looks like an amazing platform to do what I'm hoping to do.

Thank you so much!!

kc0bfv commented 2 years ago

Hrm... I'm not 100% clear on what your directory structure looks like - but if you look at the exampleSite directory you'll see how it needs to look. Walking through a new hugo site, you'd run:

hugo new site travel

Then you'd have a new directory called travel, with the following contents:

archetypes config.tml content data layouts static themes

You need to create an assets directory in there too. Then you'd create subdirectories of that, location and location2. It'll look like:

archetypes assets assets/location assets/location2 config.tml content data layouts static themes

Then put your photos in those assets/location and assets/location2 directories.

Then, from within the base travel directory, running hugo new location/_index.md and hugo new location2/_index.md and hugo new _index.md will give you the following:

archetypes assets assets/location/image.jpg assets/location2/image2.jpg config.tml content content/_index.md content/location/_index.md content/location2/_index.md data layouts static themes

And of course you need to have the theme in themes... But that should be the directory structure you need to get this to work. It's the same as in the exampleSite.

pokemonbattledroid commented 2 years ago

I'll give that a go! Thanks for the thorough tutorial!

On Sun, Mar 6, 2022, 20:58 Karl @.***> wrote:

Hrm... I'm not 100% clear on what your directory structure looks like - but if you look at the exampleSite directory you'll see how it needs to look. Walking through a new hugo site, you'd run:

hugo new site travel

Then you'd have a new directory called travel, with the following contents:

archetypes config.tml content data layouts static themes

You need to create an assets directory in there too. Then you'd create subdirectories of that, location and location2. It'll look like:

archetypes assets assets/location assets/location2 config.tml content data layouts static themes

Then put your photos in those assets/location and assets/location2 directories.

Then, from within the base travel directory, running hugo new location/_index.md and hugo new location2/_index.md and hugo new _index.md will give you the following:

archetypes assets assets/location/image.jpg assets/location2/image2.jpg config.tml content content/_index.md content/location/_index.md content/location2/_index.md data layouts static themes

And of course you need to have the theme in themes... But that should be the directory structure you need to get this to work. It's the same as in the exampleSite.

— Reply to this email directly, view it on GitHub https://github.com/kc0bfv/autophugo/issues/38#issuecomment-1060037762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3U5OSRDSI3FCIQWYTLKNDU6UMATANCNFSM5PRWMCYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

kc0bfv commented 2 years ago

Closing pending other feedback.