How to insert bookdown page into a hugo static website - hugo

I am working on a blog driven by hugo. I want to insert a bookdown page into a hugo. For example, my domain is https://example.name. And I write a book by bookdown. I hope I can insert this bookdown page into the address like this https:/example.name/notes/abc, so that if I open this link, it will direct into this bookdown page I made. How can I make it?

The generated HTML from bookdown can be put in the Hugo static directory /static/notes/abc these files can than be accesses at http://example.name/notes/abc/.

Related

How can I create a deeper level of detail page for single list content in HUGO

I’m building our job posting pages with Hugo. So we will have a “Join Us” section with the list of job postings there and then we will need a detailed page for each job post, something like /join/software_engineer/. Hugo works well for this part, I created a section page template and single page template, with all the job posts in the content folder.
But now we need a deeper level of the detail page, like /join/software_engineer/submit/ to submit the resume and other info. The detail page may look very similar for every job post and will need some info from the single list content and a structured URL. Is there any way I can achieve this in a “HUGO way”? (Right now I’m coding the submit section with a modal, but still very curious if this kind of detail page is achievable.)
Any suggestions? Thank you in advance :).
if you like to go deeper your last folder needs to have an _index.md file (note the underscore). Then set the type in your frontmatter and create a custom layout e.g.
type: software_engineer
layouts/software_engineer/list.html
I have a site where I go many levels deep and that works well.

When to use Static site generator?

I have a web application that has login and role-based contents etc. which is created in nuxt (framework for vue)using universal mode .currently it is SSR(server-side rendering) app but Is it correct if convert it into static site using nuxt generate command ?
FYI:- I have tried running nuxt generate , it generates appropriate pages inside dist but my concern is inside each HTML files, only CSS is there and script tag. I understand i cannot statically generate contents for each page since it's based on users.knowing that is it correct if I go with SSG or does it kills its purpose?
Avoid SSG for sites with content that changes often(dynamic) for logged in user.
Update:-
Lot of great sites out there for helping developers new to this, such as
https://jamstack.org/
https://explorers.netlify.com/
At the end, its way of generating html for each routes with contents at build time(some new methods also being worked on by netlify and vercel for improving build time for big jamstack sites) and once user visits home page, its html served and js kicks in and does SPA part for further navigation instead of full page refresh + interactivity

How to modify HTMLElement in index.html before page gets returned to requestor

Based on my custom URL parameters I process, I am trying to modify dynamically a meta tag I have id'ed in index.html like so:
<meta name="og:image" content="http://example.com/someurl.jpg" id="ogImage"/>
The code below in my home.ts seems to be working
document.getElementById('ogImage').setAttribute("content", Media.ImageURL) ;
I can verify it is via the browser dev console/elements.
However, when I view from facebook via their ojbect graph debugger at
https://developers.facebook.com/tools/debug/og/object/
It appears to see the default
http://example.com/someurl.jpg
as if the index.html is shipped before my home.ts gets chance to make the update.
Perhaps, my understanding is flawed and there is better way to do this.
Thank you.
Note1: initially, I was thinking I had to make some angular binding between index.html and one of my services but I could not locate any sample code, the closest I came to was this post
How can I update meta tags in AngularJS?
But I don't know how to apply it for my ionic2/3 code, so I opted for the document.get approach.
Note2: the ultimate goal here is to share a link into a social media (web or app) like facebook, a messenger like viber/skype, etc... and have it resolve to meaningful images, title, description to drive the visit back to the site via browser, or app if the user clicking on the link is on a mobile device with my app version of the site installed on his device.
Note3: if you decide to point me to ionic deeplinking please provide code to match above, because I could not understand how to apply to my case.
If you are trying to implement dynamic open graph meta tags values in your pages, you will need a server-side scripting language like php. Such a script will run on the server, update the pages as needed, then the pages will be served to the requesting site or application.
client-side scripting (ie. JavaScript) is usually ignored when a site or app is merely visiting your site/link for the purpose of extracting (aka scrapping, parsing html) information such as the one provided by the open graph meta tags (og:title, og:description og:image...).

How to build single page site from Markdown?

Hugo is for people building a blog, company site, portfolio, tumblog, documentation, single page site or a site with thousands of pages.
http://gohugo.io/overview/introduction/
I'd like to make a single page site. My content is written in Markdown index.md. How do I build it?
It's necessary to build with Hugo (rather than pandoc) because I want to use its csv templating feature http://gohugo.io/extras/dynamiccontent/
I tried hugo new to create a blank site. If I create _layouts/index.html then hugo server will show that. But I want to write content in Markdown.
As of Hugo 0.18, this is now possible by creating a content/_index.md file, if the theme you are using supports it. You can create this file with the command hugo new _index.md. See the Hugo docs for more details.
Just write a post example.md as usual, Hugo will build it public/example/index.html. Then rather than push public to your web host, publish public/example. Voila, single page site.
the hugo quickstart should have everything you need to get started, including adding markdown posts. Specifically, hugo new POSTNAME.md will create a markdown post with proper header at content/POSTNAME.md.

Display content from sub pages

I would like to make sub pages under and existing page. Lets say the page is "Success Stories" and under this page the user can enter in other pages and format them any way they want. What I need is a way to make a repeater of all these subpages with stuff like the page title, a little bit of the content, and a button that links to the actual page.
Is this possible out of the box? I am willing to buy a module if it is reasonable;however a Google search returned no results.
Thank you.
The best option I know is Child Links from Ventrian.
You can show all children with title and description & links. (NOTE: description is Page description NOT content from the page.)
what version of dotnetnuke are you using?
Two options:
ONE
There is a copy page function where you can choose what modules and setting to copy to the new page.
Under the pages menu - click copy page
then you can select what page to copy from, and then it will list all modules on that page. You can choose to copy the module with or without content or even reference the module on the source page.
TWO
Other than that you can create a page template that a user can select that is pre-designed by you. Create the base page the way you want it and then click export page under the page / edit page menu depending on your version. A template will be created in your portal template folder that can be used when creating new pages.
If you are looking to automate this process, then you will have to look into a custom module or design a sql script you can run yourself (but this is a lot more maintenance as it can change with every version.)

Resources