Git Product home page Git Product logo

singlepaged's Introduction

Fancy jekyll powered single page site

Here're some examples:

Why?

Got some killer app, some neat project, a cool portfolio? Make an easy single-page site to show it all off. SinglePaged uses jekyll niceties to make a polished, modular, and beautiful single page site.

  • Each vertical section is a markdown file in _posts/ directory.
    • They're sorted by 'date'. (we don't use date anywhere, it only sorts)
  • Each vertical section sets it's own color, header icon (or image), title, and easy-to-write markdown body.
  • Only two things to edit:
    1. Edit _config.yml to set the site title, description, etc
    2. Add _posts/*.md to make each vertical section. Copy some examples and add the sections from your README.md for a fast start!
  • Easy adding of SEO terms, favicon & such, and google analytics token.

Sound good? Let's go!

There are three way to get started: (links jump to that section)

  1. Make a user homepage (or organization)
  2. Make a standalone project page
  3. Make a site under an existing project

Setup as user homepage

  • Go click fork on the github project page
  • Rename your new repository to **username**.github.io. (click settings in the right column)
  • Clone your repository, cd into the project
  • Run git checkout publish && git branch -m master && git push -u origin master && git branch -D gh-pages to get the publish branch as master for a clean, empty starting point.
  • On your github project page go to settings again and change your default branch to master
  • Run git push origin --delete gh-pages to delete your remote's development branch

Now hop over to Usage to get it running with your own stuff!

When you publish changes use git push -u origin master


Setup as standalone project page

  • Go click fork on the github project page
  • Rename your new repository to whatever you want. (click settings in the right column)
    • It will go live at yourusername.github.io/WhateverYouWant
  • Clone your repository, cd into the project
  • Run git checkout publish && git branch -D gh-pages && git branch -m gh-pages && git push -uf origin gh-pages to swap the publish and gh-pages branch.

Now hop over to Usage to get it running with your own stuff!

When you publish changes use git push -u origin gh-pages


Setup inside existing project

This is the most complicated use-case .. but it's the coolest. Say you've got your kickass project github.com/t413/kicker and want to have some web presence to post about on hacker news. This will create an orphan branch called gh-pages in your repository where you can publish changes, posts, images, and such. It won't alter your code at all.

  • cd into your project on the command line
  • use git remote add -t publish singlepage [email protected]:t413/SinglePaged.git to get access to this repository.
  • use git fetch singlepage publish:gh-pages to fetch the remote branch
  • use git branch --set-upstream-to gh-pages singlepage/publish && git checkout gh-pages; This creates and checks out an orphan branch called gh-pages that tracks the original and lets you make changes.
  • When you run git push origin gh-pages it'll be live at yourusername.github.io/repositoryName

Now hop over to Usage to get it running with your own stuff!

When you publish changes use git push -u origin gh-pages

Usage

Alright, you've got a clean copy and are ready to push some schmancy pages for the world to ogle at.

  • Edit _config.yml to change your title, keywords, and description.
  • Create a new file in _posts/ called 2014-01-01-intro.md Edit it, and add:
  ---
  title: "home"
  bg: white     #defined in _config.yml, can use html color like '#010101'
  color: black  #text color
  style: center
  ---

  # Example headline!
  and so on..
  • Create a second post called 2014-01-02-art.md with an divider image this time:
  ---
  title: "Art"
  bg: turquoise  #defined in _config.yml, can use html color like '#0fbfcf'
  color: white   #text color
  fa-icon: paint-brush
  ---

  #### A new section- oh the humanity!

Note: That part fa-icon: paint-brush will use a font-awesome icon of paint-brush. You can use any icon from this font-awesome icon directory.

  • install Jekyll with sudo gem install github-pages
  • run jekyll serve -w
  • Push changes and see them live!

Changing your colors

  • In each post file you can define bg: mycolor and color: myothercolor to change the background and text colors for that section.
  • mycolor can be a quoted html color like '#0fbfcf' or a key to a special color defined in _config.yml under 'colors'.
    • Note: Changes to _config.yml require a manual restart to your local server with ^C and jekyll serve -w.

Nifty, right!

Updating

So you've got a copy running and there's some new update? Let's update!

  1. Checkout your github-pages branch
  • git checkout gh-pages for a standalone or existing page
  • git checkout master for a username.github.io page
  1. run git remote | grep -q "singlepage" || git remote add -t publish singlepage https://github.com/t413/SinglePaged.git to be sure you have access to this repository (you can run this command at any time).
  2. git fetch singlepage to fetch-in-place new changes.
  3. Update to the new base (using merge)
    1. git merge singlepage/publish
  4. You can alternatively update using rebase. This rewrites history (bad), but it is cleaner.
    1. git rebase singlepage/publish

singlepaged's People

Contributors

chrissphinx avatar jairideout avatar keheliya avatar lucasviola avatar soops avatar t413 avatar tfoote avatar timodwhit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

singlepaged's Issues

Output broken wit Jekyll 3.0.0 and 3.0.1

With Jekyll 3.0.0 and 3.0.1 only the post with the highest date is rendered into index.html. Moreover the content of index.html is a simple Markdown translation of the post, the template is not considered apparently. I can confirm that it works properly with Jekyll 2.5.3. I'm quite confident that it works with Jekyll 2.4.0, because that is the version I think I had before the upgrade to 3.0.0.

Reproduce:

$ jekyll --version
jekyll 3.0.0
jekyll serve -w

Visit http://localhost:4000/, only last post is shown, plain and ugly, with no CSS.

$ gem install jekyll -v '2.5.3'
$ gem uninstall jekyll 

Select version 3.0.0.

$ jekyll --version
jekyll 2.5.3
jekyll serve -w

Visit http://localhost:4000/, all's right with the world.


I suspect the reason could be a change in the behavior of Permalinks introduced in Jekyll 2, which became effective only in version 3, see Upgrading from 0.x to 2.x - Absolute PermalinksPermalink.

Theme does not apply

Sorry for being stupid, but after I created the _posts folder, I lost all the themes, while doing the tutorial. The only different thing I do from the tutorial is that I create the folder along the files online directly. If this is the problem, why?

External links in navigation?

This is perhaps a stupid question, but as a web newbie I am having trouble adding an external link in the navigation. For example, I would like to link to my external blog doing the following (in index.html line 18):

  <div id="main">

    <nav><ul>
      {% for node in site.posts reversed %}
        {% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
        <li class="p-{{id}}"><a href="#{{id}}">{{node.title}}</a></li>
      {% endfor %}
        <li><a href="https://haroldpimentel.wordpress.com/" target="_blank">blog</a></li>
    </ul></nav>

The link does not work (and in fact breaks all of the other links in the navigation) and gives the following error in the developer console:

Uncaught TypeError: Cannot read property 'top' of undefined
(anonymous function) @ site.js:62
n.extend.each @ jquery.min.js:2
n.fn.n.each @ jquery.min.js:2
populateDestinations @ site.js:59
(anonymous function) @ site.js:34
n.event.dispatch @ jquery.min.js:3
r.handle @ jquery.min.js:3

Does anyone have any ideas how to fix this?

Thank you,

Harold

[Question] html files generated in _site folder

Thanks for this great work.

I was wondering if it is normal that all the _post md files turned into html files in _site for example

intro.html
why.html
details.html
usage.html
updating.html
video.html

because these files are not used since they are already being combined into index.html

Cheers
JP

Faster Google AMP links

A recent innovation (from the geniuses at Google) enables websites to load nearly instantly even on mobile devices with slow connections. See https://wilsonmar.github.io/accelerated-mobile-pages/ It's a sample Jekyll that uses it.

I'd like to use this template with AMP. So I would be happy to submit a PR to add the JavaScript library and other aspects needed to use the different HTML tags.

Let me know if that's what you want so I don't waste my time.

Theme does not work online as a project site while renders correctly locally

I'm trying to set up SinglePaged theme for one of my github projects. I already have my personal site set up using another Jekyll theme (So-Simple). So, lets assume my personal site runs on UserName.github.io.

For a project site, I created gh-pages branch for my github project repository and used SinglePaged files to set up the content of my page. The address of the site would be something like UserName.github.io/ProjectName.

When I run bundle exec jekyll serve on my machine, the site is built correctly locally. However, when I check how it looks online, all I see is a plain content of the last "post" without any text formatting.

I'm new in Jekyll and web development, but I did little bit of research and found this situation can happen when a certain variable baseurl is not set (correctly) for a project site. I do not see baseurl variable at the _config.yml of SinglePaged.

So my question is: how do I fix this situation? Assuming I add the baseurl variable, what files and how do I need to edit them so that they take the baseurl into account? Or do I not use SinglePaged theme correctly and it is supposed to work without baseurl? For reference, I tried some other theme where it is possible to specify the baseurl and it rendered correctly online; so from this experience I feel like it is about missing baseurl.

I really would like to use SinglePaged for my project, so would appreciate any hints in what direction to move.

No content of index page.

Hi Tim,

Follow your guide of section Setup as user homepage step by step, and I commit changes to my master branch, but when I load my site, there's no content in homepage, I checked console, also no error.

Do you have any experience on this situation? Please help, thanks!
screen shot 2016-09-20 at 12 47 38 pm

Quotes are ugly

Hello,

First thanks for this theme, it is quite cool :)

I just want to say that if you use a blockquote like this :

This is a quote.

It will be a bit ugly with your theme. Please have a look, I'm sure it's trivial to fix the css for that :)

Regards,
~Nico

License?

First, thanks for building this fabulous theme!

Second, would you mind adding a LICENSE file? Without one it's technically "All Rights Reserved." Check out http://choosealicense.com/ if you need help picking or just want a quick place to copy/paste a license from. 😄

Thanks!

Open Graph Support (http://ogp.me/)

In my site in this commit DesigningOpenDemocracy/DesigningOpenDemocracy.github.io@4b07b74

I added these metadata to my website

  <meta property="og:title" content="{{ site.title }}">
  <meta property="og:type" content="website">
  <meta property="og:url" content="{{ site.url }}">
  <meta property="og:description" content="{{ site.description }}">
  <meta property="og:image" content="{{ site.touch_icon }}">

NOTE: site.touch_icon cannot be relative url

This would allow for link preview in discourse, facebook, twitter and other website to work.

Other authors have more advance support examples in http://davidensinger.com/2013/04/adding-open-graph-tags-to-jekyll/


Standard Website Documentation of OpenGraph in http://ogp.me/

can you add a blog ?

This is an awesome theme! Can you please also add a blog link so that we can publish blog articles for a company ?

Background "post" image instead of color possible?

I have tried to modify my post header to make the background of an image instead of a color but I can't seem to get it to work. I don't see anything that says it should be possible so I'm not expecting to pull a feature out of midair ;) but I do want to ask to make sure I'm not missing something.

I have tried adding the following:

image: img/apple-touch-icon.png

and

image: 
   background: img/apple-touch-icon.png

Admittedly, this idea/setting is borrowed from another Jekyll project (https://github.com/mmistakes/jekyll-theme-hpstr) and I am not going to pretend that I know enough about how these projects are built to assume that every Jekyll theme has the same features. If there is a place I should reference with each theme that spells out what functionality is available (I browsed the source for a couple but nothing jumps out to my untrained eye), I would love to "learn how to fish" on this one as well. Thanks!

Custom font Raleway not used

A small typo in line 55 of the base.css prevents usage of the Raleway font (at least on Firefox) because a comma is missing between "Raleway" and "HelveticaNeue-Light".

Add per-post colors

Allow to use colors per-post instead of vague keywords defined in the yaml file

Kramdown Causing Headings to Inherit Background Color

This is present in the current demo page, under the Updating heading. It's hard to see, but if you look closely the heading tag is inheriting the background color for the post (in this case: purple) and obscuring the faint background pattern. This is due to kramdown auto-generating anchor ids for headings.

To fix this simply add

kramdown:
  auto_ids: false

to the _config.yml file.

Code Blocks Render As Single Line

On vscodium.github.io, there is a code block that looks like this:

```bash
flatpak install flathub com.vscodium.codium

flatpak run com.vscodium.codium
```

And it renders like this:

two bash lines rendering as a single line

I don't know a lot about Jekyll themes, but it seems like maybe the problem is with SinglePaged.

I tried running rougify style github >> combo.css, and it added some bash syntax highlighting but also outputted a bunch of white-on-white text. It did not fix the issue of the code block rendering as a single line, though.

Minor HTML validation issue

Hi there,

I came across SinglePaged today after struggling for a while on how to get my updated resume online. I'm very particular and I was about 30 minutes from breaking down and writing my own mini-CMS to handle it. Before I get into the bug report I just wanted to tell you that this is really fantastic and is almost exactly what I was looking for!

In any case, now that I have the rough skeleton of my site online I noticed there's a validation error in the the HTML on the page when the Google API key is included. The JS at the bottom of the page gets loaded outside the body tag and therefore is invalid. The fix is trivial and I made it already on my copy but I wanted to let you know upstream since it was the only issue I came across.

The last 4 lines of index.html should read:

{% include analytics.html %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="site.js"></script>
</body>
</html>

I'd have created a patch but I figured it was would be more effort for you!

cheers,
Gabriel

Second page

Hi,
how to have 2 or more pages in the same site?

Section icons not aligned properly on Firefox

As you can see on the attached image, the section icons (and possible the text) is not aligned properly, making the theme look awkward and the text hard to read.

A fair number of people still use Firefox and it would be a shame to have a visitor unable to view the site correctly.

capture

Use custom images instead of fa-icon

Is there a recommended way to use a custom image instead of a fa-icon for a given page section? Ideally all the other styling, such as the background circles, would be kept.

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.