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

generated build output is creating some unexpected / broken pages when page name has index in it (v0.10.0-alpha.1) #455

Closed
1 of 5 tasks
thescientist13 opened this issue Dec 24, 2020 · 4 comments · Fixed by #449
Assignees
Labels
alpha.2 alpha.4 bug Something isn't working CLI v0.10.0 website Tasks related to the projects website / documentation

Comments

@thescientist13
Copy link
Member

thescientist13 commented Dec 24, 2020

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

Noticed that there are a couple of interesting pages directories being created in the public/ directory. Not sure if this is related to some sort of incorrect regex / string match? (index.h, plugin-hooks/)
Screen Shot 2020-12-24 at 12 34 08 PM

I tested in #449 too and was able to repro there.

Details

For index.h it doesn't seem to break anything, though it must be coming there from somewhere? So obviously not ideal.

plugins-hooks is bit more problematic. It shows up on the Plugins sidebar correctly, but clicking the linking breaks and goes to the wrong page
Screen Shot 2020-12-24 at 12 36 31 PM
Screen Shot 2020-12-24 at 12 36 46 PM

My guess is that this has something to do with the fact that index is in both of these names.

@thescientist13 thescientist13 added bug Something isn't working CLI labels Dec 24, 2020
@thescientist13 thescientist13 self-assigned this Dec 24, 2020
@thescientist13 thescientist13 changed the title generated build output is creating some unexpected / broken pages (v0.10.0-alpha.1) generated build output is creating some unexpected / broken pages when page name has index in it (v0.10.0-alpha.1) Dec 25, 2020
@thescientist13
Copy link
Member Author

Hmm, I must have been getting my tests mixed up, and I can't reproduce in the release/0.10.0 branch, but it is an issue in the branch for #449 , so I will just push the change there.

thescientist13 added a commit that referenced this issue Dec 25, 2020
@thescientist13 thescientist13 linked a pull request Dec 25, 2020 that will close this issue
2 tasks
@thescientist13
Copy link
Member Author

I take it back.. it was misleading.

Although in the output from the console, the page paths looks correct

% yarn build
yarn run v1.12.3
$ node . build
-------------------------------------------------------
Welcome to Greenwood ♻️
-------------------------------------------------------
Running Greenwood with the build command.
Initializing project config
Initializing project workspace contexts
Generating graph of workspace files...
Serializing pages at http://127.0.0.1:1984
pages to generate

 ./about/community.md
 ./about/features.md
 ./about/goals.md
 ./about/how-it-works.md
 ./about/index.md
 ./docs/build.md
 ./docs/component-model.md
 ./docs/configuration.md
 ./docs/css-and-images.md
 ./docs/data.md
 ./docs/front-matter.md
 ./docs/index.md
 ./docs/layouts.md
 ./docs/markdown.md
 ./docs/menus.md
 ./docs/tech-stack.md
 ./getting-started/branding.md
 ./getting-started/build-and-deploy.md
 ./getting-started/creating-content.md
 ./getting-started/index.md
 ./getting-started/key-concepts.md
 ./getting-started/next-steps.md
 ./getting-started/project-setup.md
 ./getting-started/quick-start.md
 ./guides/cloudflare-workers-deployment.md
 ./guides/firebase.md
 ./guides/index.md
 ./guides/netlify-cms.md
 ./guides/netlify-deploy.md
 ./guides/now.md
 ./guides/s3-cloudfront.md
 ./plugins/composite-plugins.md
 ./plugins/index-hooks.md
 ./plugins/index.md
 ./plugins/webpack.md
serializing page... /
serializing page... /about/community/
serializing page... /about/features/
serializing page... /about/goals/
serializing page... /about/how-it-works/
serializing page... /about/
serializing page... /docs/build/
serializing page... /docs/component-model/
serializing page... /docs/configuration/
serializing page... /docs/css-and-images/
serializing page... /docs/data/
serializing page... /docs/front-matter/
serializing page... /docs/
serializing page... /docs/layouts/
serializing page... /docs/markdown/
serializing page... /docs/menus/
serializing page... /docs/tech-stack/
serializing page... /getting-started/branding/
serializing page... /getting-started/build-and-deploy/
serializing page... /getting-started/creating-content/
serializing page... /getting-started/
serializing page... /getting-started/key-concepts/
serializing page... /getting-started/next-steps/
serializing page... /getting-started/project-setup/
serializing page... /getting-started/quick-start/
serializing page... /guides/cloudflare-workers-deployment/
serializing page... /guides/firebase/
serializing page... /guides/
serializing page... /guides/netlify-cms/
serializing page... /guides/netlify-deploy/
serializing page... /guides/now/
serializing page... /guides/s3-cloudfront/
serializing page... /plugins/composite-plugins/
serializing page... /plugins/index-hooks/
serializing page... /plugins/
serializing page... /plugins/webpack/
Since Acorn 8.0.0, options.ecmaVersion is required.
Defaulting to 2020, but this will stop working in the future.
Serializing complete for page /about/features/.
Serializing complete for page /docs/.
Serializing complete for page /docs/component-model/.
Serializing complete for page /docs/css-and-images/.
Serializing complete for page /about/goals/.
Serializing complete for page /docs/front-matter/.
Serializing complete for page /about/.
Serializing complete for page /getting-started/build-and-deploy/.
Serializing complete for page /docs/data/.
Serializing complete for page /.
Serializing complete for page /docs/configuration/.
Serializing complete for page /about/how-it-works/.
Serializing complete for page /about/community/.
Serializing complete for page /guides/netlify-cms/.
Serializing complete for page /docs/build/.
Serializing complete for page /getting-started/project-setup/.
Serializing complete for page /docs/menus/.
Serializing complete for page /getting-started/creating-content/.
Serializing complete for page /getting-started/branding/.
Serializing complete for page /docs/markdown/.
Serializing complete for page /getting-started/.
Serializing complete for page /getting-started/quick-start/.
Serializing complete for page /guides/.
Serializing complete for page /getting-started/next-steps/.
Serializing complete for page /plugins/index-hooks/.
Serializing complete for page /plugins/composite-plugins/.
Serializing complete for page /guides/netlify-deploy/.
Serializing complete for page /guides/now/.
Serializing complete for page /docs/tech-stack/.
Serializing complete for page /guides/cloudflare-workers-deployment/.
Serializing complete for page /guides/s3-cloudfront/.
Serializing complete for page /getting-started/key-concepts/.
Serializing complete for page /docs/layouts/.
Serializing complete for page /guides/firebase/.
Serializing complete for page /plugins/webpack/.
Serializing complete for page /plugins/.
done serializing all pages
copying assets/ directory...
copying graph.json...
✨  Done in 16.00s.

Looking at the actual output of public/, we see the unwanted output

  • index.h/
  • plugins-hooks/
owenbuckley@Owens-MBP-2 greenwood % ls -l public
total 288
drwxr-xr-x   8 owenbuckley  staff    256 Dec 25 18:57 about
drwxr-xr-x  26 owenbuckley  staff    832 Dec 25 18:57 assets
-rw-r--r--   1 owenbuckley  staff   3762 Dec 25 18:57 banner.b8fdba25.js
-rw-r--r--   1 owenbuckley  staff   1531 Dec 25 18:57 card.7da9cd6c.js
drwxr-xr-x  14 owenbuckley  staff    448 Dec 25 18:57 docs
-rw-r--r--   1 owenbuckley  staff    912 Dec 25 18:57 eve-container.d5da388f.js
-rw-r--r--   1 owenbuckley  staff   1043 Dec 25 18:57 footer.8f4ef5eb.js
drwxr-xr-x  11 owenbuckley  staff    352 Dec 25 18:57 getting-started
-rw-r--r--   1 owenbuckley  staff  49973 Dec 25 18:57 graph.json
drwxr-xr-x  10 owenbuckley  staff    320 Dec 25 18:57 guides
-rw-r--r--   1 owenbuckley  staff   7283 Dec 25 18:57 header.47e6822e.js
drwxr-xr-x   3 owenbuckley  staff     96 Dec 25 18:57 index.h
-rw-r--r--   1 owenbuckley  staff  22376 Dec 25 18:57 index.html
-rw-r--r--   1 owenbuckley  staff  27126 Dec 25 18:57 lit-element.5d109b2b.js
drwxr-xr-x   7 owenbuckley  staff    224 Dec 25 18:57 plugins
drwxr-xr-x   3 owenbuckley  staff     96 Dec 25 18:57 plugins-hooks
-rw-r--r--   1 owenbuckley  staff    372 Dec 25 18:57 row.0820cdfe.js
drwxr-xr-x   3 owenbuckley  staff     96 Dec 25 18:57 sandbox
-rw-r--r--   1 owenbuckley  staff    839 Dec 25 18:57 scroll.2bbdfbda.js
-rw-r--r--   1 owenbuckley  staff   4445 Dec 25 18:57 shelf.b8bee4ad.js
drwxr-xr-x   5 owenbuckley  staff    160 Dec 25 18:57 styles

So not related to #449 at all.

thescientist13 added a commit that referenced this issue Dec 28, 2020
@thescientist13
Copy link
Member Author

thescientist13 commented Dec 28, 2020

Hmm.. did some more testing, looks this was actually a local development issue only, as I had pages in my .greenwood/ directory that were causing this. When running this, everything was fine, even on release/0.10.0 branch.

% git status
On branch release/0.10.0
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	TODO.md

% rm -rf ./public && rm -rf _.greenwood/_ && yarn build

...

% ls -l public
total 288
drwxr-xr-x   7 owenbuckley  staff    224 Dec 28 16:24 about
drwxr-xr-x  26 owenbuckley  staff    832 Dec 28 16:24 assets
-rw-r--r--   1 owenbuckley  staff   3762 Dec 28 16:24 banner.b8fdba25.js
-rw-r--r--   1 owenbuckley  staff   1531 Dec 28 16:24 card.7da9cd6c.js
drwxr-xr-x  13 owenbuckley  staff    416 Dec 28 16:24 docs
-rw-r--r--   1 owenbuckley  staff    912 Dec 28 16:24 eve-container.d5da388f.js
-rw-r--r--   1 owenbuckley  staff   1043 Dec 28 16:24 footer.8f4ef5eb.js
drwxr-xr-x  10 owenbuckley  staff    320 Dec 28 16:24 getting-started
-rw-r--r--   1 owenbuckley  staff  49973 Dec 28 16:24 graph.json
drwxr-xr-x   9 owenbuckley  staff    288 Dec 28 16:24 guides
-rw-r--r--   1 owenbuckley  staff   7283 Dec 28 16:24 header.47e6822e.js
-rw-r--r--   1 owenbuckley  staff  22371 Dec 28 16:24 index.html
-rw-r--r--   1 owenbuckley  staff  27126 Dec 28 16:24 lit-element.5d109b2b.js
drwxr-xr-x   6 owenbuckley  staff    192 Dec 28 16:24 plugins
-rw-r--r--   1 owenbuckley  staff    372 Dec 28 16:24 row.0820cdfe.js
-rw-r--r--   1 owenbuckley  staff    839 Dec 28 16:24 scroll.2bbdfbda.js
-rw-r--r--   1 owenbuckley  staff   4445 Dec 28 16:24 shelf.b8bee4ad.js
drwxr-xr-x   5 owenbuckley  staff    160 Dec 28 16:24 styles
owenbuckley@Owens-MBP-2 greenwood % ls -l public/plugins
total 56
drwxr-xr-x  3 owenbuckley  staff     96 Dec 28 16:24 composite-plugins
drwxr-xr-x  3 owenbuckley  staff     96 Dec 28 16:24 index-hooks
-rw-r--r--  1 owenbuckley  staff  25459 Dec 28 16:24 index.html
drwxr-xr-x  3 owenbuckley  staff     96 Dec 28 16:24 webpack

I guess I should do a better job of maintaining my local dev environment. 😊

@thescientist13 thescientist13 added the invalid This doesn't seem right label Dec 28, 2020
@thescientist13 thescientist13 linked a pull request Dec 28, 2020 that will close this issue
2 tasks
thescientist13 added a commit that referenced this issue Dec 30, 2020
* init refactor with synchronous approach working

* robust nested directory output testing

* formatting

* robust nested directory output testing

* graph page object clean up

* graph lifecycle refactor:

* revert transform changes

* fix #455

* fix routing logic

* fix incorrect output when pages have index in the name
@thescientist13 thescientist13 mentioned this issue Dec 30, 2020
12 tasks
@thescientist13
Copy link
Member Author

thescientist13 commented Dec 30, 2020

Ok, there still seems to be an issue with this, but it is a bit more subtle now for the index-hooks page. (notice the page is empty)

The routes and page index.html is correct

% ls -l public/plugins 
total 56
drwxr-xr-x  3 owenbuckley  staff     96 Dec 30 12:56 composite-plugins
drwxr-xr-x  3 owenbuckley  staff     96 Dec 30 12:56 index-hooks
-rw-r--r--  1 owenbuckley  staff  26667 Dec 30 12:56 index.html
drwxr-xr-x  3 owenbuckley  staff     96 Dec 30 12:56 webpack

But looking at the the page source will show that it is not getting its <content-outlet> swapped out.

      <div class="container-fluid style-scope eve-container">
        
          <app-scroll><!---->
      
            <content-outlet></content-outlet>
          
    <!----></app-scroll>
        
      </div>

@thescientist13 thescientist13 added the website Tasks related to the projects website / documentation label Dec 31, 2020
@thescientist13 thescientist13 added alpha.4 and removed invalid This doesn't seem right labels Dec 31, 2020
thescientist13 added a commit that referenced this issue Apr 3, 2021
* init refactor with synchronous approach working

* robust nested directory output testing

* formatting

* robust nested directory output testing

* graph page object clean up

* graph lifecycle refactor:

* revert transform changes

* fix #455

* fix routing logic

* fix incorrect output when pages have index in the name
thescientist13 added a commit that referenced this issue Apr 3, 2021
* init refactor with synchronous approach working

* robust nested directory output testing

* formatting

* robust nested directory output testing

* graph page object clean up

* graph lifecycle refactor:

* revert transform changes

* fix #455

* fix routing logic

* fix incorrect output when pages have index in the name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.2 alpha.4 bug Something isn't working CLI v0.10.0 website Tasks related to the projects website / documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant