summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorRoman <59285587+codeandmedia@users.noreply.github.com>2020-03-02 20:29:30 +0300
committerGitHub <noreply@github.com>2020-03-02 20:29:30 +0300
commit7c8d3f1566b8bc22b9c788ef9dd4f31b647fcd69 (patch)
tree023b92cd9ffbdb5c57aab7cb44b15686c6fc6c00 /content
parenta92cc979ee3d0699e8b0ebb81c2901d570f91c09 (diff)
Add files via upload
Diffstat (limited to 'content')
-rw-r--r--content/_index.md99
-rw-r--r--content/documentation/_index.md32
-rw-r--r--content/documentation/content/_index.md5
-rw-r--r--content/documentation/content/linking.md49
-rw-r--r--content/documentation/content/multilingual.md38
-rw-r--r--content/documentation/content/overview.md118
-rw-r--r--content/documentation/content/page.md145
-rw-r--r--content/documentation/content/sass.md42
-rw-r--r--content/documentation/content/search.md22
-rw-r--r--content/documentation/content/section.md174
-rw-r--r--content/documentation/content/shortcodes.md204
-rw-r--r--content/documentation/content/syntax-highlighting.md146
-rw-r--r--content/documentation/content/table-of-contents.md36
-rw-r--r--content/documentation/content/taxonomies.md63
-rw-r--r--content/documentation/deployment/_index.md7
-rw-r--r--content/documentation/deployment/github-pages.md81
-rw-r--r--content/documentation/deployment/gitlab-pages.md72
-rw-r--r--content/documentation/deployment/netlify.md70
-rw-r--r--content/documentation/deployment/overview.md9
-rw-r--r--content/documentation/getting-started/_index.md5
-rw-r--r--content/documentation/getting-started/cli-usage.md127
-rw-r--r--content/documentation/getting-started/configuration.md184
-rw-r--r--content/documentation/getting-started/directory-structure.md51
-rw-r--r--content/documentation/getting-started/installation.md93
-rw-r--r--content/documentation/getting-started/overview.md206
-rw-r--r--content/documentation/markdown_overview.md75
-rw-r--r--content/documentation/templates/404.md7
-rw-r--r--content/documentation/templates/_index.md5
-rw-r--r--content/documentation/templates/archive.md23
-rw-r--r--content/documentation/templates/overview.md243
-rw-r--r--content/documentation/templates/pages-sections.md139
-rw-r--r--content/documentation/templates/pagination.md51
-rw-r--r--content/documentation/templates/robots.md14
-rw-r--r--content/documentation/templates/rss.md18
-rw-r--r--content/documentation/templates/sitemap.md34
-rw-r--r--content/documentation/templates/taxonomies.md68
-rw-r--r--content/documentation/themes/_index.md6
-rw-r--r--content/documentation/themes/creating-a-theme.md77
-rw-r--r--content/documentation/themes/installing-and-using-themes.md64
-rw-r--r--content/documentation/themes/overview.md9
-rw-r--r--content/lorem_ipsum/_index.md5
-rw-r--r--content/lorem_ipsum/lorem_ipsum1.md93
-rw-r--r--content/lorem_ipsum/lorem_ipsum2.md93
-rw-r--r--content/lorem_ipsum/lorem_ipsum3.md93
-rw-r--r--content/lorem_ipsum/lorem_ipsum4.md93
-rw-r--r--content/lorem_ipsum/lorem_ipsum5.md93
-rw-r--r--content/lorem_ipsum/lorem_ipsum6.md93
-rw-r--r--content/search.md4
-rw-r--r--content/test_content/_index.md5
-rw-r--r--content/test_content/example.md244
-rw-r--r--content/test_content/markdown_overview.md75
-rw-r--r--content/test_content/tenth_post.md22
-rw-r--r--content/test_content/third_post.md36
53 files changed, 3860 insertions, 0 deletions
diff --git a/content/_index.md b/content/_index.md
new file mode 100644
index 0000000..d0ae666
--- /dev/null
+++ b/content/_index.md
@@ -0,0 +1,99 @@
++++
+title = "Docsascode title"
+sort_by = "date"
+insert_anchor_links = "right"
++++
+
+I was inspired by [Linode's approach](https://www.linode.com/2020/01/17/docs-as-code-at-linode/) to creating and managing docs. They call it _docs as code methodology._ Thereby my aim was making simple and productive way to work with any sort of documents and articles through Markdown, Git and Docker/k8s optionally.
+
+The repo contains a theme for [Zola](https://www.getzola.org/) (the best static site generator I've ever seen) and dockerfile for building Docker images with Nginx-alpine.
+
+## Perks
+
+* light / dark switcher
+* tags and authors taxonomies by default
+* search
+* useful UI both on mobiles and desktops
+
+## 6 steps build your knowledge base/docs repo
+
+1. Fork the repo
+2. delete demo content and add your own (I explain how to structure it below)
+3. change website name and domain in config.toml, also, change the title in _index.md in a root
+4. connect your repo to dockerhub
+5. build your docker image or setup [autobuilds](https://docs.docker.com/docker-hub/builds/)
+6. host a builded docker image on your own way
+
+But, zola is amazing static site generator, so you feel free to
+
+1. download all repo files
+2. again delete demo content and add your own
+3. change name and domain in config.toml/index.md
+4. setup zola (win, linux, mac)
+5. execute zola build
+6. host builded html-output anywhere you want
+
+Zola supports Netlify and other similar services, or you can decide to create your own CI/CD process.
+
+## How to structure your content
+
+All your articles should be inside _content_ folder. Any images, videos, other static files should be inside _static._
+
+### Folders
+
+Every folder should contains _index.md like
+
+```toml
++++
+title = "Docsascode title"
+description = "Description is optional"
+sort_by = "date" # sort by weight or date
+insert_anchor_links = "right" # if you want § next to headers
++++
+```
+Each folder is the section of the website, it means if you create folder foo it will be seen as _yoursitedomain.com/foo_
+
+The theme supports folders in folders and articles + folders in one folder (see an example inside _content_). So you can store inside folder another folders and describe in index some specific details.
+
+### Pages
+
+A page should be started by
+
+```toml
++++
+title = "File and folders in folder"
+date = 2020-01-18 # or weight
+description = "Description"
+insert_anchor_links = "right"
+
+[taxonomies] #all taxonomies is optional
+tags = ["newtag"]
+authors = ["John Doe"]
++++
+```
+
+Zola allows to create drafts:
+
+```toml
+draft = true
+```
+
+Also, by default you have two taxonomies: _tags_ and _authors_. It's optional, not necessary to use it on all pages. And you can add your own taxonomy:
+
+1. Copy tags or authors folder and rename it to your taxonomy
+2. Add your taxonomy to config.toml
+3. Add to page.html template code like
+
+```rust
+ {% if page.taxonomies.yourtaxonomynameplural %}
+ <ul>
+ {% for tag in page.taxonomies.yourtaxonomynameplural %}
+ <li><a href="{{ get_taxonomy_url(kind="yourtaxonomynameplural", name=yourtaxonomyname) | safe }}" >{{ yourtaxonomyname }}</a></li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+```
+
+Done. I told you Zola is amazing :)
+
+Anyway you can rewrite theme for your own wishes with Zola ([link to documentation](https://www.getzola.org/documentation/getting-started/installation/)) \ No newline at end of file
diff --git a/content/documentation/_index.md b/content/documentation/_index.md
new file mode 100644
index 0000000..a49ab8b
--- /dev/null
+++ b/content/documentation/_index.md
@@ -0,0 +1,32 @@
++++
+title = "Docs Zola"
+insert_anchor_links = "right"
++++
+
+## Zola docs index page
+
+Getting started
+ - Installation
+ - CLI usage
+ - Directory structure
+ - config.toml
+
+Content
+ - Organisation
+ - Sections
+ - Pages
+ - Shortcodes
+ - Internal links & deep linking
+ - Table of contents
+ - Syntax highlighting
+ - Sass
+
+Templates
+ - Intro
+ - Each kind of page and the variables available
+ - Built-in global functions
+ - Built-in filters
+
+Theme
+ - Installing & customising a theme
+ - Creating a theme
diff --git a/content/documentation/content/_index.md b/content/documentation/content/_index.md
new file mode 100644
index 0000000..a88b3ab
--- /dev/null
+++ b/content/documentation/content/_index.md
@@ -0,0 +1,5 @@
++++
+title = "Content"
+weight = 2
+sort_by = "weight"
++++
diff --git a/content/documentation/content/linking.md b/content/documentation/content/linking.md
new file mode 100644
index 0000000..20bc065
--- /dev/null
+++ b/content/documentation/content/linking.md
@@ -0,0 +1,49 @@
++++
+title = "Internal links & deep linking"
+weight = 50
++++
+
+## Heading id and anchor insertion
+While rendering the Markdown content, a unique id will automatically be assigned to each heading.
+This id is created by converting the heading text to a [slug](https://en.wikipedia.org/wiki/Semantic_URL#Slug) if `slugify_paths` is enabled.
+if `slugify_paths` is disabled, whitespaces are replaced by `_` and the following characters are stripped: `#`, `%`, `<`, `>`, `[`, `]`, `(`, `)`, \`, `^`, `{`, `|`, `}`.
+A number is appended at the end if the slug already exists for that article
+For example:
+
+```md
+# Something exciting! <- something-exciting
+## Example code <- example-code
+
+# Something else <- something-else
+## Example code <- example-code-1
+```
+
+You can also manually specify an id with a `{#…}` suffix on the heading line:
+
+```md
+# Something manual! {#manual}
+```
+
+This is useful for making deep links robust, either proactively (so that you can later change the text of a heading
+without breaking links to it) or retroactively (keeping the slug of the old header text when changing the text). It
+can also be useful for migration of existing sites with different header id schemes, so that you can keep deep
+links working.
+
+## Anchor insertion
+It is possible to have Zola automatically insert anchor links next to the heading, as you can see on this documentation
+if you hover a title.
+
+This option is set at the section level: the `insert_anchor_links` variable on the
+[section front matter page](@/documentation/content/section.md#front-matter).
+
+The default template is very basic and will need CSS tweaks in your project to look decent.
+If you want to change the anchor template, it can be easily overwritten by
+creating an `anchor-link.html` file in the `templates` directory, which gets an `id` variable.
+
+## Internal links
+Linking to other pages and their headings is so common that Zola adds a
+special syntax to Markdown links to handle them: start the link with `@/` and point to the `.md` file you want
+to link to. The path to the file starts from the `content` directory.
+
+For example, linking to a file located at `content/pages/about.md` would be `[my link](@/pages/about.md)`.
+You can still link to an anchor directly; `[my link](@/pages/about.md#example)` will work as expected.
diff --git a/content/documentation/content/multilingual.md b/content/documentation/content/multilingual.md
new file mode 100644
index 0000000..9f45970
--- /dev/null
+++ b/content/documentation/content/multilingual.md
@@ -0,0 +1,38 @@
++++
+title = "Multilingual sites"
+weight = 130
++++
+
+Zola supports having a site in multiple languages.
+
+## Configuration
+To get started, you will need to add the languages you want to support
+to your `config.toml`. For example:
+
+```toml
+languages = [
+ {code = "fr", rss = true}, # there will be a RSS feed for French content
+ {code = "fr", search = true}, # there will be a Search Index for French content
+ {code = "it"}, # there won't be a RSS feed for Italian content
+]
+```
+
+If you want to use per-language taxonomies, ensure you set the `lang` field in their
+configuration.
+
+## Content
+Once the languages have been added, you can start to translate your content. Zola
+uses the filename to detect the language:
+
+- `content/an-article.md`: this will be the default language
+- `content/an-article.fr.md`: this will be in French
+
+If the language code in the filename does not correspond to one of the languages configured,
+an error will be shown.
+
+If your default language has an `_index.md` in a directory, you will need to add an `_index.{code}.md`
+file with the desired front-matter options as there is no language fallback.
+
+## Output
+Zola outputs the translated content with a base URL of `{base_url}/{code}/`.
+The only exception to this is if you are setting a translated page `path` directly in the front matter.
diff --git a/content/documentation/content/overview.md b/content/documentation/content/overview.md
new file mode 100644
index 0000000..560c8e9
--- /dev/null
+++ b/content/documentation/content/overview.md
@@ -0,0 +1,118 @@
++++
+title = "Overview"
+weight = 10
++++
+
+
+Zola uses the directory structure to determine the site structure.
+Each child directory in the `content` directory represents a [section](@/documentation/content/section.md)
+that contains [pages](@/documentation/content/page.md) (your `.md` files).
+
+```bash
+.
+└── content
+ ├── content
+ │   └── something.md // -> https://mywebsite.com/content/something/
+ ├── blog
+ │   ├── cli-usage.md // -> https://mywebsite.com/blog/cli-usage/
+ │   ├── configuration.md // -> https://mywebsite.com/blog/configuration/
+ │   ├── directory-structure.md // -> https://mywebsite.com/blog/directory-structure/
+ │   ├── _index.md // -> https://mywebsite.com/blog/
+ │   └── installation.md // -> https://mywebsite.com/blog/installation/
+ └── landing
+ └── _index.md // -> https://mywebsite.com/landing/
+```
+
+Each page path (the part after `base_url`, for example `blog/cli-usage/`) can be customised by changing the `path` or
+`slug` attribute of the [page front-matter](@/documentation/content/page.md#front-matter).
+
+You might have noticed a file named `_index.md` in the example above.
+This file is used to store both the metadata and content of the section itself and is not considered a page.
+
+To ensure that the terminology used in the rest of the documentation is understood, let's go over the example above.
+
+The `content` directory in this case has three `sections`: `content`, `blog` and `landing`. The `content` section has only
+one page (`something.md`), the `landing` section has no pages and the `blog` section has 4 pages (`cli-usage.md`,
+`configuration.md`, `directory-structure.md` and `installation.md`).
+
+Sections can be nested indefinitely.
+
+## Asset colocation
+
+The `content` directory is not limited to markup files. It's natural to want to co-locate a page and some related
+assets, such as images or spreadsheets. Zola supports this pattern out of the box for both sections and pages.
+
+All non-Markdown files you add in a page/section directory will be copied alongside the generated page when the site is
+built, which allows us to use a relative path to access them.
+
+Pages with co-located assets should not be placed directly in their section directory (such as `latest-experiment.md`), but
+as an `index.md` file in a dedicated directory (`latest-experiment/index.md`), like so:
+
+
+```bash
+└── research
+ ├── latest-experiment
+ │ ├── index.md
+ │ └── yavascript.js
+ ├── _index.md
+ └── research.jpg
+```
+
+With this setup, you may access `research.jpg` from your 'research' section
+and `yavascript.js` from your 'latest-experiment' page directly within the Markdown:
+
+```Markdown
+Check out the complete program [here](yavascript.js). It's **really cool free-software**!
+```
+
+By default, this page's slug will be the directory name and thus its permalink will be `https://example.com/research/latest-experiment/`.
+
+### Excluding files from assets
+
+It is possible to ignore selected asset files using the
+[ignored_content](@/documentation/getting-started/configuration.md) setting in the config file.
+For example, say that you have an Excel spreadsheet from which you are taking several screenshots and
+then linking to these image files on your website. For maintainability, you want to keep
+the spreadsheet in the same directory as the Markdown file, but you don't want to copy the spreadsheet to
+the public web site. You can achieve this by setting `ignored_content` in the config file:
+
+```
+ignored_content = ["*.xlsx"]
+```
+
+## Static assets
+
+In addition to placing content files in the `content` directory, you may also place content
+files in the `static` directory. Any files/directories that you place in the `static` directory
+will be copied, without modification, to the `public` directory.
+
+Typically, you might put site-wide assets (such as the site favicon, site logos or site-wide
+JavaScript) in the root of the static directory. You can also place any HTML or other files that
+you wish to be included without modification (that is, without being parsed as Markdown files)
+into the static directory.
+
+Note that the static directory provides an _alternative_ to co-location. For example, imagine that you
+had the following directory structure (a simplified version of the structure presented above):
+
+```bash
+.
+└── content
+ └── blog
+    ├── configuration
+ │    └── index.md // -> https://mywebsite.com/blog/configuration/
+    └── _index.md // -> https://mywebsite.com/blog/
+```
+
+To add an image to the `https://mywebsite.com/blog/configuration` page, you have three options:
+ * You could save the image to the `content/blog/configuration` directory and then link to it with a
+ relative path from the `index.md` page. This is the approach described under **co-location**
+ above.
+ * You could save the image to a `static/blog/configuration` directory and link to it in exactly the
+ same way as if you had co-located it. If you do this, the generated files will be identical to those
+ obtained if you had co-located the image; the only difference will be that all static files will be saved in the
+ static directory rather than in the content directory. The choice depends on your organizational needs.
+ * Or you could save the image to some arbitrary directory within the static directory. For example,
+ you could save all images to `static/images`. Using this approach, you can no longer use relative links. Instead,
+ you must use an absolute link to `images/[filename]` to access your
+ image. This might be preferable for small sites or for sites that associate images with
+ multiple pages (e.g., logo images that appear on every page).
diff --git a/content/documentation/content/page.md b/content/documentation/content/page.md
new file mode 100644
index 0000000..b43790f
--- /dev/null
+++ b/content/documentation/content/page.md
@@ -0,0 +1,145 @@
++++
+title = "Page"
+weight = 30
++++
+
+A page is any file ending with `.md` in the `content` directory, except files
+named `_index.md`.
+
+If a file ending with `.md` is named `index.md`, it will generate a page
+with the name of its directory (for example, `/content/about/index.md` would
+create a page at `[base_url]/about`). (Note the lack of an underscore; if the file
+were named `_index.md`, then it would create a **section** at `[base_url]/about`, as
+discussed in a previous part of this documentation. In contrast, naming the file `index.md` will
+create a **page** at `[base_url]/about`).
+
+If the file is given any name *other* than `index.md` or `_index.md`, then it will
+create a page with that name (without the `.md`). For example, naming a file in the root of your
+content directory `about.md` would create a page at `[base_url]/about`.
+Another exception to this rule is that a filename starting with a datetime (YYYY-mm-dd or [an RFC3339 datetime](https://www.ietf.org/rfc/rfc3339.txt)) followed by
+an underscore (`_`) or a dash (`-`) will use that date as the page date, unless already set
+in the front matter. The page name will be anything after `_`/`-`, so the file `2018-10-10-hello-world.md` will
+be available at `[base_url]/hello-world`. Note that the full RFC3339 datetime contains colons, which is not a valid
+character in a filename on Windows.
+
+As you can see, creating an `about.md` file is equivalent to creating an
+`about/index.md` file. The only difference between the two methods is that creating
+the `about` directory allows you to use asset co-location, as discussed in the
+[overview](@/documentation/content/overview.md#asset-colocation) section.
+
+## Output paths
+
+For any page within your content folder, its output path will be defined by either:
+
+- its `slug` frontmatter key
+- its filename
+
+Either way, these proposed path will be sanitized before being used.
+If `slugify_paths` is enabled in the site's config - the default - paths are [slugified](https://en.wikipedia.org/wiki/Clean_URL#Slug).
+Otherwise, a simpler sanitation is performed, outputting only valid NTFS paths.
+The following characters are removed: `<`, `>`, `:`, `/`, `|`, `?`, `*`, `#`, `\\`, `(`, `)`, `[`, `]` as well as newlines and tabulations.
+Additionally, trailing whitespace and dots are removed and whitespaces are replaced by `_`.
+
+**NOTE:** To produce URLs containing non-English characters (UTF8), `slugify_paths` needs to be set to `false`.
+
+### Path from frontmatter
+
+The output path for the page will first be read from the `slug` key in the page's frontmatter.
+
+**Example:** (file `content/zines/mlf-kurdistan.md`)
+
+```
++++
+title = "Le mouvement des Femmes Libres, à la tête de la libération kurde"
+slug = "femmes-libres-libération-kurde"
++++
+This is my article.
+```
+
+This frontmatter will output the article to `[base_url]/zines/femmes-libres-libération-kurde` with `slugify_paths` disabled, and to `[base_url]/zines/femmes-libres-liberation-kurde` with `slugify_enabled` enabled.
+
+### Path from filename
+
+When the article's output path is not specified in the frontmatter, it is extracted from the file's path in the content folder. Consider a file `content/foo/bar/thing.md`. The output path is constructed:
+- if the filename is `index.md`, its parent folder name (`bar`) is used as output path
+- otherwise, the output path is extracted from `thing` (the filename without the `.md` extension)
+
+If the path found starts with a datetime string (`YYYY-mm-dd` or [a RFC3339 datetime](https://www.ietf.org/rfc/rfc3339.txt)) followed by an underscore (`_`) or a dash (`-`), this date is removed from the output path and will be used as the page date (unless already set in the front-matter). Note that the full RFC3339 datetime contains colons, which is not a valid character in a filename on Windows.
+
+The output path extracted from the file path is then slugified or not depending on the `slugify_paths` config, as explained previously.
+
+**Example:** The file `content/blog/2018-10-10-hello-world.md` will generated a page available at will be available at `[base_url]/hello-world`.
+
+## Front matter
+
+The TOML front matter is a set of metadata embedded in a file at the beginning of the file enclosed
+by triple pluses (`+++`).
+
+Although none of the front matter variables are mandatory, the opening and closing `+++` are required.
+
+Here is an example page with all the available variables. The values provided below are the
+default values.
+
+```toml
+title = ""
+description = ""
+
+# The date of the post.
+# Two formats are allowed: YYYY-MM-DD (2012-10-02) and RFC3339 (2002-10-02T15:00:00Z).
+# Do not wrap dates in quotes; the line below only indicates that there is no default date.
+# If the section variable `sort_by` is set to `date`, then any page that lacks a `date`
+# will not be rendered.
+# Setting this overrides a date set in the filename.
+date =
+
+# The weight as defined on the Section page of the documentation.
+# If the section variable `sort_by` is set to `weight`, then any page that lacks a `weight`
+# will not be rendered.
+weight = 0
+
+# A draft page is only loaded if the `--drafts` flag is passed to `zola build`, `zola serve` or `zola check`.
+draft = false
+
+# If set, this slug will be instead of the filename to make the URL.
+# The section path will still be used.
+slug = ""
+
+# The path the content will appear at.
+# If set, it cannot be an empty string and will override both `slug` and the filename.
+# The sections' path won't be used.
+# It should not start with a `/` and the slash will be removed if it does.
+path = ""
+
+# Use aliases if you are moving content but want to redirect previous URLs to the
+# current one. This takes an array of paths, not URLs.
+aliases = []
+
+# When set to "true", the page will be in the search index. This is only used if
+# `build_search_index` is set to "true" in the Zola configuration and the parent section
+# hasn't set `in_search_index` to "false" in its front matter.
+in_search_index = true
+
+# Template to use to render this page.
+template = "page.html"
+
+# The taxonomies for this page. The keys need to be the same as the taxonomy
+# names configured in `config.toml` and the values are an array of String objects. For example,
+# tags = ["rust", "web"].
+[taxonomies]
+
+# Your own data.
+[extra]
+```
+
+## Summary
+
+You can ask Zola to create a summary if, for example, you only want to show the first
+paragraph of the page content in a list.
+
+To do so, add <code>&lt;!-- more --&gt;</code> in your content at the point
+where you want the summary to end. The content up to that point will be
+available separately in the
+[template](@/documentation/templates/pages-sections.md#page-variables).
+
+A span element in this position with a `continue-reading` id is created, so you can link directly to it if needed. For example:
+`<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>`.
diff --git a/content/documentation/content/sass.md b/content/documentation/content/sass.md
new file mode 100644
index 0000000..634bfc5
--- /dev/null
+++ b/content/documentation/content/sass.md
@@ -0,0 +1,42 @@
++++
+title = "Sass"
+weight = 110
++++
+
+Sass is a popular CSS preprocessor that adds special features (e.g., variables, nested rules) to facilate the
+maintenance of large sets of CSS rules. If you're curious about what Sass