Skip to content

Reedyn/Draugur

Repository files navigation

Draugur Project Status

Ghost theme based on the default Casper theme and inspired by GitHub and Medium for a simple design focused on readability. Good for code.

Features

Cover page

The landing page is very similar to the default one of Casper, although without the site logotype.

Built with SASS

If you know HTML and CSS making modifications to the theme should be super simple.

Mobile First - Responsive

Draugur is responsive with a mobile first approach.

Code Syntax Highlighting

Draugur has Syntax highlighting using Highlight.js and GitHub's syntax colors.

Optional Comments

Draugur has comments through Disqus.

Structured data

Draugur has structured data according to schema.org

Development

The following features are currently under development:

  • Featured images
  • Advanced image support (Gallery, different sized such as covering full width, fit width etc)

Ghost is still a work in progress with many features not yet implemented, as Ghost gets updated new features will be added to Draugur.

Installation

  1. Download the theme using the link above.
  2. Extract using your preferred program
  3. Find the file called links.hbs in the folder partials
  4. Change the links to match your own accounts. You can change the icons displayed by changing the class of the i tag. The complete list of icons can be found at Font Awesome.
  5. Find the file called footer.hbs, also in the folder partials
  6. Edit the footer information if you so please.
  7. Follow the installation instructions for a theme in the official Ghost Documentation

Adding comments (Disqus, although any comment-system should work)

  1. Find the file called comments.hbs in the partials-folder and the file called post.hbs in root.
  2. Add the following code to those files:

Customizing SASS/SCSS

SASS can be customized by modifying the file sass/custom.scss.

  1. git update-index --assume-unchanged sass/custom.scss
  2. git update-index --assume-unchanged assets/css/style.css
  3. Edit the custom.scss file
  4. Run grunt to compile changes into assets/css/style.css

comment.hbs

<section class="comments">            
    <div id="disqus_thread"></div>
    <script type="text/javascript">
        var disqus_shortname = 'yourdisqusshortnamehere';
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
</section> 

post.hbs

            ...
            <section class="post-content">
                {{content}}
            </section>
            {{> comments}} <!-- Insert this line here -->
        </article>
        ...

Screenshot

About

Ghost theme based on the default Casper theme and inspired by GitHub and Medium

Resources

Stars

Watchers

Forks

Packages

No packages published