Skip to content

Commit 7f39112

Browse files
author
GitHubRunner
committed
All history was squashed
0 parents  commit 7f39112

1,373 files changed

Lines changed: 69960 additions & 0 deletions

File tree

Some content is hidden

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

.bundle/config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
BUNDLE_PATH: "vendor/bundle"
3+
BUNDLE_SET: "path vendorbundle"

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
end_of_line = lf
9+
max_line_length = 160
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.md eol=lf
2+
*.yml eol=lf

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @allegro/techblog

.github/copilot-instructions.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Project scope and goals
2+
3+
- This project contains blog posts that are published on the blog of Allegro, a high-tech company based in Poland. If the post mentions Allegro, the first
4+
use of the Allegro name should be in the form of the following link: `[Allegro](https://allegro.tech)`.
5+
- Blog posts are intended for technical audiences, such as software engineers, testers, UI designers, etc. Each reader may specialize in a different area, but
6+
general technical knowledge is expected.
7+
- The audience is international and may not be familiar with the Allegro brand or with Polish culture in general. If references to Allegro or other entities
8+
well known in Poland but not abroad appear, they should be explained.
9+
10+
# Specific operations
11+
12+
## Checking a blog post
13+
14+
- When asked to "check" the document, "review" it, or to perform other similar actions, you must always follow the rules listed in this document and
15+
must include the following steps:
16+
- Check spelling and grammar
17+
- Check formatting
18+
- Check the content for compliance with the rules listed
19+
- Check the images (including image contents) for compliance with the rules listed
20+
- When checking the document, make the output as long as necessary to list all issues found.
21+
- Preserve word wrapping and line breaks in the original document.
22+
- Clearly mention when any of your hints are due to a specific rule listed in this document. For example if you suggest changing the spelling `colour` to
23+
`color`, mention that it is due to the rule about preferring American English.
24+
25+
## Writing social media posts
26+
27+
- When asked to write or suggest a social media post, follow these instructions exactly.
28+
- The blog post must pertain to a single blog post. If it is not clear which blog post you should work on, ask the user.
29+
- Follow these guidelines:
30+
- The input is a Jekyll page, consisting of front matter and markdown-formatted text.
31+
- Use the title of the blog post, taken from the front matter
32+
- Follow the title with the post's production URL in parentheses. It will be the same as the URL used to view the post locally, but with
33+
`https://blog.allegro.tech` as the base URL.
34+
- Avoid any markdown formatting, but you can use emojis sparingly where appropriate
35+
- The audience is programmer, testers, and other people working in IT. Assume basic understanding of IT and software engineering concepts.
36+
- Make it inviting to read the text
37+
- Use style which will be convincing to programmers and other geeks; avoid marketing style
38+
- Keep it direct and concise. Be factual and avoid exaggerations or excessive excitement.
39+
- Add up to a few hashtags matching the subject - use them either when using the appropriate word in the text or add them at the end if they don't fit the
40+
natural flow of the text
41+
- First, print an l1 heading saying "Social media post suggestions". Follow with a paragraph saying "These are only suggestions. Treat them as raw drafts.
42+
Review them carefully, and adapt contents and style to match the post's contents and your personal taste.". Then:
43+
- Create a short tweet suitable for Tweeter/X based on the blog post:
44+
- Precede it with an l2 heading saying "Tweet suggestion"
45+
- Stay within the length limit of 240 characters
46+
- Create a somewhat longer text suitable for Facebook or Instagram based on the blog post:
47+
- Precede it with an l2 heading saying "FB post suggestion"
48+
- Stay within the length limit of 2000 characters
49+
50+
## Preparing a blog post for publication
51+
52+
- When asked to prepare a post for publication, you must perform the following actions and only those actions (including smaller steps necessary to achieve
53+
these goals). Do not run any other checks or modifications unless explicitly told to:
54+
- Make sure you are working on a single blog post provided in your context. If it is not clear which blog post you should work on, suggest the latest blog
55+
post by date.
56+
- Run `scripts/prepare_publication/prepare_publication.py` with the blog post as the argument. Stop if the script ends with an error.
57+
- Run `bundle exec jekyll build` to ensure the blog post builds correctly. If it does not, print the error message and stop any further actions.
58+
- Ask the user if they want to view the blog post rendered after the modification. Print the question with a large, well-visible font.
59+
If they confirm, run `bundle exec jekyll serve` and inform the user about the URL where they can view the blog post. The base URL will be in the output
60+
of the command, printed before the command finishes - you have to capture the partial output. The URL path uses the <yyyy>/<MM>/<title>.html format.
61+
- Suggest social media posts for the blog post.
62+
63+
# Project structure
64+
65+
- The blog uses Jekyll, a static site generator. It is deployed to Github Pages, so only the subset of Jekyll that works in Github Pages should be used.
66+
- Blog posts are stored in separate Markdown files in the `_posts` directory. The file naming convention is `yyyy-MM-dd-title.md`, where `yyyy-MM-dd` is the
67+
date of publication and `title` is a slug (short, hyphen-separated version of the blog post title).
68+
- Images used in a single blog post named `yyyy-MM-dd-title.md` should be stored in the directory `assets/img/articles/yyyy-MM-dd-title/`.
69+
- Each author needs to be added to the `_data/members.yml` file, with their identifier (usually `firstname.lastname`), full name, a short bio, and
70+
optional links to their social media profiles.
71+
- For each author in `_data/members.yml`, a corresponding image should be placed in `assets/img/authors/` with the filename matching the author's identifier
72+
(usually `firstname.lastname.jpg`).
73+
- For each author in `_data/members.yml`, a directory names as the author's identifier (usually `firstname.lastname`) should be created in `authors/`
74+
directory. This directory should contain an `index.md` file with contents matching the template:
75+
---
76+
layout: author
77+
author: firstname.lastname
78+
---
79+
- A few static elements of the page exist, for example the "About us" page in `about/index.html`.
80+
81+
# Rules for blog post contents
82+
83+
## Language
84+
85+
- All blog posts are written in English. Each blog post should consistently use either American English or British English and not mix the two. Prefer
86+
American English when in doubt.
87+
- Blog posts should use typographic quotes: `“”` and `‘’`, typographic apostrophes ``, as well as em-dashes (``) where appropriate. Em-dashes should be
88+
surrounded by spaces on both sides.
89+
- The language should be clear and concise, but each author may use their own style.
90+
91+
## Formatting
92+
93+
- Blog posts may contain images. Use Markdown syntax for images without captions. If an image needs a caption, insert it as HTML following this template:
94+
<figure>
95+
<img alt="Alt text" src="/assets/img/articles/yyyy-MM-dd-title/short-image-name.jpg" />
96+
<figcaption>
97+
Image caption, usually the same as alt text
98+
</figcaption>
99+
</figure>
100+
- The first paragraph of a blog post should not be preceded by any headers.
101+
- Headers should start at level 2.
102+
103+
## Content
104+
105+
- Blog posts may not reveal any confidential information about Allegro or its customers. Examples of confidential information include, but are not limited to:
106+
- Earnings, income, or any kind of financial information
107+
- Internal processes and tools
108+
- Technical information which makes it possible to infer confidential information. For example, the number of requests to a service may be confidential if
109+
it allows inferring the number of sales Allegro is making.
110+
- If any kind of confidential information appears in the post, print a clear warning that such information may probably not be published and advise the
111+
author to ask for help on #allegro-tech-blog Slack channel.
112+
113+
## Images
114+
115+
- If the blog post contains any images, their contents as well as alt-text and captions must conform to rules listed below:
116+
- Ask the author explicitly if they have permission to use for all images. Either the images must be created by the author, the auther must have been given
117+
explicit permission to use them, or they must be in the public domain or under a license that allows free use (ensure proper attribution in such case).
118+
- Analyze the content of the images and if it contains faces of any individuals (unless they are just small parts of a larger crowd), explicitly ask the
119+
author if they have permission to publish these faces. Suggest blurring out the faces if such permission is not present.
120+
- Print a warning if the image seems to be a diagram or a line drawing and has transparent background which may cause it to become hard to understand in dark
121+
mode.
122+
123+
## Other
124+
125+
Apply any other rules mentioned in `CONTRIBUTING.md` that are relevant to the task you are executing.

.github/workflows/allegro.tech.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Update allegro.tech
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
dispatch:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Repository Dispatch
12+
uses: peter-evans/repository-dispatch@v3
13+
with:
14+
token: ${{ secrets.REPO_TOKEN }}
15+
repository: allegro/allegro.tech
16+
event-type: blog-update

.github/workflows/gh-pages.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy to gh-pages
2+
on:
3+
push:
4+
branches: ["main"]
5+
workflow_dispatch:
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
concurrency:
11+
group: "pages"
12+
cancel-in-progress: false
13+
jobs:
14+
build:
15+
if: ${{ github.repository_owner != 'allegro-internal' }}
16+
runs-on: ubuntu-latest
17+
env:
18+
JEKYLL_ENV: production
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/configure-pages@v5
22+
- uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: '3.1'
25+
bundler-cache: true
26+
- run: gem update --system
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: '21'
30+
- run: npm install
31+
- run: bundle install
32+
- run: bundle exec jekyll build
33+
- uses: actions/upload-pages-artifact@v3
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
runs-on: ubuntu-latest
39+
needs: build
40+
steps:
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

.github/workflows/public-push.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Push to public fork
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
publish:
9+
if: ${{ github.repository_owner != 'allegro' }}
10+
runs-on: [ubuntu-latest, self-hosted]
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
persist-credentials: false
16+
17+
- name: rebase public fork
18+
run: |
19+
# Squash all history in order to remove any sensitive data in pre-code-review versions
20+
git checkout --orphan new-main main &&
21+
git commit -m "All history was squashed" &&
22+
git branch -M new-main main &&
23+
git push "https://$REPO_TOKEN@github.com/allegro/blog.git" main -f
24+
env:
25+
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_site
2+
.sass-cache
3+
.jekyll-cache
4+
.jekyll-metadata
5+
vendor
6+
node_modules

.markdownlint.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"default": true,
3+
"MD013": {
4+
"line_length": 160,
5+
"tables": false
6+
},
7+
"MD022": false,
8+
"MD026": false,
9+
"MD032": false,
10+
"MD033": false,
11+
"MD036": false,
12+
"MD040": false
13+
}

0 commit comments

Comments
 (0)