Skip to content

Commit 33fe619

Browse files
committed
add bear-theme
Signed-off-by: Alex Ivanov <ai@contributor.pw>
1 parent 8ef4eb8 commit 33fe619

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+917
-4569
lines changed

.markdownlint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2+
"default": true,
3+
"MD013": false,
4+
"MD036": false,
25
"MD041": false
36
}

config.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
baseURL = "https://example.com"
3+
4+
# The name of this wonderful theme ;-).
5+
# theme = 'hugo-bearblog'
6+
7+
# Basic metadata configuration for your blog.
8+
title = "Google Apps Script snippets ᕦʕ •ᴥ•ʔᕤ"
9+
author = "Alex Ivanov <ai@contributor.pw>"
10+
copyright = "Copyright © 2021, Alex Ivanov."
11+
languageCode = "en-US"
12+
13+
# Generate a nice robots.txt for SEO
14+
enableRobotsTXT = true
15+
16+
# Generate "Bearblog"-like URLs !only!, see https://bearblog.dev/.
17+
disableKinds = ["taxonomy"]
18+
ignoreErrors = ["error-disable-taxonomy"]
19+
20+
pygmentsUseClasses = true
21+
22+
[permalinks]
23+
blog = "/:slug/"
24+
tags = "/:slug/"
25+
26+
[params]
27+
# The "description" of your website. This is used in the meta data of your generated html.
28+
description = "Hugo + Bear = :heart:"
29+
30+
# The path to your "favicon". This should be a square (at least 32px x 32px) png-file.
31+
# Hint: It's good practise to also put a "favicon.ico"-file into your "static"-folder.
32+
favicon = "images/favicon.png"
33+
34+
# These "images" are used for the structured data templates. This will show up, when
35+
# services like Twitter or Slack want to generate a preview of a link to your site.
36+
# See https://gohugo.io/templates/internal#twitter-cards and
37+
# https://gohugo.io/templates/internal#open-graph.
38+
images = ["images/share.png"]
39+
40+
# Another "title" :-). This one is used as the site_name on the Hugo's internal
41+
# opengraph structured data template.
42+
# See https://ogp.me/ and https://gohugo.io/templates/internal#open-graph.
43+
title = "Google Apps Script Snippets"
44+
45+
# This theme will, by default, inject a made-with-line at the bottom of the page.
46+
# You can turn it off, but we would really appreciate if you don’t :-).
47+
# hideMadeWithLine = true
48+
snippetsRepo = "https://github.com/contributorpw/google-apps-script-snippets"
File renamed without changes.

content/_index.md

Lines changed: 104 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,105 @@
1-
---
2-
title: Introduction
3-
type: docs
4-
---
1+
# Google Apps Script Snippets
52

6-
## Introduction
3+
{{< figure src="https://ssl.gstatic.com/images/branding/product/2x/apps_script_64dp.png" >}}
4+
5+
{{< toc >}}
6+
7+
## What is it
8+
9+
This is a systematic view of Google Apps Script [snippets][1] sorted and grouped using [Hugo][2]. It also uses [watchman][3] and [rsync][4] to build locally.
10+
11+
## Why is this necessary
12+
13+
The main reason is to share knowledge. Often the documentation is insufficient to reveal the capabilities of a method or coding approach.
14+
15+
When I was learning I missed such samples. I really hope it will be useful for you too.
16+
17+
## What is a snippet
18+
19+
Snippet is a programming term for a small region of re-usable source code, machine code, or text. These snippets are focused on simple and common use. Very often (in Google Apps Script) we need to copy and paste some code into our project for everything to work. These snippets are for this.
20+
21+
## How to use
22+
23+
### Main approach
24+
25+
You just copy the files to your project.
26+
27+
Almost every snippet is provided with a main code file and a manifest. You need the manifest to know what additional libraries or services or scopes you may need to make the snippet work.
28+
29+
### An example of a simple manifest
30+
31+
**appsscript.json**
32+
33+
```json
34+
{
35+
"timeZone": "America/New_York",
36+
"dependencies": {},
37+
"exceptionLogging": "STACKDRIVER",
38+
"runtimeVersion": "V8"
39+
}
40+
```
41+
42+
### An example of a manifest with dependencies
43+
44+
Below is an example when using Advanced Docs Service. Usually, updating the manifest is enough for the program to request new permissions. Stay attentive.
45+
46+
**appsscript.json**
47+
48+
```json
49+
{
50+
"timeZone": "Europe/Moscow",
51+
"dependencies": {
52+
"enabledAdvancedServices": [
53+
{
54+
"userSymbol": "Docs",
55+
"serviceId": "docs",
56+
"version": "v1"
57+
}
58+
]
59+
},
60+
"exceptionLogging": "STACKDRIVER",
61+
"runtimeVersion": "V8"
62+
}
63+
```
64+
65+
### How to see my manifest
66+
67+
You need to check-in the property `Show "appsscript.json" manifest file in editor` in your project settings.
68+
69+
### How to merge manifests
70+
71+
When you take a snippet, you get two manifests: yours one in the current project and a snippet manifest.
72+
73+
The snippet's manifest should just extend your manifest. From the example above, you can see that we need to add only one object to the simple manifest.
74+
75+
Here it is
76+
77+
```json
78+
{
79+
"enabledAdvancedServices": [
80+
{
81+
"userSymbol": "Docs",
82+
"serviceId": "docs",
83+
"version": "v1"
84+
}
85+
]
86+
}
87+
```
88+
89+
### How can I help
90+
91+
- Leave a request of snippet or suggestion for improvement in the repository [contributorpw/google-apps-script-snippets/issues][5]
92+
- Share the snippets
93+
- Contribute [contributorpw/google-apps-script-snippets][1]
94+
- Contribute [contributorpw/google-apps-script-snippets-hugo-site][6]
95+
- Contribute [janraasch/hugo-bearblog][7]
96+
- Do know something cool about Google Apps Script? Leave an issue or PR [contributorpw/google-apps-script-awesome-list][8]
97+
98+
[1]: https://github.com/contributorpw/google-apps-script-snippets
99+
[2]: https://gohugo.io
100+
[3]: https://github.com/facebook/watchman
101+
[4]: https://rsync.samba.org/
102+
[5]: https://github.com/contributorpw/google-apps-script-snippets/issues
103+
[6]: https://github.com/contributorpw/google-apps-script-snippets-hugo-site
104+
[7]: https://github.com/janraasch/hugo-bearblog
105+
[8]: https://github.com/contributorpw/google-apps-script-awesome-list

content/_index.ru.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

content/bear.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
+++
2+
title = "Bear"
3+
menu = "main"
4+
draft = true
5+
+++
6+
7+
# Bear
8+
9+
Website: https://bearblog.dev
10+
11+
There is a website obesity crisis. Bloated websites are full of scripts, ads, and trackers slowing your readers down every time they try to read your well-crafted content.
12+
13+
Bear is all you need to build a fantastic and optimized site or blog. It works perfectly on **any** viewing device. All you need to focus on is writing good content.
14+
15+
Bear makes it simple to publish content online and grow an audience while keeping pages tiny, fast, and **optimized for search engines.**
16+
17+
Each page is ~5kb.
18+
19+
Learn more and contribute on [GitHub](https://github.com/HermanMartinus/bearblog).

content/blog/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
+++
2+
title = "Blog"
3+
+++

content/blog/markdown-syntax.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
+++
2+
title = "Markdown Syntax Guide"
3+
date = "2020-01-03"
4+
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
5+
tags = [
6+
"markdown",
7+
"syntax",
8+
]
9+
+++
10+
11+
For a quick cheatsheet, check out https://simplemde.com/markdown-guide.
12+
13+
---
14+
15+
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
16+
<!--more-->
17+
18+
## Headings
19+
20+
The following HTML `<h1>``<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
21+
22+
# H1
23+
## H2
24+
### H3
25+
#### H4
26+
##### H5
27+
###### H6
28+
29+
## Paragraph
30+
31+
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
32+
33+
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
34+
35+
## Blockquotes
36+
37+
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
38+
39+
#### Blockquote without attribution
40+
41+
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
42+
> **Note** that you can use *Markdown syntax* within a blockquote.
43+
44+
#### Blockquote with attribution
45+
46+
> Don't communicate by sharing memory, share memory by communicating.<br>
47+
> — <cite>Rob Pike[^1]</cite>
48+
49+
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
50+
51+
## Tables
52+
53+
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
54+
55+
Name | Age
56+
--------|------
57+
Bob | 27
58+
Alice | 23
59+
60+
#### Inline Markdown within tables
61+
62+
| Italics | Bold | Code |
63+
| -------- | -------- | ------ |
64+
| *italics* | **bold** | `code` |
65+
66+
## Code Blocks
67+
68+
#### Code block with backticks
69+
70+
```html
71+
<!doctype html>
72+
<html lang="en">
73+
<head>
74+
<meta charset="utf-8">
75+
<title>Example HTML5 Document</title>
76+
</head>
77+
<body>
78+
<p>Test</p>
79+
</body>
80+
</html>
81+
```
82+
83+
#### Code block indented with four spaces
84+
85+
<!doctype html>
86+
<html lang="en">
87+
<head>
88+
<meta charset="utf-8">
89+
<title>Example HTML5 Document</title>
90+
</head>
91+
<body>
92+
<p>Test</p>
93+
</body>
94+
</html>
95+
96+
#### Code block with Hugo's internal highlight shortcode
97+
{{< highlight html >}}
98+
<!doctype html>
99+
<html lang="en">
100+
<head>
101+
<meta charset="utf-8">
102+
<title>Example HTML5 Document</title>
103+
</head>
104+
<body>
105+
<p>Test</p>
106+
</body>
107+
</html>
108+
{{< /highlight >}}
109+
110+
## List Types
111+
112+
#### Ordered List
113+
114+
1. First item
115+
2. Second item
116+
3. Third item
117+
118+
#### Unordered List
119+
120+
* List item
121+
* Another item
122+
* And another item
123+
124+
#### Nested list
125+
126+
* Fruit
127+
* Apple
128+
* Orange
129+
* Banana
130+
* Dairy
131+
* Milk
132+
* Cheese
133+
134+
## Other Elements — abbr, sub, sup, kbd, mark
135+
136+
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
137+
138+
H<sub>2</sub>O
139+
140+
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
141+
142+
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
143+
144+
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.

0 commit comments

Comments
 (0)