About theme (hugo-academic) in blogdown - r

I am trying to install hugo-academic theme in blogdown. Within my site directory I ran R and installed with
blogdown::install_theme("gcushen/hugo-academic")
After installing I edited the config.toml file as shown below:
baseurl = "/"
relativeurls = true
languageCode = "en-us"
title = "A Hugo website"
theme = "hugo-academic"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\\.Rmd$", "_files$", "_cache$"]
After that when I try to serve site with
blogdown::serve_site(),
I get the following error:
Started building sites ...
ERROR 2017/06/01 20:02:50 Error while rendering "page": template: theme/_default/single.html:10:7: executing "theme/_default/single.html" at <partial "article_met...>: error calling partial: template: theme/partials/article_metadata.html:7:24: executing "theme/partials/article_metadata.html" at <$.Site.Params.date_f...>: invalid value; expected string
Started building sites ...
ERROR 2017/06/01 20:02:50 Error while rendering "page": template: theme/_default/single.html:10:7: executing "theme/_default/single.html" at <partial "article_met...>: error calling partial: template: theme/partials/article_metadata.html:7:24: executing "theme/partials/article_metadata.html" at <$.Site.Params.date_f...>: invalid value; expected string
The system cannot find the path specified.
Error in shell(cmd, mustWork = TRUE, intern = intern) :
'"C:\Users\Suman\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t hugo-academic' execution failed with error code 1
In addition: Warning messages:
1: running command '"C:\Users\Suman\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t hugo-academic' had status 65535
2: running command '"C:\Users\Suman\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t hugo-academic' had status 65535
3: running command 'C:\WINDOWS\system32\cmd.exe /c "C:\Users\Suman\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t hugo-academic' had status 1
Any help to solve this?
Note: I am on Windows 10 64 bit OS.

Judging from the error message, you need to add a date_format parameter to your config.toml file. Try adding this at the end:
[params]
date_format = "Mon, Jan 2, 2006"
Take a look at the example config file for more settings that you can change.

Related

parse erorr near '\n' in .zshrc file

When I open my MacOS terminal, it shows
Last login: Sun Jan 2 15:50:48 on ttys000
/Users/rajeshrao/.zshrc:18: parse error near `\n'
(base) rajeshrao#Rajeshs-MacBook-Air ~ %
I tried opening that .zshrc file which had this code in there ---->
export PATH="/usr/local/sbin:$PATH"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/rajeshrao/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/rajeshrao/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/rajeshrao/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/rajeshrao/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
<<<conda initialize<<<
here is the image of code
I don't know much about how shell works and am just a beginner. I didn't interfere with anything before using the terminal.
The last line has lost the initial '#' (ie. is not a comment).
Edit the file to end with this line:
# <<<conda initialize<<<

zsh: Arithmetic Expansion: 'syntax error: operand expected (error token is "1+1")'

I'm trying to increment the output of a zsh command called get_latest_release by 1.
Here's my code:
current_version=$(/bin/zsh -i -c get_latest_release)
echo "current version = $current_version" # outputs 'current version = 1'
next=$(($current_version+1)) # gives an error: syntax error: operand expected (error token is "1+1")
echo $next
When I do:
current_version=1
echo "current version = $current_version" # displays current version = 1
next=$(($current_version+1))
echo $next # displays 2
Any idea why I can't get the output incremented by 1?
When I try:
/bin/zsh -i -c get_latest_release | hexdump -C
It strangely outputs the hexdump of the path: file://path_to_current_script.1.
So I just copied the get_latest_release() function to my script and it's now working! I really don't know why it's not working when the command is called with /bin/zsh.

Cake build NuGetPush throws permission denied

I'm building my .NET Core app in Travis CI using Cake script, when it comes to
var d = new DirectoryInfo(packageOutputPath.ToString());
var Files = d.GetFiles("*.nupkg").Select(x => new FilePath(x.FullName));
var key = EnvironmentVariable("NugetKey");
NuGetPush(Files, new NuGetPushSettings {
Source = Variables.NugetSource,
ApiKey = key
command I get:
An error occurred when executing task 'PushPackage'.
Error: One or more errors occurred. (Permission denied)
Permission denied
My .travis.yml file:
sudo: required
language: csharp
mono: none
dotnet: 2.1.402
before_install:
- chmod +x build.sh
script:
- ./build.sh --Target="PushPackage"
I have tried replacing - ./build.sh --Target="PushPackage" with - sudo bash build.sh --Target="PushPackage" but this did not help. Any suggestions why I'm getting this error?
build.sh file was builded according to this. Whole repo is here.
You should be using the DotNetCoreNuGetPush alias when using the .NET CLI, NuGetPush requires nuget.exe.
Example:
DirectoryPath packageOutputPath = MakeAbsolute(Directory("./nuget/"));
var settings = new DotNetCoreNuGetPushSettings
{
Source = "https://www.example.com/nugetfeed",
ApiKey = "4003d786-cc37-4004-bfdf-c4f3e8ef9b3a"
};
foreach(var file in GetFiles($"{packageOutputPath}/*.nupkg"))
{
DotNetCoreNuGetPush(file.FullPath, settings);
}

Apigee Command Line import returns 500 with NullPointerException

I'm trying to customise the deploy scripts to allow me to deploy each of my four API proxies from the command line. It looks very similar to the one provided in the samples on Github:
#!/bin/bash
if [[ $# -eq 0 ]] ; then
echo 'Must provide proxy name.'
exit 0
fi
dirname=$1
proxyname="teamname-"$dirname
source ./setup/setenv.sh
echo "Enter your password for user $username in the Apigee Enterprise organization $org, followed by [ENTER]:"
read -s password
echo Deploying $proxyname to $env on $url using $username and $org
./tools/deploy.py -n $proxyname -u $username:$password -o $org -h $url -e $env -p / -d ./$dirname
echo "If 'State: deployed', then your API Proxy is ready to be invoked."
echo "Run '$ sh invoke.sh'"
echo "If you get errors, make sure you have set the proper account settings in /setup/setenv.sh"
However when I run it, I get the following response:
Deploying teamname-gameassets to int on https://api.enterprise.apigee.com using my-email-address and org-name
Writing ./gameassets/teamname-gameassets.xml to ./teamname-gameassets.xml
Writing ./gameassets/policies/Add-CORS.xml to policies/Add-CORS.xml
Writing ./gameassets/proxies/default.xml to proxies/default.xml
Writing ./gameassets/targets/development.xml to targets/development.xml
Writing ./gameassets/targets/production.xml to targets/production.xml
Import failed to /v1/organizations/org-name/apis?action=import&name=teamname-gameassets with status 500:
{
"code" : "messaging.config.beans.ImportFailed",
"message" : "Failed to import the bundle : java.lang.NullPointerException",
"contexts" : [ ],
"cause" : {
"contexts" : [ ]
}
}
How should I go about debugging when I receive errors during the deploy process? Is there some sort of console I can view once logged in to Apigee?
I'm not sure how your proxy ended up this way, but it looks like the top-level directory is named "gameassets." It should be named "apiproxy". If you rename this directory you should see a successful deployment.
Also, before you customize too much, please try out "apigeetool," which is a more flexible command-line tool for deploying proxies:
https://github.com/apigee/api-platform-tools

Unix troubleshooting, missing /etc/init.d file

I am working through this tutorial on daemonizing php scripts. When I run the following Unix command:
. /etc/init.d/functions
#startup values
log=/var/log/Daemon.log
#verify that the executable exists
test -x /home/godlikemouse/Daemon.php || exit 0RETVAL=0
prog="Daemon"
proc=/var/lock/subsys/Daemon
bin=/home/godlikemouse/Daemon.php
start() {
# Check if Daemon is already running
if [ ! -f $proc ]; then
echo -n $"Starting $prog: "
daemon $bin --log=$log
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $proc
echo
fi
return $RETVAL
}
I get the following output:
./Daemon: line 12: /etc/init.d/functions: No such file or directory
Starting Daemon: daemon: unrecognized option `--log=/var/log/Daemon.log'
I looked at my file system and there was no /etc/init.d file. Can anyone tell me what this is and where to obtain it? Also is the absence of that file what's causing the other error?
Separate your args within their own " " double-quotes:
args="--node $prog"
daemon "nohup ${exe}" "$args &" </dev/null 2>/dev/null
daemon "exe" "args"

Resources