Is it possible to build a blog on the intranet?

I attempted to build a blog with blogdown and hugo theme. I have no intention to comit and push it to github.

Here is what I did:

  1. New project
  2. New Directory
  3. Website using blogdown
  4. Use alex-shpak/hugo-book as the Hugo theme, so copy and paste it in.
  5. Create Projecct

When I did the following code

build_site(local = T)

I got the following message:

Start building sites … 
hugo v0.91.2-1798BD3F+extended windows/amd64 BuildDate=2021-12-23T15:33:34Z VendorInfo=gohugoio
ERROR 2022/08/30 11:10:42 Failed to read Git log: fatal: not a git repository (or any of the parent directories): .git
WARN 2022/08/30 11:10:42 Expand shortcode is deprecated. Use 'details' instead.
WARN 2022/08/30 11:10:42 Page '/overview/configuration/' not found in 'posts\migrate-from-jekyll.md'
WARN 2022/08/30 11:10:42 Page '/layout/templates/' not found in 'posts\migrate-from-jekyll.md'
WARN 2022/08/30 11:10:42 Page '/doc/shortcodes/' not found in 'posts\migrate-from-jekyll.md'
WARN 2022/08/30 11:10:42 Page '/layout/variables' not found in 'posts\goisforlovers.md'
WARN 2022/08/30 11:10:42 Page '/layout/functions' not found in 'posts\goisforlovers.md'
WARN 2022/08/30 11:10:42 Page '/content/front-matter' not found in 'posts\goisforlovers.md'
Error: Error building site: logged 1 error(s)
Total in 818 ms

When I commanded the following code

serve_site(local = TRUE)

I got this message:

Error in servr::server_config(..., baseurl = baseurl, hosturl = function(host) { : 
  unused argument (local = TRUE)

I get the same error.

It seems like an issue with this specific theme. Was it working before ?

I found report in the repo:

But no info on how it was solved. However, from the README documentation for this theme I am seeing this configuration

# (Optional) Set this to true to enable 'Last Modified by' date and git author
#  information on 'doc' type pages.
enableGitInfo = true

If you set it to false then it works ok.
In config.yamlYAML that would be

enableGitInfo: no

I believe you don't need that if you are not inside a git repo.

No issue with blogdown or rmarkdown, only some specific theme configuration you need to tweak.

1 Like

Thank you Christophe. Not only you gave me a 'fish', but also taught me how to 'fish'.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.