pixelnest / presskit.html

Re-implementation of presskit() as a static site generator
http://pixelnest.io/2017/03/presskit-html/
MIT License
306 stars 51 forks source link

Images not recognized in folder #7

Closed wittedhaddock closed 6 years ago

wittedhaddock commented 6 years ago
presskit -V
0.8.0

build/images has images:

ls
anneAndJames.jpg    logo.png        team.jpg
bonniejean.jpg      mike.jpg
header.jpg      smallbizsummit.jpg

building presskit...

presskit build
Starting directory: /Users/jamesgraham/WMSite

Finding data…
- company: "Community Phone" /Users/jamesgraham/WMSite/_site/data.xml
- company: "Community Phone" /Users/jamesgraham/WMSite/data.xml
Multiple companies detected. This is not supported yet, only the last will be used!

Generating HTML…
- "Community Phone" -> /Users/jamesgraham/WMSite/build/index.html

Exporting assets…
- /Users/jamesgraham/WMSite/build/css/master.css
- /Users/jamesgraham/WMSite/build/css/normalize.css
- /Users/jamesgraham/WMSite/build/js/hamburger.js
- /Users/jamesgraham/WMSite/build/js/imagesloaded.min.js
- /Users/jamesgraham/WMSite/build/js/masonry.min.js

Done! 👌

Output in html:

Logo & Icon
There are currently no logos or icons available for Community Phone. Check back later for more or contact us for specific requests!
solarsailer commented 6 years ago

Hello,

You have two "company" data.xml, and I think the problem arises from here.

One of the two should be a product.

Can you show me your folder structure?

wittedhaddock commented 6 years ago

Hi, thanks for your response. I've previously tried deleting it as well. E.g.

presskit build
Starting directory: /Users/jamesgraham/WMSite

Finding data…
- company: "Community Phone" /Users/jamesgraham/WMSite/data.xml

Generating HTML…
- "Community Phone" -> /Users/jamesgraham/WMSite/build/index.html

Exporting assets…
- /Users/jamesgraham/WMSite/build/css/master.css
- /Users/jamesgraham/WMSite/build/css/normalize.css
- /Users/jamesgraham/WMSite/build/js/hamburger.js
- /Users/jamesgraham/WMSite/build/js/imagesloaded.min.js
- /Users/jamesgraham/WMSite/build/js/masonry.min.js

Done! 👌

results in same outputted html, unfortunately

not sure what folder structure you want to see, but here's root/build

screen shot 2018-08-09 at 11 02 07 am

thanks!

solarsailer commented 6 years ago

Hello,

I want to see the folder structure containing the data and images you want to convert. :)

ie, it should be like this:

yourpresskitcode/
  data.xml    # This is your company data file.
  images/     # This is the image for your company data file.

  product01/  # A product.
    data.xml  # Its data file.
    images/   # Its image.

  product02/  # Another product.
    data.xml  # And its data file.
    images/   # And its image.

Do:

cd path/to/yourpresskitcode
presskit build

And it will generate a build folder in your current directory. This is what you should copy on your server.

wittedhaddock commented 6 years ago

It's all there, no? I have the images folder and the data.xml file right within WMSite, the directory from which I build.

solarsailer commented 6 years ago

Sorry, I misread your issue.

You have no logo, even if the images folder has a logo.png inside.

Hmm, that's weird.

Try to clean the build folder while building:

presskit build -D
wittedhaddock commented 6 years ago

no dice :(

solarsailer commented 6 years ago

Do you mind sending your project? :)

wittedhaddock commented 6 years ago

For sure, thanks so much

Should all be here: https://github.com/wittedhaddock/wittedhaddock.github.io

solarsailer commented 6 years ago

Okay, I got it just by looking at your repo.

The images folder should be near your data.xml. When presskit starts to build, it looks for an adjacent images/ folder. Because you don't have the images/ folder, presskit infers that there's no image for your project, and thus, print the text you saw below your logo section.

Right now, I guess you put the images/ folder in your build/ folder manually?

Move this folder outside build/, right near your data.xml, then re-build, and it should be fine.

wittedhaddock commented 6 years ago

That did the trick!

Thank you sir!

solarsailer commented 6 years ago

Cool. 😊