blogdown not inserting archetype when selected - r

I have a website setup using hugo and blogdown. I have an archetype setup called post.md, located at /themes/silhouette-hugo/archetypes/post.md, that looks like this:
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
categories:
- Software Development
tags:
- Untagged
featureImage: images/nelson_lakes_photo.jpg
---
""`<!--more-->`""
I went through the New Post addin in RStudio:
However the markdown file I got didn't include the archetype style
---
title: test
author: Conor Neilson
date: '2021-08-22'
slug: []
categories: []
tags: []
---
This used to work fine, it's only stopped working in the last few months.
Hugo version is 0.87.0, blogdown version 1.4.3.
Source code for my website is here

I just fixed this bug in blogdown. You may try the dev version:
remotes::install_github('rstudio/blogdown')
(Remember to restart R)

Related

Custom Fonts disappear regularly in Elementor

The custom fonts (Elementor (burger menu) > Site Settings > Global Fonts --> Custom Fonts) disappear once a week or even more often.
I found out that following file is missing, when the custom fonts are missing, f.e.: /wp-content/uploads/elementor/css/post-15544.css
I need to regenerate the CSS-Files in WP-Dashboard > Elementor > Tools --> Regenerate CSS & Data or do a WP-preview of a site where the styles are gone.
Here are some details to my WP-setup:
== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: mariadb.org binary distribution v10.5.18
PHP Version: 7.4.33
PHP Memory Limit: 512M
PHP Max Input Vars: 3000
PHP Max Post Size: 200M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 6.1.1
Site URL: https://www.erbrechtsinfo.at
Home URL: https://www.erbrechtsinfo.at
WP Multisite: No
Max Upload Size: 200 MB
Memory limit: 40M
Max Memory limit: 512M
Permalink Structure: /%category%/%postname%/
Language: de-AT
Timezone: Europe/Vienna
Admin Email: ***
Debug Mode: Active
== Active Plugins ==
All In One WP Security
Version: 5.1.4
Author: All In One WP Security & Firewall Team
*** Portale
Version: 1.1.37
Author: ***
Easy WP SMTP
Version: 1.5.3
Author: Easy WP SMTP team
Elementor
Version: 3.9.2
Author: Elementor.com
Elementor Pro
Version: 3.9.2
Author: Elementor.com
Element Pack Pro
Version: 6.11.0
Author: BdThemes
GDPR Cookie Compliance
Version: 4.8.2
Author: Moove Agency
GDPR Cookie Compliance - Premium Add-On
Version: 2.0.5
Author: Moove Agency
Imagify
Version: 2.1
Author: Imagify – Optimize Images & Convert WebP
Koko Analytics
Version: 1.0.37
Author: ibericode
Link Whisper
Version: 2.1.5
Author: Link Whisper
Loco Translate
Version: 2.6.3
Author: Tim Whitlock
Meta Box
Version: 5.6.15
Author: MetaBox.io
Meta Box Group
Version: 1.3.15
Author: MetaBox.io
MyListing Addons
Version: 1.2.30
Author: 27collective
Rating Form
Version: 1.6.9
Author: Serdar Gürler
Schema & Structured Data for WP & AMP
Version: 1.9.108
Author: Magazine3
TablePress
Version: 2.0.1
Author: Tobias Bäthge
WordPress Backup & Security Plugin - BlogVault
Version: 4.86
Author: Backup by BlogVault
WP Rocket
Version: 3.12.4
Author: WP Media
Yoast SEO
Version: 19.13
Author: Team Yoast
== Elementor Experiments ==
Optimized DOM Output: Inactive
Improved Asset Loading: Inactive
Improved CSS Loading: Inactive
Inline Font Icons: Inactive
Accessibility Improvements: Inactive
Additional Custom Breakpoints: Inactive
Import Export Website Kit: Inactive
Hide native WordPress widgets from search results: Inactive
admin_menu_rearrangement: Inactive by default
Flexbox Container: Inactive
Default to New Theme Builder: Inactive
Landing Pages: Inactive
Color Sampler: Inactive
Favorite Widgets: Inactive
Admin Top Bar: Active by default
Lazy Load Background Images: Inactive by default
Save as Default: Inactive
Page Transitions: Inactive
Notes: Inactive
Loop: Inactive
Form Submissions: Active
Scroll Snap: Inactive
Does anyone know what causes this issue?

`Jupyter-book build` taking too much RAM when building 4.5K notebooks

Background
I have preprocessed over 4.5K jupyter notebooks.
I would like to use jupyter-book to build a book from the processed notebooks.
I have execute_notebooks: "off" in my jupyter-book configs.
However, when I run jupyter-book build on the notebooks, I run into an error with the RAM required: the RAM required keeps on increasing.
Questions
QS1. Is there something that I should be doing to avoid this RAM increase? Maybe something in my config/toc ymls?
QS2. Alternatively, is there any way I can estimate how much time/mem will be needed to build the book before running `jupyter-book build?
Extra
Below is a graph of the mem usage in 1hr of processing (when logs are at writing output... [ 3%] content/toi_notebooks/toi_2175)
_toc.yml:
format: jb-book
root: index
parts:
- chapters:
- file: content/example_loader
- file: citation
- file: content/toi_fits
sections:
- glob: content/toi_notebooks/toi_*
_config.yml
# in _config.yml
title: "TESS Atlas"
author: the TESS Atlas community
logo: _static/atlas_logo.png
execute:
execute_notebooks: "off"
# Define the name of the latex output file for PDF builds
latex:
latex_documents:
targetname: book.tex
html:
use_edit_page_button: false
use_repository_button: true
use_issues_button: true
# Information about where the book exists on the web
repository:
url: https://github.com/dfm/tess-atlas
branch: main
gitissue: https://github.com/executablebooks/jupyter-book/issues/1571

I get no image in the viewer panel when I run blogdown's serve_site()

I used the following code to create the blogdown site with HUGO 0.88.1;
new_site(theme = 'puresyntax71/hugo-theme-chunky-poster',
format = 'toml')
And as per the instructions I am following, a site is supposed to load on the viewer panel which is not happening.
I have tried the check_site() function and within the results I get;
Checking .gitignore
| Checking for items to remove...
○ Nothing to see here - found no items to remove.
| Checking for items to change...
○ Nothing to see here - found no items to change.
| Checking for items you can safely ignore...
○ Found! You have safely ignored: .DS_Store, Thumbs.db
| Checking for items to ignore if you build the site on Netlify...
● [TODO] When Netlify builds your site, you can safely add to .gitignore: /public/, /resources/
| Checking for files required by blogdown but not committed...
● [TODO] Found 1 file that should be committed in GIT:
layouts/shortcodes/blogdown/postref.html
so I went to inspect the shortcode referred above which had the following content;
{{ if eq (getenv "BLOGDOWN_POST_RELREF") "true" }}{{ .Page.RelPermalink }}{{ else }}{{ .Page.Permalink }}{{ end }}
How can I commit that file to GIT as instructed? And is that the reason I am not getting a preview of the site?
NOTE: Important information I had not mentioned before; the following is the error code that I receive when I try to serve_site()
Launching the server via the command:
C:/Users/User/AppData/Roaming/Hugo/0.88.1/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t hugo-theme-chunky-poster -D -F --navigateToChanged
Error: "C:\Users\User\Documents\20210913_blogdown\web-tea\config.toml:1:1": unmarshal failed: toml: table markup already exists
Update: This error message
Error: "C:\Users\User\Documents\20210913_blogdown\web-tea\config.toml:1:1": unmarshal failed: toml: table markup already exists
indicates that you have two markup fields in config.toml like this:
[markup]
[markup.highlight]
codeFences = false
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
You have to merge them like this:
[markup]
[markup.highlight]
codeFences = false
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
I cannot reproduce your problem. It seems this theme requires an access token for Instagram. I just configured an arbitrary string in accessToken like this in config.toml:
[services]
[services.instagram]
disableInlineCSS = true
accessToken = "aaaa"
Then blogdown::serve_site() worked fine.

Rstudio web pages render correctly locally, but not from server

Dev Environment: R 3.3.2 / R Studio 0.99.1266 / Windows 7
Web server: Kubuntu ; Apache/2.14.18
Browser: Firefox 52.0.1
Context :
I have a simple set of web pages I'm creating in R Studio for a short course series. I develop this on a Windows machine, then copy the _site folder to the server. It is the first time I've done web pages in R Studio, but also my server was recently replaced.
Consequently, I don't know if this is an RStudio issue or something to my Apache configuration. And I don't know how to diagnose where the problem described below lies.
Problem
It looks fine on my Windows machine with Firefox as a file:// URL
also looks fine when I open the site on the server,
but as a file:// URL (I have a samba share to the server that lets me see this as another drive.)
similarly, looks OK if I open the site using the command line tool, xdg-open index.html on the server machine
BUT, when I open this in Firefox with the server http:// URL on either the Windows machine or on the server machine, none of the style or other attributes are rendered correctly.
To illustrate: this is what I see opening the site from my Windows machine, with a file:// URL
The server URL is Introduction to R Graphics
which looks like this:
The _site.yml file is straight-forward:
name: "RGraphics"
exclude: ["notes/", "sources/", "*.pptx", "*.bak"]
navbar:
title: "An Introduction to R Graphics"
type: inverse
left:
- text: "Home"
icon: fa-home fa-2x # handy way to use FontAwesome icons in nav!
href: index.html
- text: "Abstract"
icon: fa-file fa-2x
href: abstract.html
- text: "Resources"
icon: fa-book fa-2x
href: resources.html
And so are the various .Rmd files, e.g., index.Rmd:
---
title: "An Introduction to R Graphics"
author: "Michael Friendly, SCS Short Course"
date: "March, 2017"
---
## Session 1: Overview
- Lecture notes: [1up PDF](R-Graphics1.pdf); [4up PDF](R-Graphics1-2x2.pdf)
#### Topics:
+ Getting started: R, R Studio
+ The roles of graphics in data analysis (exploration, analysis, presentation)
+ What can I do with R graphics: Anything!
...
The diagnosis of the source of the problem came from the 403 (forbidden) errors noted above. But the cause of the problem was that folder permissions for site_libs/ weren’t set correctly. That folder, and all the subfolders containing the javascript libraries needed to be set to 755 (drwxr-xr-x), i.e., allowing read and execute permissions to folders for all users.
Why this happened: the properties of the site_libs/ files generated by R Studio on Windows don't map well to the Unix permissions required for the web server.
Cure: On the server, cd to the top level of this web tree. Then, use something like
find . -type d -exec chmod 755 {} \;

Wordpress: push new plugin version

I have a silly issue updating a Wordpress plugin I made : https://wordpress.org/plugins/import-youtube-videos-as-wp-post/
I'm tired and I can't figure out why the plugin repo is still saying: Download version 1.4, when I updated it to 1.5.
I changed the stable tag in the readme.txt in the trunk and the 1.5 tag folder: https://plugins.svn.wordpress.org/import-youtube-videos-as-wp-post/trunk/readme.txt
=== Plugin Name ===
Contributors: enguerranws
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BQNTS4S2PEQVN
Tags: youtube, content, videos, enguerranws, google api, youtube api, youtube importer, video importer
Requires at least: 3.0.1
Tested up to: 4.7.3
Stable tag: 1.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
What do I miss there?
Your main file version is 1.4
/*
Plugin Name: Import YouTube videos as WP Posts
Plugin URI: http://www.enguerranweiss.fr
Description: Get a video list from a request to Youtube (free query, playlist ID, channel ID) and add their content to your own Wordpress :)
Version: 1.4
Author: Enguerran Weiss
Author URI: http://www.enguerranweiss.fr
*/
Try to change the version and Upload.

Resources