Skip to content
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

Weird nesting of content folders in HUGO build #507

Closed
hathawayj opened this issue Oct 8, 2020 · 6 comments
Closed

Weird nesting of content folders in HUGO build #507

hathawayj opened this issue Oct 8, 2020 · 6 comments
Assignees
Labels

Comments

@hathawayj
Copy link

Describe the bug

I am not sure what is happening, but it may be related to your last commit - https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md.

When the website is built locally, I can see the correct folder structure, and the website renders correctly. However, when I push to Github, it creates a nested directory.

When using the second link, it shows Day 7 and Day 8, but the links don't navigate correctly.

To Reproduce

Not sure here.

  1. Commit a new file under slides.
  2. Watch it break...

Expected behavior

I expected to see each day in the primary slides page.

Screenshots

masterScreenshot_2020-10-08_20-55-29

Screenshot_2020-10-08_20-59-39

Your YAML file

################################# Default configuration ###################
# provide your domain here
baseURL = "https://byuistats.github.io/CSE250-Course"
# https:byuistats.github.io/CSE250-Course
# theme
theme = "Dot"
# site title
title = "CSE250"
# disable language
disableLanguages = [true]
# google analytics fake for this
googleAnalytics = "UA-1dkjdfd79739389834-4" 
publishDir = 'docs'
# unsafe html
[markup.goldmark.renderer]
unsafe= true

################################# navigation ################################
[[menu.main]]
name = "Faq"
url = "faq"
weight = 1

[[menu.main]]
name = "Contact"
url = "contact"
weight = 2

# Dropdown menu
[[menu.main]]
weight = 3
name = "Navigate"
hasChildren = true

  [[menu.main]]
  parent = "Navigate"
  name = "Projects"
  url = "projects"
  weight = 1

  [[menu.main]]
  parent = "Navigate"
  name = "Slides"
  url = "slides"
  weight = 2

  [[menu.main]]
  parent = "Navigate"
  name = "Course Materials"
  url = "course-materials"
  weight = 3

  [[menu.main]]
  parent = "Navigate"
  name = "Syllabus"
  url = "course-materials/syllabus/"
  weight = 3

############################# Default Parameters ##########################
[params]
# logo is for all page
logo = ""
# logo white is for homepage logo, you can use colorful logo too...
logo_white = ""
# when logo is empty, it will shown your site title

# customize color
primary_color = "#02007e"
body_color = "#f9f9f9"
text_color = "#636363"
text_color_dark = "#242738"
white_color = "#ffffff"
light_color = "#f8f9fa"

# font family
font_family = "roboto" # Choose font family from : https://fonts.google.com/



############################## social links ##############################
 
[[params.social]]
icon = "ti-github" # themify icon pack : https://themify.me/themify-icons
link = "https://github.com/byuidatascience"
  
[[params.social]]
icon = "ti-linkedin" # themify icon pack : https://themify.me/themify-icons
link = "https://www.linkedin.com/groups/13537407/"

################################ English Language ######################
[Languages.en]
languageName = "En"
languageCode = "en-us"
weight = 1
home = "Home"
copyright = "J. Hathaway and BYU-I ©"

# banner
[Languages.en.params.banner]
title = "CSE 250: Data Science Programming"
subtitle = "Using pandas, Altiar, scikit-learn, and NumPy to program with data"
bg_image = "images/banner.png"
placeholder = "Have a question? Just ask here or enter terms"

Additional context

@hathawayj hathawayj added the bug Something isn't working label Oct 8, 2020
@peaceiris
Copy link
Owner

peaceiris commented Oct 8, 2020

Please share your GitHub Actions workflow YAML file, not Hugo's config file.

@hathawayj hathawayj changed the title sample_title Weird nesting of content folders in HUGO build Oct 8, 2020
@hathawayj
Copy link
Author

Sorry for the mistake.

name: CI
on: push
jobs:
  deploy:
    runs-on: ubuntu-18.04
    steps:
      - name: Git checkout
        uses: actions/checkout@v2

      - name: Setup hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: "0.74.3"

      - name: Build
        # remove --minify tag if you do not need it
        # docs: https://gohugo.io/hugo-pipes/minification/
        run: hugo --minify

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          personal_token: ${{ secrets.TOKEN }}
          publish_dir: ./docs
          keep_files: true
          user_name: hathawayj
          user_email: [email protected]
        #   cname: example.com

@peaceiris
Copy link
Owner

Why keep_files: true? You seem to not need it. By removing it, your problem will be solved.

@peaceiris peaceiris added support User support and removed bug Something isn't working labels Oct 8, 2020
@hathawayj
Copy link
Author

Great! That fixed it. It hasn't been an issue up to this point. Did something change? I appreciate the quick response.

@peaceiris
Copy link
Owner

Thank you for reporting it. This is related to the changes for #324. I will track this at #324.

peaceiris added a commit that referenced this issue Oct 11, 2020
Note that users who are using a Static Site Generator do not need this option in most cases. Please reconsider your project structure and building scripts, or use a built-in feature of a Static Site Generator before you enable this flag.

- [Static Files | Hugo](https://gohugo.io/content-management/static-files/)
- [Using the Static Folder | Gatsby](https://www.gatsbyjs.com/docs/static-folder/)

Related issues:

- #507
- #509
This was referenced Oct 11, 2020
peaceiris added a commit that referenced this issue Oct 15, 2020
Close #520

Related to:

- pr: #512 
- #507 #509 
- #390
- #324
- #103
peaceiris pushed a commit that referenced this issue Oct 15, 2020
Close #520

Related to:

- pr: #512
- #507 #509
- #390
- #324
- #103
@github-actions
Copy link
Contributor

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved.
If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants