Scully: How to create any `/path` root `index.html` ?

Created on 5 Aug 2020  ยท  8Comments  ยท  Source: scullyio/scully

๐Ÿž Bug report

โš ๏ธ This is question issue โš ๏ธ

Description

How to create any /path root index.html and routes setting ?

Because, I tried to touch /blog/index.md that to create /blog root index.html.
But, as excecuted npm run scully -- --sr result, /blog/index/index.html is output.
So, this output is routes detected /blog/index path...

If there is any officially available method, please enjoy it.

๐Ÿ”ฌ Minimal Reproduction

โš ๏ธ I don't think it's a bug, but I'll post an issue with this template,
so I'm sorry if it's an already asked question ๐Ÿ™‡โ€โ™€๏ธ

๐Ÿ’ปYour Environment

๐Ÿ‘‰ Branch in progress

Angular Version:

"@angular/core": "~9.1.11"

Scully Version:

"@scullyio/init": "0.0.28"
"@scullyio/ng-lib": "latest"
"@scullyio/scully": "latest"
question

Most helpful comment

Yes @uruha, as @SanderElias mentioned I am currently working on a plugin for this. It is actually finished, and I'll have a PR for it tomorrow.

All 8 comments

@uruha Can you explain your motivation?
We are building the path's this way because most hosting services/HTML servers demand a structure like that.
if you want to create a 'blog/index.html' you should have a route in your app that handles '/blog' without any addition. We do have something like that in our sample app.

@SanderElias
Thank you for your reply ๐Ÿ™‚

Can you explain your motivation?

Currently, I am working on a FrontEnd guideline in Angular at my company,
This time, we are considering whether it is possible to move to Scully for convenience of operation.

The current guideline URI structure is as follows.

URI root
โ”œ /intro
โ”œ /html
โ”œ /css
โ”œ /js
โ”‚ โ”œ /linter-formatter
โ”‚ โ”œ /naming-convention
โ”‚ โ”œ /asynchronous
โ”‚ โ”œ /pre-commit
โ”‚ โ”” /typescript
โ”œ /testing
โ”œ /a11y
โ”œ /security
โ”” /tips
ใ€€ โ”œ /sesign-pattern
ใ€€ โ”” /scaffolding

My motivation is to use Scully to achieve a similar URI with the following markdown configuration.

Scully project root โ”œ /intro โ”‚ โ”” index.md => example.com/intro โ”œ /html โ”‚ โ”” index.md => example.com/html โ”œ /css โ”‚ โ”” index.md => example.com/css โ”œ /js โ”‚ โ”œ index.md => example.com/js โ”‚ โ”œ linter-formatter.md => example.com/js/linter-formatter โ”‚ โ”œ naming-convention.md => ... as a same โ”‚ โ”œ asynchronous.md โ”‚ โ”œ pre-commit.md โ”‚ โ”” typescript.md โ”œ /testing โ”‚ as a same

The root of each URI path has a description and general description of that section, so I thought that it would be happy to create a document at index as much as possible, so I discussed this time ๐Ÿ™‹โ€โ™€๏ธ.

We do have something like that in our sample app.

Is this in the Scully repository? If you have source code, please let me know! ๐Ÿคฉ (I will refer to it!)

Oh, yes, that structure is fully possible.
@GuzmanPI is working on a plugin that takes a single file, and puts it manually into a route. (He is building on top of this plugin
Is that what you are looking for?

Yes @uruha, as @SanderElias mentioned I am currently working on a plugin for this. It is actually finished, and I'll have a PR for it tomorrow.

Thank you very much.
It seems to be solved by using this plugin !

@uruha As you redeem this as solved, I'll close the issue.

@GuzmanPI @SanderElias What happened to the mdReplaceRoutePlugin plugin? I found the PR but it was closed without merging.

IIRC there were some merge conflicts, and @GuzmanPI would ix something that needed to be changed and would file a new PR.
@GuzmanPI Is this still on your radar?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nishimura-yuji picture nishimura-yuji  ยท  4Comments

beeman picture beeman  ยท  3Comments

spencerb02 picture spencerb02  ยท  5Comments

Gyrosh picture Gyrosh  ยท  5Comments

BlindDespair picture BlindDespair  ยท  5Comments