Try Ghost free for 14 days on a fully managed Ghost(Pro) infrastructure.
Try Ghost ProCurrent Version: 1.4.0 - 5 Nov 2019
yourblog.com/ghost
.In order for the Search to work, we need to generate a new Content API Key using the following steps.
From Ghost admin, click Integrations from the sidebar menu, then click + add custom integration.
Then, give the new integration a name, for example, Search and click Create.
Now, a new Key is created, hover over it and new Copy button will appear, click on it to copy the Key to the clipboard.
Next, click Code injection from the sidebar menu and add the following code to the Blog Header box after replacing the XXXX
value with your API KEY.
<script>
var search_api_key = 'XXXX';
</script>
To be like:
Click Save.
Subscribers can be enabled via a checkbox on the Labs page (Labs > MEMBERS (BETA)
), in your Ghost admin panel:
Once enabled, different parts of the theme will appear:
In order for the blog to fully supports member sign up flows and subscriptions, within the theme folder is a routes.yaml
file. Upload this single file using Routes on the Labs page.
To edit plans features, you can edit the partials/signup-plans.hbs
file.
For more information about Members, connecting Stripe and setting the package price, I highly recommend checking the official Ghost documentation.
To enable the dark mode version, open the default.hbs
file and change line 10 to be {{> compiled/inline-css-dark }}
instead of {{> compiled/inline-css }}
as:
Save the file and upload the theme to your Ghost blog.
To create a static page, you can start creating a new Post. While you are on the post editor page, there is a cog wheel icon () at the top right. Click on that icon, and check the Turn this post into a page box. This will convert your post to a static page.
You can add, edit, delete and reorder menu links on your Ghost blog from the Navigation section in the admin area located at ghost/#/settings/design
.
To include a static page on your navigation menu. First, type the name of the page as youâd like it to appear on your menu in the label field.
Next, click on the URL field of the menu item and we can find that the blog URL is already auto-populate for us. We will need to add the page slug after the final /. Once satisfied with our page configurations. Clicking the blue Save button will add the page to the navigation menu.
For the search to work, please make sure that the Public API enabled.
The theme uses ghostHunter. Search is done for the post title and the content.
The supported languages in addition to English are Russian, French, Spanish, Germany, Portuguese, Italian, Finnish, Dutch and Danish.
To create the Tags page:
To create the Authors page:
To create the Contact page:
<form action="https://formspree.io/your@email.com" method="POST">
<input type="text" name="name" placeholder="Name">
<input type="email" name="_replyto" placeholder="Email">
<textarea name='message' placeholder="Message"></textarea>
<input class='c-btn c-btn--small c-btn--active' type="submit" value="Send">
</form>
For more information, check the How to Add a Contact Form to Your Ghost Blog blog post.
Nubia Theme comes with Disqus comments enabled.
Open partials/disqus.hbs
file. Change the aspirethemes-demos
value for the disqus_shortname
variable to match your Disqus account shortname.
var disqus_shortname = 'aspirethemes-demos';
So, if your Disqus shortname is exampleone
, the final code above should be:
var disqus_shortname = 'exampleone';
Thatâs all you need to setup Disqus from the theme side. If you get any issue that comments are unable to load. First, make sure you have registered your website with Disqus (Step 1)
And also check Disqus troubleshooting guide if you still have issues.
If you want to disable Disqus comments. Open the post.hbs
file and comment or delete the line contains the {{> disqus}}
text (line 32
).
If you want to autoload Disqus without clicking the Comments button, open the partials/disqus.hbs
file and replace the file content with the following code.
<div id='disqus_thread'></div>
<script>
var disqus_shortname = 'aspirethemes-demos'; // required: replace `aspirethemes-demos` with your Disqus shortname
// DON'T EDIT BELOW THIS LINE
var disqus_config = function () {
this.page.url ='{{url absolute="true"}}'
this.page.identifier = 'ghost-{{comment_id}}';
};
var d = document, s = d.createElement('script');
s.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
</script>
<noscript>Please enable JavaScript to view the <a href='https://disqus.com/?ref_noscript' rel='nofollow'>comments powered by Disqus.</a></noscript>
The Instagram feed is working using Instafeed.js to show the photos.
First, you will need to get your account userId
and accessToken
from the following URLs:
Second, open the assets/js/instagram.js
file and replace the userId
and accessToken
values.
var instagramFeed = new Instafeed({
get: 'user',
limit: 6,
resolution: 'thumbnail',
userId: '',
accessToken: ''
});
You can control how much images to show by changing the limit
number. Theme default is set to 6
images.
If you want to remove the Instagram Widget, you can remove or coment the {{> sidebar/widget-instagram}}
line inside the partials/sidebar.hbs
file.
If you want to add an advertisement widget to your sidebar, this widget is the way to go. This will enable you to add an image and a URL associated with it, all you need to do is:
assets/images/advertise-image.jpg
).partials/sidebar/widget-advertise.hbs
file with the URL (href
) value.alt
value) like the following image.If you want to remove the Advertise Widget, you can remove or coment the {{> sidebar/widget-advertise}}
line inside the partials/sidebar.hbs
file.
With Ghost 1.0, the Posts per page setting is now part of the theme. The config purpose is to control how many posts to show per page from the package.json
file like this:
"config": {
"posts_per_page": 11
}
Nubia theme default value is set to 11
posts per page.
You can add a fenced code block by placing triple backticks ```
before and after the code block. For example:
``` pre { background-color: #f4f4f4; max-width: 100%; overflow: auto; } ```
Will produce the following gray look:
To highlight a code block. Add the language alias like css
or js
to the code block. For example, the CSS code in the previous example will wrapp between ```css
and ```
as following:
```css pre { background-color: #f4f4f4; max-width: 100%; overflow: auto; } ```
Will produce the following colored look:
To add an inline code, you can wrap the text between two backticks ` `
, for example:
This inline code example `absolute="true"`
Will produce the following look:
Nubia shipped with Prism.js, a lightweight, robust, and elegant syntax highlighter.
The initial Prism package include some languages like Markup, CSS, C-like, and JavaScript.
You can add and support more languages. For example, to add support for PHP:
Get the PHP component script from Prism CDN.
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.13.0/components/prism-php.js"></script>
Add the script to Ghost Code Injection Site Footer section. Click Save button.
Related posts will be visible on the single post in case there are similar posts sharing the same tags.
Enabling the Public API required.
To integrate Google Analytics. I would recommend reading Google Analytics integration steps by Ghost.
Responsive tables required and essential for adding tabular content and allows tables to be scrolled horizontally. You can make any table responsive across all viewports by wrapping a table
with .responsive-table
, for example:
<div class='responsive-table'>
<table>
...
</table>
</div>
Social media links placed in the partials/social-icons.hbs
file.
Ghost supports adding Facebook and Twitter profile URLs from the admin panel. Go to General > Social accounts and add your URLs. This will update Facebook and Twitter URLs within the footer social media section.
For using other social accounts, the theme is using Evil Icons to provide a very simple and clean icons. Here you can find a list of the social media icons to use:
<span data-icon='ei-sc-facebook' data-size='s'></span>
GitHub
<span data-icon='ei-sc-github' data-size='s'></span>
Google Plus
<span data-icon='ei-sc-google-plus' data-size='s'></span>
<span data-icon='ei-sc-instagram' data-size='s'></span>
<span data-icon='ei-sc-linkedin' data-size='s'></span>
Odnoklassniki
<span data-icon='ei-sc-odnoklassniki' data-size='s'></span>
<span data-icon='ei-sc-pinterest' data-size='s'></span>
Skype
<span data-icon='ei-sc-skype' data-size='s'></span>
SoundCloud
<span data-icon='ei-sc-soundcloud' data-size='s'></span>
Telegram
<span data-icon='ei-sc-telegram' data-size='s'></span>
Tumblr
<span data-icon='ei-sc-tumblr' data-size='s'></span>
<span data-icon='ei-sc-twitter' data-size='s'></span>
Vimeo
<span data-icon='ei-sc-vimeo' data-size='s'></span>
VK
<span data-icon='ei-sc-vk' data-size='s'></span>
Youtube
<span data-icon='ei-sc-youtube' data-size='s'></span>
To edit or update other existed and static social links, for example, the Instagram code block:
<li class='c-social-icons__item'>
<a href='#' aria-label='Instagram' target='_blank' rel='noopener'>
<span class='c-social-icons__icon' data-icon='ei-sc-instagram' data-size='s'></span>
</a>
</li>
The code above contains the ICON code from the above list, the social media link (a
) within a list element (li
).
Next, replace your Instagram full URL with the link href
value so if your Instagram URL is:
https://www.instagram.com/ghost/
the new code will be:
<li class='c-social-icons__item'>
<a href='https://www.instagram.com/ghost/' aria-label='Instagram' target='_blank' rel='noopener'>
<span class='c-social-icons__icon' data-icon='ei-sc-instagram' data-size='s'></span>
</a>
</li>
If you want to completely remove Instagram, you can delete all the code block, the li
, a
, and the icon.
You can change the favicon in Ghost from the Admin > General > PUBLICATION IDENTITY > Publication icon from the Publication icon section.
Nubia supports Ghost i18n and comes with German, Italian, Spanish, French Finnish, Portuguese Dutch and Danish translation.
To use another available language than English, go to Admin > General > PUBLICATION INFO> Publication Language and enter the Language Code Reference.
de
for Germanyit
for Italianes
for Spanishfr
for Frenchfi
for Finnishpt
for Portuguesedu
for Dutchda
for DanishTo add a new language, you can follow the steps in the Official Ghost Documentation.
To improve or edit a translation in a specific available language. You can open the language file under locales
folder:
|____locales
| |____da.json
| |____de.json
| |____du.json
| |____en.json
| |____es.json
| |____fi.json
| |____fr.json
| |____it.json
| |____pt.json
For example the Germany translation file will look like:
{
"Loading": "Beladung",
"More Posts": "Mehr Artikel",
"Recent Posts": "kĂŒrzliche Artikel",
"Featured Post": "Featured Artikel",
"Page Not Found": "Seite nicht gefunden",
"Load Comments": "Bemerkungen",
"You might also like": "Sie könnten daran interessiert sein",
"Authors": "Autoren",
"Navigation": "Navigation",
"Newsletter": "Newsletter",
"Advertise": "Werben",
"Tags": "Stichworte",
"1 min read": "1 minuten gelesen",
"% min read": "% minuten gelesen",
"Published with {ghostLink}": "Veröffentlicht mit {ghostLink}",
"Share on Twitter": "Auf Twitter teilen",
"Share on Facebook": "Auf Facebook teilen",
"Share on LinkedIn": "Auf LinkedIn teilen",
"Share on Pinterest": "Auf Pinterest teilen",
"Share via Email": "Teilen Sie per E-Mail",
"Copy link": "Link kopieren",
"Link copied to clipboard": "Link in die Zwischenablage kopiert",
"Search": "Suche",
"Search {siteTitle}": "Suche {siteTitle}",
"Type to Search": "Tippe um zu suchen",
"Log In": "Einloggen",
"Sign Up": "Anmelden",
"Continue": "Fortsetzen",
"Subscribe": "Abonnieren",
"Subscribe Now": "Abonniere jetzt",
"Your email ": "Deine E-Mail-Adresse",
"Please check your inbox and click the link to confirm your subscription.": "Bitte ĂŒberprĂŒfen Sie Ihren Posteingang und klicken Sie auf den Link, um Ihr Abonnement zu bestĂ€tigen.",
"Please enter a valid email address!": "Bitte geben Sie eine gĂŒltige E-Mail-Adresse ein!",
"An error occurred, please try again later.": "Ein Fehler ist aufgetreten. Bitte versuchen Sie es spÀter erneut.",
"You've successfully subscribed to {siteTitle}": "Sie haben {siteTitle} erfolgreich abonniert.",
"Great! Next, complete checkout for full access to {siteTitle}": "Toll! SchlieĂen Sie als NĂ€chstes die PrĂŒfung ab, um vollen Zugriff auf {siteTitle} zu erhalten.",
"Welcome back! You've successfully signed in.": "Willkommen zurĂŒck! Sie haben sich erfolgreich angemeldet.",
"Success! Your account is fully activated, you now have access to all content.": "Erfolg! Ihr Konto ist vollstÀndig aktiviert, Sie haben nun Zugriff auf alle Inhalte.",
"Already have an account?": "Hast du schon ein Konto?",
"Don't have an account yet?": "Sie haben noch keinen Account?",
"This post is for paying subscribers only": "Dieser Beitrag ist nur fĂŒr zahlende Abonnenten",
"This post is for subscribers only": "Dieser Beitrag ist nur fĂŒr Abonnenten",
"Join the newsletter to receive the latest updates in your inbox.": "Treten Sie dem Newsletter bei, um die neuesten Updates in Ihrem Posteingang zu erhalten",
"Choose your subscription": "WĂ€hlen Sie Ihr Abonnement",
"Unlock full access to {siteTitle} and see the entire library of members-only content & updates.": "Schalte den vollen Zugriff auf {siteTitle} frei und sieh dir die gesamte Bibliothek mit Inhalten und Updates nur fĂŒr Mitglieder an.",
"Sign Up to {siteTitle}": "Anmelden bei {siteTitle}",
"Welcome back!": "Willkommen zurĂŒck!",
"Log Into your account again.": "Melden Sie sich erneut in Ihrem Konto an.",
"Send login link": "Anmeldelink senden",
"Nice, you're a subscriber!": "Schön, dass Sie Abonnent sind!",
"You have an active {siteTitle} account with access to all posts.": "Sie haben ein aktives {siteTitle} Konto mit Zugriff auf alle Posts.",
"You're a subscriber to free members updates": "Sie sind Abonnent der kostenlosen Mitgliederaktualisierungen",
"You are subscribed to free updates from {siteTitle}, but don't have a paid subscription to read all the posts.": "Sie haben kostenlose Updates von {siteTitle} abonniert, haben jedoch kein kostenpflichtiges Abonnement, um alle BeitrÀge zu lesen."
}
Each line consist of a left key ("More Posts"
) and right value ("Mehr Artikel"
). The key is a plain Englich which exist in all translation files and should not be changed. You can only change the value.
If you have suggestions to improve the current translations or added a new language. Please let me know. Instead, you can contribute to the online translations.
If you are a developer and need to do heavy customization work. The theme is using Gulp to compile Sass and JavaScript. This improves the development flow and making it much faster.
First, make sure you have Node.js, npm, Gulp CLI, and Bower installed. Run the following command in the theme root directory to install npm and bower dependencies.
npm install
To start Gulp, run:
gulp
This will compile Sass and JavaScript files, and start watching changes as you edit files.
You can also watch the following screencast. I setup the theme to installing the packages and run an experiment with Sass to change the brand color.
Gulp will generate two files:
assets/js/app.min.js
: The final main JavaScript file.partials/compiled/inline-css.hbs
: The final CSS file.Itâs recommended to avoid editing these files if you are working with Gulp. Instead, do customizations in assets/sass
files for CSS or in assets/js/app.js
for JavaScript. So, we can make sure the flow is going in the right direction and we never lost any changes.
Another option for customization, is to use the Ghost Code Injection settings in Ghost Admin. For a CSS example, you can use the following code to change the logo color as:
<style>
.c-logo__link { color: #4550e5; }
</style>
To create a clean and small theme package. You can exclude different directories using the following command line:
zip -r nubia.zip nubia -x *node_modules* *bower_components* *git*
This will exclude node_modules, bower_components, and git directories from the final zip file.
You can use custom CSS code to change the font of any element. The following is an example of how to use the Encode Sans font from Google Fonts to change the body and the logo font.
Using Code Injection Site Header section, embed the font code from Google Fonts and then assign the font to the body and the logo.
<link href="https://fonts.googleapis.com/css?family=Encode+Sans:300&display=swap" rel="stylesheet">
<style>
body { font-family: 'Encode Sans', sans-serif; }
.c-logo__link { font-family: 'Encode Sans', sans-serif; }
</style>
If you are using a font from another service, you can embed it as shown in the font documentation.
You may be asking: How can I update my theme to the latest theme version from ThemeForest?
There are two options to update your theme:
Keep your current theme and only replace the changed files from the new version. You can find the changed files on the theme page Changelog.
Or, use the new version as a starting point and redo your theme changes and customizations.
One thing to reduce the need for redoing customization is to use the Code Injection tool. This is very helpful for adding custom CSS and tracking code for example. So, itâs always recommended to keep your custom CSS code with Code Injection.
I know that this might not be so practical and I feel you. There should be a better solution. I hope Ghost design a better workflow, something like child themes found in WordPress. You may reach the Ghost team and get their attention about this.
You are using a Ghost version that is less than 1.20
which is not compatible with the Ghost translation helpers introduced in Ghost 1.20
and supported by the theme. Ghost should support backward compatibility with this but looks like it didnât.
Updating Ghost will fix this issue. The following resource will be helpful:
If you are using Ghost Pro, you can update from the admin.