Skip to content

Commit 9d43346

Browse files
committed
Initial commit
0 parents  commit 9d43346

132 files changed

Lines changed: 19782 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.

‎.eleventy.js‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
const markdownIt = require("markdown-it");
2+
3+
module.exports = function (eleventyConfig) {
4+
const md = markdownIt({
5+
html: true,
6+
breaks: false,
7+
linkify: true
8+
});
9+
10+
eleventyConfig.setLibrary("md", md);
11+
12+
eleventyConfig.addPassthroughCopy({ "assets/img": "img" });
13+
eleventyConfig.addPassthroughCopy({ "assets/css": "css" });
14+
eleventyConfig.addPassthroughCopy("CNAME");
15+
eleventyConfig.addPassthroughCopy(".nojekyll");
16+
eleventyConfig.addPassthroughCopy({ "assets/img/favicon.png": "favicon.png" });
17+
18+
eleventyConfig.addFilter("htmlDateString", (dateObj) => {
19+
return new Date(dateObj).toISOString().split('T')[0];
20+
});
21+
22+
eleventyConfig.addFilter("urlencode", function (str) {
23+
return encodeURIComponent(str);
24+
});
25+
26+
eleventyConfig.addFilter("getTutorialNav", function (tutorials, currentUrl) {
27+
if (!Array.isArray(tutorials) || !currentUrl) {
28+
return { first: null, prev: null, next: null };
29+
}
30+
31+
const currentIndex = tutorials.findIndex((item) => item.url === currentUrl);
32+
const first = tutorials.length > 0 ? tutorials[0] : null;
33+
const prev = currentIndex > 0 ? tutorials[currentIndex - 1] : null;
34+
const next = currentIndex >= 0 && currentIndex < tutorials.length - 1
35+
? tutorials[currentIndex + 1]
36+
: null;
37+
38+
return { first, prev, next };
39+
});
40+
41+
eleventyConfig.addCollection("tutorials", function (collectionApi) {
42+
return collectionApi.getFilteredByGlob("tutorial/**/*.md").sort((a, b) => {
43+
return (a.data.order || 0) - (b.data.order || 0);
44+
});
45+
});
46+
47+
eleventyConfig.addCollection("tools", function (collectionApi) {
48+
return collectionApi.getFilteredByGlob("tools/*.njk");
49+
});
50+
51+
eleventyConfig.addWatchTarget("./assets/css/");
52+
eleventyConfig.addWatchTarget("./tailwind.css");
53+
54+
eleventyConfig.setServerOptions({
55+
watch: ["_site/css/**/*.css"],
56+
liveReload: true,
57+
});
58+
59+
return {
60+
dir: {
61+
input: ".",
62+
output: "_site",
63+
includes: "_includes",
64+
layouts: "_layouts",
65+
data: "_data"
66+
},
67+
templateFormats: ["md", "njk", "html"],
68+
markdownTemplateEngine: "njk",
69+
htmlTemplateEngine: "njk",
70+
passthroughFileCopy: true
71+
};
72+
};

‎.eleventyignore‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
README.md
2+
LICENSE
3+
node_modules
4+
_site
5+
tailwind.css
6+
tailwind.config.js
7+
package.json
8+
package-lock.json

‎.github/workflows/deploy.yml‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: npm
27+
28+
- run: npm ci
29+
- run: npm run build
30+
- run: npm run check
31+
32+
- uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: _site
35+
36+
deploy:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
steps:
43+
- id: deployment
44+
uses: actions/deploy-pages@v4

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_site/
2+
site/
3+
*.local
4+
.DS_Store
5+
node_modules
6+
local/

‎.nojekyll‎

Whitespace-only changes.

‎CNAME‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
belajarpython.com

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Belajarpython
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<div align="center">
2+
<img src="https://belajarpython.com/img/logo-belajarpython-for-github.png"><br><br>
3+
</div>
4+
5+
---
6+
7+
# [Belajarpython](https://www.belajarpython.com/) &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/belajarpythoncom/belajarpython.com/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://belajarpython.com/contribute)
8+
9+
Belajarpython adalah situs kolaboratif tutorial pemrograman Python bahasa Indonesia
10+
11+
- **Ikuti Tutorial:** Mulai belajar bahasa pemrograman python dari tingkat dasar dengan tutorial yang dikhususkan untuk pemula agar lebih cepat mempelajari bahasa pemrograman python.
12+
- **Baca Artikel:** Baca artikel terbaru dan terpopuler tentang bahasa pemrograman python dengan beragam topik. Artikel dibuat oleh komunitas dan ditujukan untuk komunitas.
13+
- **Ajukan Pertanyaan:** Ajukan setiap pertanyaan yang anda temui tentang bahasa pemrograman python. Setiap orang di komunitas akan segera menyelesaikan setiap pertanyaan pengguna.
14+
15+
## Kontribusi
16+
17+
Belajarpython adalah situs terbuka (open source) yang dikembangkan oleh developer untuk developer. Semua orang baik dari kalangan :trollface: developer, :man: mahasiswa, :older_woman: pengajar, bahkan :baby: anak kecil yang baru mempelajari bahasa pemrograman python bisa ikut memberikan :heart: kontribusinya [disini](https://github.com/belajarpythoncom/belajarpython.com/blob/master/CONTRIBUTING.md)
18+
19+
### [Code of Conduct](https://belajarpython.com/docs/codeofconduct)
20+
21+
Belajarpython telah mengadopsi Kode Etik yang kami harapkan akan diikuti oleh peserta proyek terbuka ini. Mohon baca [full text](https://github.com/belajarpythoncom/belajarpython.com/blob/master/CODE_OF_CONDUCT.md) sehingga anda dapat mengerti aksi apa yang yang bisa dan tidak bisa ditoleransi.
22+
23+
### [Panduan Kontribusi](https://belajarpython.com/contribute)
24+
25+
Baca [panduan kontribusi](https://belajarpython.com/contribute) dari kami untuk mempelajari tentang proses pengembangan konten disini.
26+
27+
### Good First Issues
28+
29+
Untuk membantu Anda membuat kaki Anda basah dan membuat Anda terbiasa dengan proses kontribusi kami, kami memiliki daftar [good first issues](https://github.com/belajarpythoncom/belajarpython.com/issues) yang mengandung bug yang memiliki lingkup yang relatif terbatas. Ini adalah tempat yang bagus untuk memulai.
30+
31+
### License
32+
33+
Belajarpython is [MIT licensed](./LICENSE).

‎_data/site.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Python Tutorial",
3+
"tagline": "Complete Python Tutorial from Basic to Advanced",
4+
"author": "Purwanto",
5+
"url": "https://belajarpython.com",
6+
"description": "Learn Python for free with complete tutorials. Python programming guide from basic to advanced for data science, machine learning, AI, and web development.",
7+
"keywords": "python tutorial, learn python, python programming, python beginner, python course free, python basics",
8+
"version": "2.0.0"
9+
}

‎_includes/analytics.njk‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Google Analytics -->
2+
<!-- Global site tag (gtag.js) - Google Analytics -->
3+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118615030-1"></script>
4+
<script>
5+
window.dataLayer = window.dataLayer || [];
6+
function gtag(){dataLayer.push(arguments);}
7+
gtag('js', new Date());
8+
9+
gtag('config', 'UA-118615030-1');
10+
</script>
11+
<!-- End Google Analytics -->

0 commit comments

Comments
 (0)