Coder Social home page Coder Social logo

rohanchandra / type-theme Goto Github PK

View Code? Open in Web Editor NEW
703.0 9.0 557.0 342 KB

A free and open-source Jekyll theme with responsive design. Great for blogs and easy to customize.

Home Page: https://rohanchandra.github.io/type-theme/

License: MIT License

HTML 56.81% CSS 32.20% JavaScript 10.72% Ruby 0.26%
jekyll jekyll-theme jekyll-themes github-pages

type-theme's Issues

Tag support

It would be great to have tags to post, and have them organized in another page.

Type theme (without Github) not working properly (on Jekyll 3.1.1)

I have Jekyll 3.1.1 running and would like to use the Type theme standalone / without Github by copying the content of the _site directory to my web server).

Running jekyll -serve with Type theme is working properly / producing the desired output / design:

bildschirmfoto 2016-02-14 um 12 24 40

But the content in the _site directory is missing any of the Type theme's design:
bildschirmfoto 2016-02-14 um 12 24 53

What am I missing / doing wrong here?

Many thanks for your support!

Search is not working other than English

Current lunr.js/0.7.1/lunr.min.js is only working in English Search. I tried to use 2.3.6 version instead cos lots of languages are supported but the whole search started not working.

search.html

<script src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/0.7.1/lunr.min.js" charset="utf-8"></script>

gh-pages is out of sync with master

Allo,

It seems like gh-pages is out of sync with master, it might be a good idea to update it (+ we would see the new features online \o/).
That would maybe help clarify #71 to see if there really is a problem with the github hosting of the new version of the theme.

Disabling katex results in a JavaScript error

If you set katex: false in the _config.yml you'll get a JavaScript error with main.js. I added the following to footer.html to just not include main.js, but wasn't sure if people were extending it as well or only using it to enable katex.

{% if site.theme.katex %}
<script src="{{ "/js/main.js" | prepend: site.baseurl }}"></script>
{% endif %}

If this is an acceptable solution you'd like to merge in, let me know and I can send a PR.

Double bottom rule when using comments

Hi Rohan,

again thanks for creating this wonderful theme. Just a small thing that I noticed: When using some comment plugin there will be two horizontal rules (small one and a big one) at the bottom which doesn't look too pretty IMO:

selection_002

I fixed that as follows:

diff --git a/_sass/layouts/_posts.scss b/_sass/layouts/_posts.scss
index c332118..2942f99 100644
--- a/_sass/layouts/_posts.scss
+++ b/_sass/layouts/_posts.scss
@@ -4,10 +4,14 @@
 article,
 .comments {
   @extend %padding-regular;
-  border-bottom: 1px solid $border-color;
   float: left;
   width: 100%;
 }
+
+article {
+  border-bottom: 1px solid $border-color;
+}
+
 article {
   .subtitle {
     font-size: 1.45em;
(END)

Cheers,
Kilian

Ship theme as a gem

This is a nice theme!

Do you plan to provide ability for Jekyll's users to simply add theme: jekyll-type-theme and bundle install to use your theme?

DEPRECATION WARNING for a.button:hover

I only started seeing this once I updated jekyll from 3.4.3 to 3.4.5, but when I run

bundle exec jekyll serve

on this repo I get the following warning:

DEPRECATION WARNING on line 89 of /Users/abisee/type-theme/_sass/layouts/_posts.scss:
Extending a compound selector, a.button:hover, is deprecated and will not be supported in a future release.
See https://github.com/sass/sass/issues/1599 for details.

Unable to contribute?

I tried pushing my commits but git wouldn't allow me. Can you please add me as a contributor.

Issue with nested bullet lists

Using this theme, the following markdown is not rendered correctly:

## Contents
* [Card Matching](#card-matching)
* [Game Play](#game-play)
    * [A Hint](#a-useful-hint)
* [Support](#support)

Result:

screen shot 2016-05-14 at 6 21 29 am

Responsiveness

First of all, thanks for this great theme, I love it! Given that this theme is quite popular I found strange that it does not look good on smaller devices. Has anyone implemented some changes to improve it? If that's not the case I am willing to contribute.

Switching Google Fonts to the Mozilla Fira font

Hi,

I'm unclear on how to remove Google fonts in favor of using an open source font. For example, if I wanted to move to Firefox's Fira font without going through Google, how would I do that? I'm in China and the connection to Google is often blocked/extremely slow.

Thanks a lot!

Fresh fork does not work

I really like this theme and forked it with the goal to use it for my github page.

Right now it unfortunately seems that, out of the gate, it does render as intended.
I have little to no experience with html or CSS as of yet, so I am not sure if this is only due to a minor problem that can be fixed easily or whether this would require more work (Which yould probably mean that I will keep looking for another template to use).

Any comments or help are very welcome!

kramdown and KaTeX conflict

The current implementation of KaTeX in the theme via /js/katex_init.js leaves a known conflict between kramdown and KaTeX unaddressed. Kramdown outputs a %CDATA markup for some math formulae in its conversion to html. The % there chokes KaTeX and all the math thereafter will not be rendered.

I didn't touch katex_init.js but found a rather easy workaround. Instead of using katex_init.js, a few lines in /_includes/footer.html found in this kramdown issue will do (this is also the method suggested on the official kramdown page for working with KaTeX):

{% if site.theme_settings.katex %}
<script src="{{ "/js/jquery-3.2.1.min.js" | prepend: site.baseurl }}"></script>
<script>
   $("script[type='math/tex']").replaceWith(function() {
       var tex = $(this).text();
       // replace() here is due to CDATA wrapper (#224). KaTeX chokes on the % character,
       // which is unfortunate (and should probably be reported).
       return katex.renderToString(tex.replace(/%.*/g, ''), {displayMode: false});
   });

   $("script[type='math/tex; mode=display']").replaceWith(function() {
       var tex = $(this).html();
       // replace() here is due to CDATA wrapper (#224). KaTeX chokes on the % character,
       // which is unfortunate (and should probably be reported).
       return katex.renderToString(tex.replace(/%.*/g, ''), {displayMode: true});
   });
</script>
{% endif %}

Two notes:

  • The original author assumed that the %CDATA markup only appears in math blocks and not inline math. This is not true. Both inline and block math codes needs stripping away the %CDATA, as I've slightly changed here.
  • The script requires jQuery. I've put a copy of jQuery in the /js folder.

I'm no web developer but if this makes sense I can make a pull request.

Subtitles

I think it would be useful to have optional subtitles for blog posts in type-theme. I'm not an experienced Ruby developer, so it may take me some time to get this working. Eventually I'll submit my implementation as a pull request. Comments and suggestions welcome.

A question about _config.yml site.url

Hi.

While I make sitemap.xml file to submit to a search console,
I wonder that why _config.yml site.url should have / at last.

Similar to the PR #99,
because site.url has / in last, there is two slashes // in sitemap.xml.

For instance, in the case of the last version of _config.yml 4380fa6,
my sitemap.xml generates a url like https://rohanchandra.github.io///2014/11/30/sample-post.html.

I changed the code like b89c2fa or

url: “https://rohanchandra.github.io”

I don’t open PR yet, because I don’t know whether this issue is intended or not, more even related or not.
Please let me know it is okay to change.

Gem version / GitHub Pages remote_theme support

The Type Theme gem and GitHub Pages remote_theme support is in development.

To use the remote theme:

  1. Create a new Jekyll site
  2. Add a key-value pair of remote_theme: rohanchandra/type-theme to _config.yml
  3. Switch from index.md to index.html to enable pagination

Known issues with this development gem are:

  • SCSS variables are not editable (fixed by @iMacTia)
  • Tags listing (tags.html) not available (fixed by @sylhare)

Extending a compound selector is deprecated

FYI, I recently noticed this ominous warning:

DEPRECATION WARNING on line 74 of /srv/jekyll/_sass/layouts/_posts.scss:
Extending a compound selector, a.button:hover, is deprecated and will not 
be supported in a future release. 
See https://github.com/sass/sass/issues/1599 for details.

Jekyll 3.x support

  • Switch to Rouge as highlighter
  • Add jekyll-paginate as dependency
  • Check relative permalinks have 3.x support
  • Test on Github Pages
  • Write new documentation for installing dependencies

Uncaught SyntaxError: Invalid shorthand property initializer

When I run

bundle exec jekyll serve

on this repo, I get a number of errors:

screenshot 2017-08-30 11 10 51

What's causing these errors and could they be causing other problems? I'm using the Type theme for my website and I'm having a number of problems that are hard to diagnose, and I'm not sure if this error is part of it.

Type theme is not working

Type theme is working in jekyll serve, but not in blog url.
I also checked the url code in _config.yml , but there is nothing wrong

image

Do you know the solution?

A page should only contain one h1

Thank you for the theme!

I noticed that the site name and blog post titles oth use <h1> tags. For SEO reasons, a page should only ever contain one <h1>. There can be multiple <h2> tags present on a page, however, with no negative SEO implications.

Install on Windows

I'm running Jekyll on windows with Ruby and getting the following error:

[!] There was an error parsing Gemfile:
[!] There was an error while loading jekyll-theme-type.gemspec: No such file or directory - git ls-files -z. Bundler cannot continue.

from C:/Users/zheng/Documents/type-theme/jekyll-theme-type.gemspec:13

-------------------------------------------

spec.add_development_dependency "rake", "~> 10.0"

end

# coding: utf-8

-------------------------------------------

. Bundler cannot continue.

from C:/Users/zheng/Documents/type-theme/Gemfile:2

-------------------------------------------

source "https://rubygems.org"

gemspec

source "https://rubygems.org"

-------------------------------------------

Reduce the dependencies to only use actual dependencies

Context: I started looking into reducing the dependencies that are installed because I was tired of waiting for lengthy builds to complete.

Currently, the Gemfile contains the following which will install ~85 gems which takes several seconds.

# Gemfile - as of 9/14/2019
source "https://rubygems.org"
gem 'github-pages', group: :jekyll_plugins

If instead, you specify the actually required gems, you can install ~5 gems which is tremendously faster and should provide the same results.

# Gemfile - a much more efficient method
source "https://rubygems.org"
group :jekyll_plugins do
  gem "jekyll-paginate"
  gem "rouge"
  gem "kramdown-parser-gfm"
end

This is what I am doing and it is working great. If you were to run into any dependency issues, you could simply add --trace to the build command and then add whatever was being complained about (assuming it is a gem) to the Gemfile.

For example, if the error was,

/usr/gem/gems/jekyll-4.0.0/lib/jekyll/converters/markdown/kramdown_parser.rb:53:in `require': cannot load such file -- kramdown-parser-gfm (LoadError)

Then you would simply add gem "kramdown-parser-gfm" to the Gemfile, as I have done.

By the way, I really like what you have done here.

GitHub Pages: The page build completed successfully, but returns error

I used your theme on github, but github has been sending emails to me

"The page build completed successfully, but return The following warning for master branch: You are attempting to use a 'Jekyll - theme - type' Jekyll theme, which is not supported by making Pages."

But I saw your demo was hosted on github. Have you received any email like that?

Can you help me solve this problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.