-
Notifications
You must be signed in to change notification settings - Fork 73
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
New site can't be initialized with Index.org #380
Comments
This issue is also present when creating the "example.org" file for a folder named "example" (or similar). Steps to Reproduce
|
@t-e-r-m I can only reproduce the bug with
|
Getting rid of https://github.com/EmaApps/emanote/blob/master/default/index.md from the default layer will resolve this, but that's not really a solution because emanote assumes the default index note always exists:
|
@t-e-r-m You can try this patch for now, though a proper fix needs to be thought of carefully to resolve this in diff --git a/src/Emanote/Route/SiteRoute/Class.hs b/src/Emanote/Route/SiteRoute/Class.hs
index 6cbe6e0c..cf4fb607 100644
--- a/src/Emanote/Route/SiteRoute/Class.hs
+++ b/src/Emanote/Route/SiteRoute/Class.hs
@@ -121,10 +121,7 @@ decodeGeneratedRoute model fp =
Rel.RRTFound note ->
Just $ noteFileSiteRoute note
Rel.RRTAmbiguous notes ->
- Just $ ambiguousNoteURLsRoute notes
- ambiguousNoteURLsRoute :: NonEmpty N.Note -> SiteRoute
- ambiguousNoteURLsRoute ns =
- SiteRoute_AmbiguousR ("/" <> fp) (N._noteRoute <$> ns)
+ Just $ noteFileSiteRoute $ last notes
noteFileSiteRoute :: N.Note -> SiteRoute
noteFileSiteRoute = |
Thank you for the patch. |
Should be resolved in #387 once it is merged; please re-open if the problem still occurs. |
Describe the bug
A new emanote website can't be init with an
index.org
file, but anindex.md
file works.To Reproduce
Make a new (empty) folder, run
emanote run
.Then make an
index.org
file.The following error occurs:
Using an
index.md
file works without any errors.The text was updated successfully, but these errors were encountered: