Code Monkey home page Code Monkey logo

mintlook-couscous's Introduction

Couscous Mintlook

Live Example

Features

  • Search function
  • Language selection
  • Pagination (previous/next)
  • Syntax highlighting
  • Customizable sidebar and footer
  • Configurable accent color

Usage

To use the template, set it up in your couscous.yml configuration file:

template:
    url: https://github.com/moqmar/mintlook-couscous

You should also add the file 404.md to your documentation and configure your webserver to point to /404.html on missing pages.

A file icon.png in the project root (baseUrl) will be used as a favicon.

Configuration

title: Couscous # Page Title
logo: https://cdn0.iconfinder.com/data/icons/ie_Shine/128/shine_19.png # Icon URL
color: "#d21"   # Accent color

languages: ["en", "de"] # List of supported languages. Comment out to disable language selection.
defaultLanguage: world  # Default language icon, and the value of the html lang attribute. It is recommended to set this even (especially) if you're not using language selection.

search: true # Enable search
scripts:
    after:
        - php .couscous/generated/.scripts/generate-search-index.php # Required for search
        - rm -rf .couscous/generated/.scripts # Clean up unneccessary files

sidebar:
    - title: About mintlook
    - subtitle: Links
    - text: Homepage
      link: https://moqmar.github.io/mintlook # absolute link
    - text: Mintlook and Couscous
      page: / # relative link
    - line: true
    - html: |
            <p>Follow us on <a href="">Facebook</a>, <a href="">Twitter</a>, and other <a href="">social networks</a>.</p>
# you can also define the sidebar per language
sidebar:
  de:
    - title: Über mintlook
  default: # fallback for all other languages
    - title: About mintlook

footer: |
    Hello <strong>World</strong>
# you can also define the footer per language
footer: # fallback for all other languages
  de: Hallo <strong>Welt</strong>
  default: Hello <strong>World</strong>

Language selection

If the languages configuration option is set, you should have a directory structure in the form of /<language>/<...>, with the pages in the defaultLanguage located at just /<...> - e.g. /de/something.html for the german version and /something.html for the english version.

Setting the defaultLanguage to world, enforces the /<language>/<...> structure for all sites, and shows a world map instead of a flag for the language selection on pages not adhering to that structure.

You can also override the displayed language for a single file using the pageLanguage metadata field.

If you want to automatically go to the user's browser language, you can use the following index.html file in your repository:

<!doctype html>
<!-- default language -->
<meta http-equiv="refresh" content="1; URL=en/">
<!-- browser language -->
<script>
var supportedLanguages = ["en", "de"]; // Should be the same as in couscous.yml
for (var i in navigator.languages) if (supportedLanguages.indexOf(navigator.languages[i]) > -1) {
    location.replace(navigator.languages[i] + "/"); break;
}
</script>

Document metadata

noIndex: false              # if true, the document will be excluded from search index

description: A page.        # description as shown in search, also used for metaDescription if not explicitly set
metaDescription: A page.    # description as used for the <meta name="description"> content

pageLanguage: en            # language of the page

prev: /page-before.md       # previous page if pagination is used
prevTitle: The Page Before  # title of previous page (default would be "page-before" here)

next: /test/example.md      # next page if pagination is used
nextTitle: An example page  # title of next page (default would be "example" here)

License

MIT License

Copyright (c) 2018 Moritz Marquardt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

mintlook-couscous's People

Contributors

moqmar avatar

Stargazers

 avatar Carson Harder-Hyde avatar Ariama Victor (A.K.A. OVAC4U) avatar  avatar Zaher Ghaibeh avatar Julien BIANCHI avatar Matthieu Napoli avatar

Watchers

James Cloos avatar  avatar

mintlook-couscous's Issues

Suggestion

I think you guys should set the minimum width to 1200px for letting the toc and the sidebar move get into the booth side right and left.
I'm using 1200px monitor and I think it's not convinient.

Search in current language only

The search currently doesn't respect different languages at all. If I'm on a German page, it should only find German results. Maybe make content an object with the language as the key and the actual content as the value would be a good start?

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.