-
Notifications
You must be signed in to change notification settings - Fork 61
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
Landing page #111
Comments
In the snow.config theres a The index file processes the posts. Change the Then create a new I think that should work. I would have to test though. Glad you're raising issues, you have an interesting use-case :D |
Hi @phillip-haydon , thanks for your help! I've actually been messing about with permutations of that all morning. If I understand you correctly then my config should look like this:
When I do that, the posts.cshtml file displays as the home page and not index.cshtml as I would have expected? |
Yeah, what is happening is that posts.cshtml is being written out as index.html in the root. Nothing is happening with the index.cshtml file I created for the landing page. |
which is hard coded into PostsProcessor |
and the
creates a folder called index with an index.html in it. |
Change that to: "file": "index.cshtml => ./index.html" The other issue with the PostsProcessor needs to be fixed. :( |
Thanks Phillip. That does fix the index.html file going to the root. Because of the PostsProcessor issue though, the compiler errors writing the index.html file because the Posts index.html file already exists in that location. As a workaround can I make all the posts go into a "posts" directory? Presumably that would put the Posts index.html into that folder? It's not ideal from a url perspective, but good to know what options there are. Thanks |
Hmmm it might be possible to run the posts from /posts/index.cshtml
Which would put it under the sub folder /posts in theory. Otherwise I need to do a code fix. |
Only had a brief look at it but that didn't seem to do it. What would be involved with a code fix? How could this feature ideally work? Thanks. |
Not much to code fix, looking at it now, just a case of being able to do => posts.html for the name of the index file. I'll add a new issue to look at being able to throw it in a folder in the future. That would be handy. |
So, there would be a posts\index.html, but urls wouldn't have /posts/ added? That sounds excellent! Sent from my iPad
|
Pretty much got this working. Making some notes here so I can add them to wiki later: Scenario 1:
Currently works as it does now, creates a file called Scenario 2
Works the same as index.cshtml, except the expectation is that the file created in root is Scenario 3
Acts like Scenario 1 except the source file and destination file are explicit, rather than inferred. Scenario 4
Assumes the file is I think that covers all. Need to write a lot of unit tests! |
That is awesome Phillip. Thanks for the time and effort. The scenarios look pretty comprehensive! |
I'm pretty sure Snow can already handle this, but I would appreciate some advice on how to do it. I have my website setup as normal, with the home page being the post listing page. What I would like to do instead is make the home page a landing page and have the post listing be a page that you link to from the home page.
Any suggestions on how I can do that?
Thanks
The text was updated successfully, but these errors were encountered: