jbub / ghostwriter Goto Github PK
View Code? Open in Web Editor NEWThis project forked from roryg/ghostwriter
A port of ghostwriter theme to Hugo.
License: MIT License
This project forked from roryg/ghostwriter
A port of ghostwriter theme to Hugo.
License: MIT License
Hi,
This is the output of my yarn run watch command:
yarn run v1.17.3
$ webpack --progress --colors --watch
internal/modules/cjs/loader.js:775
throw err;
^
Error: Cannot find module 'perfectionist'
Require stack:
Hi, thanks for such a great theme. Is Google Analytics implemented? In the template file, of course, there is the googleAnalytics
field, but if I understand correctly there need to be changes to the template field as well (as described here. I ask only because I added a Google Analytics tracking code, correctly, I hope, but don't seem to see it registering activity yet. Thanks for your consideration of this!
Hi, just having some trouble getting up and running!
I ran npm install
and npm run watch
which seemed to do a tonne of stuff - but i don't have yarn
do I need it?
Basically when I browse my site locally I see the following scripts failing to load because they don't exist:
localhost/:23 GET http://localhost:1313/dist/styles.css
localhost/:665 GET http://localhost:1313/js/jquery.fitvids.js
localhost/:664 GET http://localhost:1313/js/jquery-1.11.3.min.js
localhost/:671 GET http://localhost:1313/js/scripts.js
(index):664 GET http://localhost:1313/js/jquery-1.11.3.min.js
(index):665 GET http://localhost:1313/js/jquery.fitvids.js
(index):671 GET http://localhost:1313/js/scripts.js
How can I get them created?
Hi. Awesome theme. Is there a way to include links to headers within a page? Thanks!
Based on WCAG and general findings:
Everything was working fine until I got this error and my page stop rendering on the browser:
I think it might be a theme issue but not sure, any help in the right direction is greatly appreciated!
Here is my Github repo
Thanks for a great theme. I am new to Hugo and am trying to change the default font. I first considered the settings in the "Colours" section of style.scss
, but changing these did not seem to change the appearance. Can you recommend how I can make changes to them?
Josh
I want to have my posts to show up as https://blog.peoray.com/hello-world instead of something like https://blog.peoray.com/a_folder_name/hello-world.
I remove the containing folders (Home, Tutorials, Personal) and also main.menu and also copied and pasted the articles I already have into the root content folder but viewing it on the browser, I noticed that the post-footer isn't showing (newsletter, tags, social media sharing and disqus)
How do I o about this and fixed it, I hardly know any Go to fix this
Link to repo
Is there a way to prevent the "Getting Started with Hugo" post from appearing on my site?
How to change the number of post title per page.
Hi there,
I can't find where in the theme we can edit the little 'feed' icon that seats right on the top center of the website. Whenever I click on it, it opens the News app on my mac. I have no use for it and would like to remove it completely, but don't know how. Thanks in advance.
I'm attempting to code mathematics formulas on a blog page but my site is rendering those formulas out as a text string rather than a mathjax formula. For example, I am using this formula:
\hat{y}=\beta_1x+\beta_0
It gets rendered as a text string. I've attempted to use various types of math delimiters, like
Is there any way to render a math formula in a blog post?
The page with the bad math is located at: https://gself.com/2018/10/16/simple-regres/. A couple of paragraphs below the correlogram is this paragraph:
The general regression formula is (\hat{y}=\beta_1x+\beta_0) where the output ((\hat{y}) is determined by two parameters of the model ((\beta) and the input ((x). As an example, if (\beta_1) is 2 and (\beta_0) is 1 then an input ((x) of 1 would yield an output ((\hat{y}) of 3.
Thanks for any help you can offer.
Hello, thanks a lot for porting this theme to Hugo!
I found the dist folder in this repo. It's not a good solution in Hugo, I suggest to use Hugo pipes and remove the "dist" folder, it's a more clean and good solution to override code and make CSS/JS chunks, without editing theme files inside and rebuild with yarn.
More about Hugo pipes you can find here - https://regisphilibert.com/blog/2018/07/hugo-pipes-and-asset-processing-pipeline/
I can do refactoring and help with it! Waiting for your feedback. Thx!
there is a mixture of html5 semantic elements (multiple
s, ) but some are missing.This is an accessibility issue, but also a semantic one.
There is some schema markup using microdata, but this does not serve the same purpose.
Editing layouts/index.html
does not result in changes to the site's homepage but edits made to layouts/_default/list.html
do.
Is there a way to change this so that I can control the homepage by editing layouts/index.html
?
I've noticed that if you create a page that displays all of the tags of your posts, there isn't a way to control the format of the list of tags (i.e. all uppercase/lowercase or as entered). Additionally, if you have a lot of tags, the page navigation between the pages references posts instead of tags.
I think it would be beneficial to allow for the tag display to be customized so that the case is uniform and for the navigation to say tags instead of posts.
I am trying to add an about page, that can be accessed from the main menu, but it appears on the main page in the posts list. The page file is located in "content/page/about.md". Is there a way to hide it from posts list?
Hi @jbub,
Thank you for your great job with this theme.
Just a question, do you think to support the Twitter cards and the equivalent of Facebook and other social networks?
Thank you and take care about you.
Stéphane
Thank you for this wonderful theme: simple but very functional! I am relatively new to Hugo so I have some questions:
the name of the author in the header of .md files does not work for me. The theme takes always the name I have put in under [Author] in the config.toml. It overwrites all names in the headers in the .md files.
project files do not have authors. Is this intended? I believe there it would more important than in the blog, as projects are normally done cooperatively and one should mention all participants.
how can I change the slug? Is it always the filename? This means I have to create a post with a good filename in mind and later -- if I change the focus/subject of the title, what happens many times -- to rename title (easy) and the file name (not so easy). The file name IMHO Is not important for readers as it is not seen, but the URL should transport some idea about the content of the post).
is there a place where I can get some information what variables and metadata in the header of the posts/projects of your theme are allowed? I would need some kind of a primer …
and last not least: I was surprised that the live site generated a comment form by Disqus. I left the disqusShortname = "XXX", e.g. I did not provide my Disqus short name.
(I was using ghostwriter with blogdown 0.1, hugo 0.27.1 and employed it via GitHub with Netlify.)
Hello is it possible to have code formatting like so? Rather than using four spaces?
```python{4}
def foo():
x = 1
y = 2
z = 3
```
Hello, nice work with this theme. I noticed that the config is currently set to a YAML
file and most params are quite simple to use.
I would like to know if the same work for config.toml
, I did search but found no example usage of the same, perhaps this could be added to the exampleSite
folder if such support exists. I'm currently using a .toml
file which works but harder to customise.
EDIT
It seems that a .toml
file was the original config according to this
Thank you,
Nelson
2:58:54 PM: Executing user command: hugo 2:58:54 PM: ERROR 2019/10/20 13:58:54 Failed to add template "partials/header.html" in path "partials/header.html": template: partials/header.html:10: function "hugo" not defined 2:58:54 PM: ERROR 2019/10/20 13:58:54 partials/header.html : template: partials/header.html:10: function "hugo" not defined 2:58:54 PM: Building sites … 2:58:54 PM: ERROR 2019/10/20 13:58:54 Error while rendering "page" in "post/": template: post/single.html:1:3: executing "post/single.html" at <partial "header.html...>: error calling partial: template: "partials/header.html" is an incomplete or empty template 2:58:54 PM: Skipping functions preparation step: no functions directory set
Apparently a scammer has registered the default base url genreated by hugo ("http://replace-this-with-your-hugo-site.com") and has some malware, ads, etc on it. See: gohugoio/hugoThemes#171.
Your theme doesn't use this base url but it still points to a website that could be or is already registered. To avoid such abuse in the future I would recommend to switch to a base url like "https://www.example.com/".
Thanks
Dear Juraj, thanks for the theme.
I am trying to change the content of the main page of a website with ghostwriter. I noticed the main page has the content under 'post', but I would like that to be only under one of the other main menus (in my case, I have a main menu called tutorials where I will have the posts).
But I don't know how to change that in the config file. I would like the front page of the site to be a page called Home, which could be the main menu with weight 1, and add some blurb there, but not posts. Where can I put some markdown text to go in the initial page?
Hope it's not too confusing.
Thanks!
The partial for header.html appears to support a log entry, but I cannot get the logo to appear. I have added
logo="/img/logo.png" to [params] in config.toml and put the file in content/img
This results in site error
2022-01-28 09:57:29.630 +0000
ERROR 2022/01/28 09:57:29 render of "page" failed: execute of template failed: template: post/single.html:1:3: executing "post/single.html" at <partial "header.html" .>: error calling partial:
I hava also tried to explicitly edit img src in header.html.
Any help welcome. Other info on using logo in [params] is pretty vague as far as I can see
Thanks in advance
On this line, you hard-code the post section to be called "post":
{{ $pag := .Paginate (where .Data.Pages "Type" "post") }}
It is not a good Hugo templating practice. Using the below is better:
{{ $pag := .Paginate (where .Pages "Type" "in" .Site.Params.mainSections) }}
/cc @JuanPabloMF
Hello,
I have been trying to use the menu system for the ghostwriter theme with no success. I have followed the example in the config.yml
, but have placed square brackets around the name of the parameter since this is how it works with when using config.toml
file for Netlify. This is how I did it and it did not work:
[menu]
[main]
name: "Blog"
url: "/"
weight: 1
How would I go about implementing the menu system correctly?
Thanks
acorn
Current Version: 6.4.0
Remediation: Upgrade acorn to version 6.4.1 or above.
fstream
Current Version: 1.0.10
Remediation: Upgrade fstream to version 1.0.12 or above.
tar
Current Version: < 2.2.0
Remediation: Upgrade tar to version 2.2.2 or above.
sshpk
Current Version: 1.10.1
Latest Version: 1.16.1
Remediation: Upgrade sshpk to version 1.13.2 or above.
lodash
Current Version: < 4.17.12
Remediation: Upgrade lodash to version 4.17.12 or above.
Don't know if it's everyone or just me facing this issue.
Hello I wish to centre some images and need to put the following code into the theme. But not sure where to put it. Perhaps it's worth putting it in as default?
http://www.ebadf.net/2016/10/19/centering-images-in-hugo/
img[src$='#center']
{
display: block;
margin: 0.7rem auto; /* you can replace the vertical '0.7rem' by
whatever floats your boat, but keep the
horizontal 'auto' for this to work */
/* whatever else styles you fancy here */
}
img[src$='#floatleft']
{
float:left;
margin: 0.7rem; /* this margin is totally up to you */
/* whatever else styles you fancy here */
}
img[src$='#floatright']
{
float:right;
margin: 0.7rem; /* this margin is totally up to you */
/* whatever else styles you fancy here */
}
Get rid of {{ if or (not (isset .Site.Params "sharetwitter")) .Site.Params.shareTwitter }}
and use simple if conditions
The partial for header.html appears to support a log entry, but I cannot get the logo to appear. I have added
logo=/img/logo.png to [params] in config.toml and put the file in static/img
I hava also tried to explicitly edit img src in header.html.
Any help welcome. Other info on using logo in [params] is pretty vague as far as I can see
Thanks in advance
Hi jbub - great theme! I request for a few bits of additional functionality:
LinkedIn per-post sharing (needed in addition to Twitter & Facebook per-post sharing)
Inclusion of a YAML-specified image in per-post share content (text only shares get little attention on social media!)
filtering view of blog posts titles by category and/or tag
Please let me know what you think of these proposed features!
Thank you Jbub!!!
Google+ is no longer available so it should be removed from sharing, profile list, and configuration file.
In the post-footer.html partial template, the Twitter, Facebook, Google+, and LinkedIn options all attempt to open a window with a specific size:
ghostwriter/layouts/partials/post-footer.html
Lines 13 to 44 in 2340a01
This does not work on mobile and might need to specifically call out about:blank as the target so that a new tab can be used.
Additionally, since the JS for the onclick event is inlined, a CSP that disables inline JS cannot be used. To make sites that use this theme more secure, the JS needs to be pulled into its own file(s) and then referenced in the page.
Hi I want to have the dropdown menu on my site using your theme. I want something like following.
My config.toml file looks like following:
baseurl = "/"
relativeurls = true
languageCode = "en-us"
title = "Jd's Notebook"
paginate = 10
theme = "ghostwriter"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\.Rmd$", "_files$", "_cache$"]
[permalinks]
post = "/:year/:month/:day/:slug/"
[[menu.main]]
name = "About"
url = "/about/"
[[menu.main]]
name = "Github Configuration"
url = "/github-configuration/index.html"
[[menu.main]]
name = "Twitter"
url = "https://twitter.com/janeshdev"
[[menu.main]]
name = "Github"
url = "https://github.com/janeshdev"
[[menu.main]]
name = "DSI Posts"
url = "/tags/dsi/"
[taxonomies]
category = "categories"
tag = "tags"
[params]
description = "Janesh Devkota's personal notebook"
# options for highlight.js (version, additional languages, and theme)
highlightjsVersion = "9.9.0"
highlightjsLang = ["r", "yaml"]
highlightjsTheme = "github"
I don't want to change the position of the menu. It will be the default menu that is on the top of the website.
In simple words, I was wondering if I could add few items under About in the menu.
Hugo v0.120.0 deprecated author key in site configuration, and now there is a warning:
I have tried moving the author key in params, but it seems it is ignored
Closed by #44.
When I deploy a branch preview on Netlify, the site using this theme does not look right because the CSS and JS resources from the theme are not found.
I believe this is because {{.Site.BaseURL}}
is used, and it does not add missing trailing slash. I have one in my baseURL
config but Netlify sets none when changing the base URL.
ghostwriter/layouts/partials/header.html
Lines 14 to 15 in 2dd435c
However, it seems that loading resource this way is not advice. See gohugoio/hugo#3262 (comment) where the maintainer of hugo advice the following
But manually creating URLs using {{ .Site.BaseURL }} is fragile, esp. for themes, and not recommended. Use absURL and friends, and you should not have to worry about slashes.
Using relURL
or absURL
would be better I believe.
This fix the issue I encounter if I tweak the theme. But there are a lot of occurrences in the theme of this.
I think this should be fixed as the theme level.
Does this cause any issue with anyone in the past ?
Hello!
I'm trying to modify this beautiful theme to display in my homepage the content of about.md
, contained in content/about.md
.
If my intuition is correct, I have to update the index.html
webpage.
But, even after reading the tutorial about Hugo templates, I don't understand how to ask to the index.html
file: "Please, read the content of about.md
when the path is /
".
Can somebody help me please? :-/
Thanks a lot!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.