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

Unable to Include a single page besides "About" #197

Open
iaintshootinmis opened this issue Sep 19, 2024 · 3 comments
Open

Unable to Include a single page besides "About" #197

iaintshootinmis opened this issue Sep 19, 2024 · 3 comments

Comments

@iaintshootinmis
Copy link
Contributor

I have a "Resume" page declared with the below code. However, when a visitor clicks on the Resume sidebar item, instead of loading the contents of Resume.md (like About does) it shows a link to the Resume along with the publish date (like a Post!)

menu = [ {Name = "About", URL = "/about/", HasChildren = false}, {Name = "Resume", URL = "/resume/", HasChildren = false}, {Name = "Posts", URL = "/posts/", Pre = "Recent", HasChildren = true, Limit = 5},

@iaintshootinmis
Copy link
Contributor Author

iaintshootinmis commented Sep 19, 2024

I resolved this by navigating to ./themes/poison/layouts and creating a new folder called resume. I then copied about.html from about into resume and renamed it to resume.html

From here, I modified line 6 to read as such:

Removed
{{ with .Site.GetPage "/about"}}

Added
{{ with .Site.GetPage "/resume" }}

This allowed the contents of content/resume/resume.md to load as a single page without a table of contents.

Leaving this open in case there is a better way to resolve this issue.

@iaintshootinmis
Copy link
Contributor Author

I know I'm talking to myself at this point, but that's ok. I've noticed that the about page doesn't populate the TOC. So now that's a new issue, as I want the Resume type to have a sidebar with sections of my resume loaded from # Headings.

Will update if I resolve this. And maybe the theme should have a default single pager? For resumes? Or for other things that need to be a single page W/ a TOC? If I figure out how to do one I'll make a pull request.

@allanmac
Copy link

Possible fix:

Full formatted text for a single page is shown up to a <!--more--> in your content's index.md.

Translation: strategically append a <!--more--> at the end of your resume?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants