diff --git a/.codesandbox/tasks.json b/.codesandbox/tasks.json new file mode 100644 index 0000000..0eefb4b --- /dev/null +++ b/.codesandbox/tasks.json @@ -0,0 +1,22 @@ +{ + // These tasks will run in order when initializing your CodeSandbox project. + "setupTasks": [ + { + "name": "Install Dependencies", + "command": "npm install" + } + ], + + // These tasks can be run from CodeSandbox. Running one will open a log in the app. + "tasks": { + "start": { + "name": "dev", + "command": "npm run dev -- --baseURL=/ --appendPort=false --liveReloadPort=443 --bind=0.0.0.0", + "runAtStart": true + }, + "install": { + "name": "install dependencies", + "command": "npm install" + } + } +} diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..99278d5 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,19 @@ +FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04 + +RUN apt-get update && \ + apt-get install -y \ + ca-certificates \ + nodejs \ + npm \ + wget && \ + update-ca-certificates + +ARG HUGO_VERSION="0.131.0" +RUN wget --quiet "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz" && \ + tar xzf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz && \ + rm -r hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz && \ + mv hugo /usr/bin && \ + chmod 755 /usr/bin/hugo + +WORKDIR /src +COPY ./ /src diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3ca14d3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,5 @@ +{ + "build": { + "dockerfile": "./Dockerfile" + } +} diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..df19ef5 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,13 @@ +# Source: https://github.com/gitpod-io/template-hugo/blob/main/.gitpod.yml + +# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/ +tasks: + - name: Run start up tasks + before: brew install hugo + init: pnpm install + command: hugo server --baseURL $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 --disableFastRender --noHTTPCache --navigateToChanged + +# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/ +ports: + - port: 1313 + onOpen: open-preview diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..8e409ce --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +.env +.netlify +.hugo_build.lock +node_modules +public +resources diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b667d29 --- /dev/null +++ b/.npmrc @@ -0,0 +1,4 @@ +enable-pre-post-scripts=true +auto-install-peers=true +node-linker=hoisted +prefer-symlinked-executables=false diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..a9468c1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,12 @@ +*.html +*.ico +*.png +*.jp*g +*.toml +*.*ignore +*.svg +*.xml +LICENSE +.npmrc +.gitkeep +*.woff* diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..cf3ba7b --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,19 @@ +# Default config +tabWidth: 4 +endOfLine: crlf +singleQuote: true +printWidth: 100000 +trailingComma: none +bracketSameLine: true +quoteProps: consistent +experimentalTernaries: true + +# Overrided config +overrides: + - files: ["*.md", "*.json", "*.yaml"] + options: + tabWidth: 2 + singleQuote: false + - files: ["*.scss"] + options: + singleQuote: false diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..5e532e6 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["budparr.language-hugo-vscode", "yzhang.markdown-all-in-one", "tamasfe.even-better-toml", "dbaeumer.vscode-eslint", "DavidAnson.vscode-markdownlint", "stylelint.vscode-stylelint"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b67d11a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "editor.wordWrap": "off", + "files.trimTrailingWhitespace": true, + "files.insertFinalNewline": true, + "editor.tabSize": 2, + "editor.insertSpaces": true +} diff --git a/assets/cover.png b/assets/cover.png new file mode 100644 index 0000000..561091e Binary files /dev/null and b/assets/cover.png differ diff --git a/assets/favicon.ico b/assets/favicon.ico new file mode 100644 index 0000000..9e2fc8d Binary files /dev/null and b/assets/favicon.ico differ diff --git a/assets/favicon.png b/assets/favicon.png new file mode 100644 index 0000000..74bdfb9 Binary files /dev/null and b/assets/favicon.png differ diff --git a/assets/favicon.svg b/assets/favicon.svg new file mode 100644 index 0000000..4631bc5 --- /dev/null +++ b/assets/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/content/links/github.png b/assets/images/github.png similarity index 100% rename from content/links/github.png rename to assets/images/github.png diff --git a/content/links/instagram.png b/assets/images/instagram.png similarity index 100% rename from content/links/instagram.png rename to assets/images/instagram.png diff --git a/content/links/instagram.svg b/assets/images/instagram.svg similarity index 100% rename from content/links/instagram.svg rename to assets/images/instagram.svg diff --git a/content/links/kb-auth-primary.png b/assets/images/kb-auth-primary.png similarity index 100% rename from content/links/kb-auth-primary.png rename to assets/images/kb-auth-primary.png diff --git a/content/links/kb-auth-transparent.png b/assets/images/kb-auth-transparent.png similarity index 100% rename from content/links/kb-auth-transparent.png rename to assets/images/kb-auth-transparent.png diff --git a/content/links/kb-cloud-primary-small.png b/assets/images/kb-cloud-primary-small.png similarity index 100% rename from content/links/kb-cloud-primary-small.png rename to assets/images/kb-cloud-primary-small.png diff --git a/content/links/kb-cloud-primary.png b/assets/images/kb-cloud-primary.png similarity index 100% rename from content/links/kb-cloud-primary.png rename to assets/images/kb-cloud-primary.png diff --git a/content/links/kb-cloud-transparent.png b/assets/images/kb-cloud-transparent.png similarity index 100% rename from content/links/kb-cloud-transparent.png rename to assets/images/kb-cloud-transparent.png diff --git a/content/links/kb-git-primary-small.png b/assets/images/kb-git-primary-small.png similarity index 100% rename from content/links/kb-git-primary-small.png rename to assets/images/kb-git-primary-small.png diff --git a/content/links/kb-git-primary.png b/assets/images/kb-git-primary.png similarity index 100% rename from content/links/kb-git-primary.png rename to assets/images/kb-git-primary.png diff --git a/content/links/kb-git-transparent.png b/assets/images/kb-git-transparent.png similarity index 100% rename from content/links/kb-git-transparent.png rename to assets/images/kb-git-transparent.png diff --git a/content/links/mastodon.png b/assets/images/mastodon.png similarity index 100% rename from content/links/mastodon.png rename to assets/images/mastodon.png diff --git a/content/links/mastodon.svg b/assets/images/mastodon.svg similarity index 100% rename from content/links/mastodon.svg rename to assets/images/mastodon.svg diff --git a/content/links/soundcloud.png b/assets/images/soundcloud.png similarity index 100% rename from content/links/soundcloud.png rename to assets/images/soundcloud.png diff --git a/content/links/soundcloud.svg b/assets/images/soundcloud.svg similarity index 100% rename from content/links/soundcloud.svg rename to assets/images/soundcloud.svg diff --git a/content/links/twitch.png b/assets/images/twitch.png similarity index 100% rename from content/links/twitch.png rename to assets/images/twitch.png diff --git a/content/links/twitch.svg b/assets/images/twitch.svg similarity index 100% rename from content/links/twitch.svg rename to assets/images/twitch.svg diff --git a/content/links/twitter.png b/assets/images/twitter.png similarity index 100% rename from content/links/twitter.png rename to assets/images/twitter.png diff --git a/content/links/twitter.svg b/assets/images/twitter.svg similarity index 100% rename from content/links/twitter.svg rename to assets/images/twitter.svg diff --git a/content/links/youtube.png b/assets/images/youtube.png similarity index 100% rename from content/links/youtube.png rename to assets/images/youtube.png diff --git a/content/links/youtube.svg b/assets/images/youtube.svg similarity index 100% rename from content/links/youtube.svg rename to assets/images/youtube.svg diff --git a/assets/js/custom.js b/assets/js/custom.js new file mode 100644 index 0000000..c5525d0 --- /dev/null +++ b/assets/js/custom.js @@ -0,0 +1 @@ +// Put your custom JS code here diff --git a/assets/mask-icon.svg b/assets/mask-icon.svg new file mode 100644 index 0000000..4631bc5 --- /dev/null +++ b/assets/mask-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/scss/common/_custom.scss b/assets/scss/common/_custom.scss new file mode 100644 index 0000000..f7c1361 --- /dev/null +++ b/assets/scss/common/_custom.scss @@ -0,0 +1 @@ +// Put your custom SCSS code here diff --git a/assets/scss/common/_variables-custom.scss b/assets/scss/common/_variables-custom.scss new file mode 100644 index 0000000..d2280cc --- /dev/null +++ b/assets/scss/common/_variables-custom.scss @@ -0,0 +1 @@ +// Put your custom SCSS variables here diff --git a/assets/svgs/.gitkeep b/assets/svgs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config.yaml b/config.yaml deleted file mode 100644 index 324e1ff..0000000 --- a/config.yaml +++ /dev/null @@ -1,466 +0,0 @@ -baseURL: https://kb-one.de/ -languageCode: de -defaultContentLanguage: de -title: "kb-one" -enableRobotsTXT: true -enableEmoji: true -theme: kb-one-de-theme -timeout: 60000 -timeZone: Europe/Berlin - -bluemap_cusom_js: ["bluemap-scrollbehaviour.js"] - -# 可根据 Git 中的提交生成最近更新记录。 -# use git commit log to generate lastmod record -enableGitInfo: false - -# 如果你的博客包含中日韩语,请启用此选项 -# enable CJK language support -hasCJKLanguage: true - -# 每页显示文章数量 -# pagination size -paginate: 10 - -# 启用谷歌统计 -# google analytics tracking code -# googleAnalytics: UA-98634098-1 - -# 版权信息,默认为 author.name ↓ -# default: author.name ↓ -# copyright: "" - -permalinks: - # 文章链接的格式 - # Format of posts links - posts: /:year/:month/:day/:slug.html # 2019/01/01/hello-world.html - pages: /:slug.html # about.html - -author: - name: kB01 - -frontmatter: - lastmod: - - :git - - lastmod - - :fileModTime - - date - - publishDate - - :default - -taxonomies: - tag: "tags" - category: "categories" - -summaryLength: 70 -canonifyURLs: false -relativeURLs: false - -# 图像处理 -# see https://gohugo.io/content-management/image-processing/#imaging-configuration -imaging: - resampleFilter: CatmullRom - quality: 95 - anchor: smart - -caches: - getresource: - dir: :resourceDir/_gen - maxAge: 24h - -# 隐私政策,请查看 https://gohugo.io/about/hugo-and-gdpr/ -# See https://gohugo.io/about/hugo-and-gdpr/ -privacy: - googleAnalytics: - anonymizeIP: true - youtube: - privacyEnhanced: true - -sitemap: - changefreq: weekly - priority: 0.5 - filename: sitemap.xml - -# 所有支持的页面 -# all supported pages -$manuMain: - - &mainMenuHome - name: Home - weight: 10 - identifier: home - params: - icon: eva eva-home - url: / - - &mainMenuMinecraft - name: Minecraft - weight: 12 - identifier: minecraft - params: - icon: eva eva-cube - url: /categories/minecraft/ - - &mainMenuPortfolio - name: Portfolio - weight: 12 - identifier: portfolio - params: - icon: eva eva-briefcase - url: /categories/portfolio/ - - &mainMenuAbout - name: About - weight: 20 - identifier: about - params: - icon: eva eva-info - url: /about/ - - &mainMenuLinks - name: Links - weight: 30 - identifier: links - params: - icon: eva eva-link-2 - url: /links/ - - &mainMenuArchive - name: Archives - weight: 40 - identifier: archive - params: - icon: eva eva-archive - url: /archive/ - - &mainMenuTags - name: Tags - weight: 50 - identifier: tags - params: - icon: eva eva-hash - url: /tags/ - - &mainMenuCategories - name: Categories - weight: 60 - identifier: categories - params: - icon: eva eva-folder - url: /categories/ - - &mainMenuGitHub - name: GitHub - weight: 80 - identifier: github - params: - icon: eva eva-code - url: /github/ - - &mainMenuSearch - name: Search - weight: 999 - identifier: search - params: - icon: eva eva-search - url: /search/ - -# 如果你不想要导航栏,你可以删除这一段 -# If you don't want the navbar, you can delete this paragraph -menu: - main: - - *mainMenuHome - - *mainMenuMinecraft - - *mainMenuPortfolio - - *mainMenuAbout - - *mainMenuLinks - - *mainMenuArchive - - *mainMenuSearch - # 副导航 / sub-navigation - # sub: - # - name: About - # weight: 10 - # identifier: about - # params: - # icon: eva eva-info - # url: /about/ - # - name: GitHub - # weight: 30 - # identifier: github - # params: - # icon: eva eva-code - # url: /github/ - # - name: Links - # weight: 20 - # identifier: links - # params: - # icon: eva eva-link-2 - # url: /links/ - -markup: - highlight: - style: dracula - guessSyntax: true - tabWidth: 4 - lineNumbersInTable: true - lineNos: true - codeFences: true - goldmark: - renderer: - unsafe: true # enable html in markdown - -# .Site.Params -params: - # CDN 地址 - # CDN URL - publicCDN: "" - - # 在网站顶部显示标题和摘要,使用 .Site.Title 和 .Site.Params.Description - # Display title and description at the top of the page, use .Site.Title and .Site.Params.Description - topTitle: false - - # 在首页顶部创建一个通知部分 - # Create a Announcement section at the top of the home page - announcement: - enabled: true - file: "README.md" # assets/README.md - - # 评论系统 - # Comment system - comments: - enabled: false - provider: "giscus" # custom | giscus - giscus: &giscus - repo: "Ice-Hazymoon/hugo-theme-luna" - repoID: "R_kgDOHQOwYw" - category: "Comments" - categoryID: "DIC_kwDOHQOwY84CP0Sy" - mapping: "title" - reactionsEnabled: 1 - emitMetadata: 0 - lazy: false - lang: "en" - - # Rss 配置 - # RSS configuration - rss: - # 如果为 false,你必须设置 Output Formats,请查看:https://gohugo.io/templates/output-formats#customizing-output-formats - # If false, you must set Output Formats, see: https://gohugo.io/templates/output-formats#customizing-output-formats - enabled: true - # 是否输出全文 - # Output full text - fullText: true - - # 如果为 false,你必须设置 Output Formats,请查看:https://gohugo.io/templates/output-formats#customizing-output-formats - # If false, you must set Output Formats, see: https://gohugo.io/templates/output-formats#customizing-output-formats - sitemap: true - - # 网站主题颜色 - # Site theme colors - themeColor: "#3C6E71" - - # 设置网站为黑白模式,通常用于哀悼活动 - # Set website to black and white, usually for mourning events - blackAndWhite: false - - # 输出一个漂亮的控制台日志 - # Output a nice console log - console: - enabled: true - leftColor: "#dd6065" - leftText: "Hugo Theme Luna" - rightColor: "#feb462" - rightText: "Powered by Hugo ❤ Luna" - - # 标题计数器 - # Title counter - headlineCounter: false - - # 固定导航栏 - # Fixed navigation bar - fixedNav: false - - # 网站字体 - # Site font - # font: '"Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"' - font: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif' - - # 自定义脚本 - # ts/custom.ts - customScript: - enabled: false - pjax: true # Auto-reload in pjax mode - - # 网站底部显示运行时间 - # Show site runtime - runTime: - enabled: true - # 网站创建时间 - # Site creation time - creatTime: 2023/03/13 - - # 网站创建年份 - # Site creation year - since: "2023" - - # 显示文章过时提醒 - # show warning when outdated info detected - outdatedInfoWarning: - enabled: true - # 超过该天数将显示过时提醒 - # A timeout reminder will be displayed if the last modification time exceeds that number of days - day: 90 - - # 自动切换夜间模式(使用设备设置) - # Automatic switching of night mode (using device settings) - autoDarkMode: false - - # 文章分享功能 - share: - twitter: false - facebook: false - weibo: false - copyLinkText: true - qrcode: false - - qrcodeAPI: "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" - - # 文章许可设置 - # license - license: - enabled: true - name: "CC BY-NC-ND 4.0" - icon: "Cc-by-nc-nd.svg" # in assets folder - url: "https://creativecommons.org/licenses/by-nc-nd/4.0" - - # 显示右上角 i18n 切换按钮 - # Display i18n toggle button - i18nlist: true - - # GitHub 页面设置 - # github page - github: - id: "kb01guy" # github user id - minStars: 0 # 最小 star 项目 / min stars - - # Twitter 页面设置 - # tweet page - twitter: - enabled: true - rsshub: "https://rsshub.rssforever.com" # rsshub url, see https://github.com/DIYgod/RSSHub - id: "GenshinImpact" # Twitter ID - # 如果为 true,Hugo 将下载图片和视频并进行优化,如果你在中国大陆地区,请谨慎启用这个选项 - # If enabled, Hugo will download videos and images from the Tweet and optimize them - imageProcessing: true - - # 开启图片放大功能 - # Image Zoom Plugin - # see https://github.com/francoischalifour/medium-zoom - imageZoom: true - - # 图片懒加载 - # lazyload image - lazyload: true - - # 更快速的阅读英文内容, 参考:https://bionic-reading.com/ - # Read English content faster, see https://bionic-reading.com/ - bionicReading: - enabled: true - autoBionic: false # 自动启用 Bionic Reading / auto enable Bionic Reading - skipLinks: false # 跳过链接 / skip links - excludeWords: [] # 忽略的单词 / ignored words - excludeNodeNames: [] # 忽略的节点名称 / ignored node names - excludeClasses: ['github'] # 忽略的类名 / ignored classes - - # 启用谷歌翻译插件 - # enable google translate in footer - googleTranslate: false - - # 优化中文排版,请参考:https://github.com/vinta/pangu.js - # Optimize Chinese typography, see: https://github.com/vinta/pangu.js - pangu: false - - # 开启本地搜索插件 - # enable local search plugin - search: true - - # 文章页显示最后修改时间 - # For outdated reminders - lastmod: true - - # 显示阅读时间 - # show reading time - readingTime: true - - # 显示文章字数 - # show word count - wordCount: false - - # 开启文章内目录,可以在页面内单独设置 - # Show table of contents, You can enable it separately in the page - toc: - enabled: true - # 超过这个字数后将显示目录 - # When the article word count is greater than this value, the TOC will be displayed - wordCount: 400 - - # 加密功能 - # encryption articles - HugoEncrypt: - # 默认密码 - # default password - Password: "123456" - # 密码缓存选项 "session" or "local" - # or "local" - Storage: "session" - - # 开启 Pjax 无刷新加载 - # Enable pjax with swup.js - pjax: true - - # 开启 PWA - # use service worker - pwa: true - - # 开启数学公式 - # katex - katex: true - - # 开启返回顶部按钮 - # backtop button - backtop: true - - # 文章封面图片纵横比 - # article image aspect ratio - featuredImageHeight: "42%" #42% | false - - # 默认文章封面图片,不会显示在内容页面 - # Default post card featured image, not displayed on content pages - defaultFeaturedImage: false # false | featured.png in assets folder | https://unsplash.it/1920/1080/?random={{timestamp}} - - # 自动调整图片大小并兼容 Webp 格式 - # Optimize your images and SEO - imageProcessing: - cover: true - content: true - autoResize: - - 1080 - - 1440 - webp: true - - # 设置推特卡片样式 - opengraph: - twitter: # see https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started - cardType: summary_large_image # summary | summary_large_image - site: "@Ice_Hazymoon" - image: "featured.png" # in assets folder | false - - author: Ice-Hazymoon - keywords: - - Hugo - - Hugo Theme - - Luna - description: "A simple, performance-first, SEO-friendly Hugo theme" - -build: - noJSConfigInAssets: true - -languages: - de: - languageName: Deutsch - params: - languageIcon: "images/i18n/de.svg" # in assets folder - en-us: - languageName: English - params: - languageIcon: "images/i18n/en-us.svg" # in assets folder diff --git a/config/_default/.hugo.toml.swp b/config/_default/.hugo.toml.swp new file mode 100644 index 0000000..0914ad3 Binary files /dev/null and b/config/_default/.hugo.toml.swp differ diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml new file mode 100644 index 0000000..78fd124 --- /dev/null +++ b/config/_default/hugo.toml @@ -0,0 +1,86 @@ +title = "My Docs" +baseurl = "http://localhost/" +canonifyURLs = false +disableAliases = true +disableHugoGeneratorInject = true +# disableKinds = ["taxonomy", "term"] +enableEmoji = true +enableGitInfo = false +enableRobotsTXT = true +languageCode = "en-US" +pagerSize = 10 +rssLimit = 10 +summarylength = 20 # 70 (default) + +# Multilingual +defaultContentLanguage = "en" +disableLanguages = ["de", "nl"] +defaultContentLanguageInSubdir = false + +copyRight = "Copyright (c) 2020-2024 Thulite" + +[build.buildStats] + enable = true + +[outputs] + home = ["HTML", "RSS", "searchIndex"] + section = ["HTML", "RSS", "SITEMAP"] + +[outputFormats.searchIndex] + mediaType = "application/json" + baseName = "search-index" + isPlainText = true + notAlternative = true + +# Add output format for section sitemap.xml +[outputFormats.SITEMAP] + mediaType = "application/xml" + baseName = "sitemap" + isHTML = false + isPlainText = true + noUgly = true + rel = "sitemap" + +[sitemap] + changefreq = "monthly" + filename = "sitemap.xml" + priority = 0.5 + +[caches] + [caches.getjson] + dir = ":cacheDir/:project" + maxAge = -1 # "30m" + +[taxonomies] + contributor = "contributors" + category = "categories" + tag = "tags" + +[permalinks] + blog = "/blog/:slug/" + docs = "/docs/:sections[1:]/:slug/" +# docs = "/docs/1.0/:sections[1:]/:slug/" + +[minify.tdewolff.html] + keepWhitespace = false + +[related] + threshold = 80 + includeNewer = true + toLower = false + [[related.indices]] + name = "categories" + weight = 100 + [[related.indices]] + name = "tags" + weight = 80 + [[related.indices]] + name = "date" + weight = 10 + +[imaging] + anchor = "Center" + bgColor = "#ffffff" + hint = "photo" + quality = 85 + resampleFilter = "Lanczos" diff --git a/config/_default/languages.toml b/config/_default/languages.toml new file mode 100644 index 0000000..523b236 --- /dev/null +++ b/config/_default/languages.toml @@ -0,0 +1,32 @@ +[en] + languageName = "English" + contentDir = "content/en" + weight = 10 + [en.params] + languageISO = "EN" + languageTag = "en-US" + footer = 'Brought to you by Thulite' + alertText = 'Doks version 1.0 just shipped!' + +[de] + languageName = "German" + contentDir = "content/de" + weight = 15 + [de.params] + languageISO = "DE" + languageTag = "de-DE" + footer = 'Gebaut mit Thulite' + alertText = 'Neue Version ist da! Doks v0.5' + +[nl] + languageName = "Nederlands" + contentDir = "content/nl" + weight = 20 + [nl.params] + languageISO = "NL" + languageTag = "nl-NL" + titleAddition = "Modern documentatie-thema" + description = "Doks is een Hugo-thema waarmee je moderne documentatie-websites kunt bouwen die veilig, snel en klaar voor SEO zijn — standaard." + titleHome = "Doks thema" + footer = 'Mogelijk gemaakt door Netlify, Hugo, en Doks' + alertText = 'Introductie van het Doks-kinderthema, verschillende DX + UX-updates en meer! Bekijk Doks v0.2' diff --git a/config/_default/markup.toml b/config/_default/markup.toml new file mode 100644 index 0000000..23e8d42 --- /dev/null +++ b/config/_default/markup.toml @@ -0,0 +1,33 @@ +defaultMarkdownHandler = "goldmark" + +[goldmark] + [goldmark.extensions] + linkify = false + [goldmark.parser] + autoHeadingID = true + autoHeadingIDType = "github" + [goldmark.parser.attribute] + block = true + title = true + [goldmark.renderer] + unsafe = true + +[highlight] + anchorLineNos = false + codeFences = true + guessSyntax = false + hl_Lines = '' + hl_inline = false + lineAnchors = '' + lineNoStart = 1 + lineNos = false + lineNumbersInTable = false + noClasses = false + noHl = false + style = 'monokai' + tabWidth = 2 + +[tableOfContents] + endLevel = 3 + ordered = false + startLevel = 2 diff --git a/config/_default/menus/menus.en.toml b/config/_default/menus/menus.en.toml new file mode 100644 index 0000000..a2854f1 --- /dev/null +++ b/config/_default/menus/menus.en.toml @@ -0,0 +1,84 @@ +# [[docs]] +# name = "Prologue" +# weight = 10 +# identifier = "prologue" +# url = "/docs/prologue/" + +# [[docs]] +# name = "Help" +# weight = 60 +# identifier = "help" +# url = "/docs/help/" + +# [[docs]] +# name = "Lorem" +# weight = 70 +# identifier = "lorem" +# url = "/docs/lorem/" + +[[guide]] + name = "Lorem" + weight = 10 + identifier = "lorem" + url = "/guide/lorem/" + +[[tutorial]] + name = "Lorem" + weight = 10 + identifier = "lorem" + url = "/tutorial/lorem/" + +[[main]] + name = "Docs" + url = "/docs/guides/example-guide/" +# url = "/docs/1.0/prologue/introduction/" + weight = 10 + +[[main]] + name = "Blog" + url = "/blog/" + weight = 30 + +# [[social]] +# name = "X" +# pre = '' +# url = "https://twitter.com/getdoks" +# weight = 10 +# +# [[social]] +# name = "Discord" +# pre = '' +# url = "https://getdoks.org/chat" +# weight = 20 + +[[social]] + name = "GitHub" + pre = '' + url = "https://github.com/thuliteio/doks" + post = "v0.1.0" + weight = 30 + +# [[sidebar_docs]] +# name = "Guides" +# pageRef = "/docs/guides" +# weight = 10 +# +# [[sidebar_docs]] +# name = "Reference" +# pageRef = "/docs/reference" +# weight = 20 +# +# [[sidebar_docs]] +# name = "Resources" +# pageRef = "/docs/resources" +# weight = 30 + +[[footer]] + name = "Privacy Policy" + url = "/privacy/" + weight = 10 + +# [[footer]] +# name = "Terms of Service" +# url = "/terms/" +# weight = 20 diff --git a/config/_default/menus/menus.nl.toml b/config/_default/menus/menus.nl.toml new file mode 100644 index 0000000..ba96f72 --- /dev/null +++ b/config/_default/menus/menus.nl.toml @@ -0,0 +1,39 @@ +[[docs]] + name = "Prologue" + weight = 10 + identifier = "prologue" + url = "/docs/prologue/" + +[[docs]] + name = "Help" + weight = 60 + identifier = "help" + url = "/docs/help/" + +[[main]] + name = "Docs" + url = "/docs/prologue/introduction/" + weight = 10 + +# [[main]] +# name = "Blog" +# url = "/blog/" +# weight = 20 + +[[social]] + name = "GitHub" + pre = "" + url = "https://github.com/h-enk/doks" + post = "v0.1.0" + weight = 10 + +[[social]] + name = "X" + pre = "" + url = "https://twitter.com/getdoks" + weight = 20 + +# [[footer]] +# name = "Privacy" +# url = "/privacy-policy/" +# weight = 10 diff --git a/config/_default/module.toml b/config/_default/module.toml new file mode 100644 index 0000000..d82136f --- /dev/null +++ b/config/_default/module.toml @@ -0,0 +1,87 @@ +# mounts +## archetypes +[[mounts]] + source = "node_modules/@thulite/doks-core/archetypes" + target = "archetypes" + +[[mounts]] + source = "archetypes" + target = "archetypes" + +## assets +[[mounts]] + source = "node_modules/@thulite/core/assets" + target = "assets" + +[[mounts]] + source = "node_modules/@thulite/images/assets" + target = "assets" + +[[mounts]] + source = "node_modules/@thulite/doks-core/assets" + target = "assets" + +[[mounts]] + source = "node_modules/@tabler/icons/icons" + target = "assets/svgs/tabler-icons" + +[[mounts]] + source = "assets" + target = "assets" + +## content +[[mounts]] + source = "content" + target = "content" + +## data +[[mounts]] + source = "node_modules/@thulite/doks-core/data" + target = "data" + +[[mounts]] + source = "data" + target = "data" + +## i18n +[[mounts]] + source = "node_modules/@thulite/doks-core/i18n" + target = "i18n" + +[[mounts]] + source = "i18n" + target = "i18n" + +## layouts +[[mounts]] + source = "node_modules/@thulite/core/layouts" + target = "layouts" + +[[mounts]] + source = "node_modules/@thulite/seo/layouts" + target = "layouts" + +[[mounts]] + source = "node_modules/@thulite/images/layouts" + target = "layouts" + +[[mounts]] + source = "node_modules/@thulite/doks-core/layouts" + target = "layouts" + +[[mounts]] + source = "node_modules/@thulite/inline-svg/layouts" + target = "layouts" + +[[mounts]] + source = "layouts" + target = "layouts" + +## static +[[mounts]] + source = "node_modules/@thulite/doks-core/static" + target = "static" + +[[mounts]] + source = "static" + target = "static" diff --git a/config/_default/params.toml b/config/_default/params.toml new file mode 100644 index 0000000..649a9ff --- /dev/null +++ b/config/_default/params.toml @@ -0,0 +1,138 @@ +# Hugo +title = "My Docs" +description = "Congrats on setting up a new Doks project!" +images = ["cover.png"] + +# mainSections +mainSections = ["docs"] + +[social] + twitter = "getdoks" + +# Doks (@thulite/doks-core) +[doks] + # Color mode + colorMode = "auto" # auto (default), light or dark + colorModeToggler = true # true (default) or false (this setting is only relevant when colorMode = auto) + + # Navbar + navbarSticky = true # true (default) or false + containerBreakpoint = "lg" # "", "sm", "md", "lg" (default), "xl", "xxl", or "fluid" + + ## Button + navBarButton = false # false (default) or true + navBarButtonUrl = "/docs/prologue/introduction/" + navBarButtonText = "Get started" + + # FlexSearch + flexSearch = true # true (default) or false + searchExclKinds = [] # list of page kinds to exclude from search indexing (e.g. ["home", "taxonomy", "term"] ) + searchExclTypes = [] # list of content types to exclude from search indexing (e.g. ["blog", "docs", "legal", "contributors", "categories"]) + showSearch = [] # [] (all pages, default) or homepage (optionally) and list of sections (e.g. ["homepage", "blog", "guides"]) + indexSummary = false # true or false (default); whether to index only the `.Summary` instead of the full `.Content`; limits the respective JSON field size and thus increases loading time + + ## Search results + showDate = false # false (default) or true + showSummary = true # true (default) or false + searchLimit = 99 # 0 (no limit, default) or natural number + + # Global alert + alert = false # false (default) or true + alertDismissable = true # true (default) or false + + # Bootstrap + bootstrapJavascript = false # false (default) or true + + # Nav + sectionNav = ["docs"] # ["docs"] (default) or list of sections (e.g. ["docs", "guides"]) + toTopButton = false # false (default) or true + breadcrumbTrail = false # false (default) or true + headlineHash = true # true (default) or false + scrollSpy = true # true (default) or false + + # Multilingual + multilingualMode = false # false (default) or true + showMissingLanguages = true # whether or not to show untranslated languages in the language menu; true (default) or false + + # Versioning + docsVersioning = false # false (default) or true + docsVersion = "1.0" + + # UX + headerBar = false # true (default) or false + backgroundDots = true # true (default) or false + + # Homepage + sectionFooter = false # false (default) or true + + # Blog + relatedPosts = false # false (default) or true + imageList = true # true (default) or false + imageSingle = true # true (default) or false + + # Repository + editPage = false # false (default) or true + lastMod = false # false (default) or true + repoHost = "GitHub" # GitHub (default), Gitea, GitLab, Bitbucket, or BitbucketServer + docsRepo = "https://github.com/h-enk/doks" + docsRepoBranch = "main" # main (default), master, or + docsRepoSubPath = "" # "" (none, default) or + + # SCSS colors + # backGround = "yellowgreen" + ## Dark theme + # textDark = "#dee2e6" # "#dee2e6" (default), "#dee2e6" (orignal), or custom color + # accentDark = "#5d2f86" # "#5d2f86" (default), "#5d2f86" (original), or custom color + ## Light theme + # textLight = "#1d2d35" # "#1d2d35" (default), "#1d2d35" (orignal), or custom color + # accentLight = "#8ed6fb" # "#8ed6fb" (default), "#8ed6fb" (orignal), or custom color + + # [doks.menu] + # [doks.menu.section] + # auto = true # true (default) or false + # collapsibleSidebar = true # true (default) or false + +# Debug +[render_hooks.image] + errorLevel = 'ignore' # ignore (default), warning, or error (fails the build) + +[render_hooks.link] + errorLevel = 'ignore' # ignore (default), warning, or error (fails the build) + highlightBroken = false # true or false (default) + +# Images (@thulite/images) +[thulite_images] + [thulite_images.defaults] + decoding = "async" # sync, async, or auto (default) + fetchpriority = "auto" # high, low, or auto (default) + loading = "lazy" # eager or lazy (default) + widths = [480, 576, 768, 1025, 1200, 1440] # [640, 768, 1024, 1366, 1600, 1920] for example + sizes = "auto" # 100vw (default), 75vw, or auto for example + process = "" # "fill 1600x900" or "fill 2100x900" for example + lqip = "16x webp q20" # "16x webp q20" or "21x webp q20" for example + +# Inline SVG (@thulite/inline-svg) +[inline_svg] + iconSetDir = "tabler-icons" # "tabler-icons" (default) + +# SEO (@thulite/seo) +[seo] + [seo.title] + separator = " | " + suffix = "" + [seo.favicons] + sizes = [] + icon = "favicon.png" # favicon.png (default) + svgIcon = "favicon.svg" # favicon.svg (default) + maskIcon = "mask-icon.svg" # mask-icon.svg (default) + maskIconColor = "white" # white (default) + [seo.schemas] + type = "Organization" # Organization (default) or Person + logo = "favicon-512x512.png" # Logo of Organization — favicon-512x512.png (default) + name = "Thulite" # Name of Organization or Person + sameAs = [] # E.g. ["https://github.com/thuliteio/thulite", "https://fosstodon.org/@thulite"] + images = ["cover.png"] # ["cover.png"] (default) + article = [] # Article sections + newsArticle = [] # NewsArticle sections + blogPosting = ["blog"] # BlogPosting sections + product = [] # Product sections diff --git a/config/babel.config.js b/config/babel.config.js new file mode 100644 index 0000000..9a65c09 --- /dev/null +++ b/config/babel.config.js @@ -0,0 +1,17 @@ +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + targets: { + browsers: [ + // Best practice: https://github.com/babel/babel/issues/7789 + '>=1%', + 'not ie 11', + 'not op_mini all' + ] + } + } + ] + ] +}; diff --git a/config/next/hugo.toml b/config/next/hugo.toml new file mode 100644 index 0000000..8821061 --- /dev/null +++ b/config/next/hugo.toml @@ -0,0 +1,2 @@ +# Overrides for next environment +baseurl = "/" diff --git a/config/postcss.config.js b/config/postcss.config.js new file mode 100644 index 0000000..296b090 --- /dev/null +++ b/config/postcss.config.js @@ -0,0 +1,64 @@ +const autoprefixer = require('autoprefixer'); +const purgecss = require('@fullhuman/postcss-purgecss'); +const whitelister = require('purgecss-whitelister'); + +module.exports = { + plugins: [ + autoprefixer(), + purgecss({ + content: ['./hugo_stats.json'], + extractors: [ + { + extractor: (content) => { + const els = JSON.parse(content).htmlElements; + return els.tags.concat(els.classes, els.ids); + }, + extensions: ['json'] + } + ], + dynamicAttributes: [ + 'aria-expanded', + 'data-bs-popper', + 'data-bs-target', + 'data-bs-theme', + 'data-dark-mode', + 'data-global-alert', + 'data-pane', // tabs.js + 'data-popper-placement', + 'data-sizes', + 'data-toggle-tab', // tabs.js + 'id', + 'size', + 'type' + ], + safelist: [ + 'active', + 'btn-clipboard', // clipboards.js + 'clipboard', // clipboards.js + 'disabled', + 'hidden', + 'modal-backdrop', // search-modal.js + 'selected', // search-modal.js + 'show', + 'img-fluid', + 'blur-up', + 'lazyload', + 'lazyloaded', + 'alert-link', + 'container-fw ', + 'container-lg', + 'container-fluid', + 'offcanvas-backdrop', + 'figcaption', + 'dt', + 'dd', + 'showing', + 'hiding', + 'page-item', + 'page-link', + 'not-content', + ...whitelister(['./assets/scss/**/*.scss', './node_modules/@thulite/doks-core/assets/scss/components/_code.scss', './node_modules/@thulite/doks-core/assets/scss/components/_expressive-code.scss', './node_modules/@thulite/doks-core/assets/scss/common/_syntax.scss']) + ] + }) + ] +}; diff --git a/config/production/hugo.toml b/config/production/hugo.toml new file mode 100644 index 0000000..25b6683 --- /dev/null +++ b/config/production/hugo.toml @@ -0,0 +1,2 @@ +# Overrides for production environment +baseurl = "/" diff --git a/content/about.md b/content/de/about.md similarity index 100% rename from content/about.md rename to content/de/about.md diff --git a/content/archive.md b/content/de/archive.md similarity index 100% rename from content/archive.md rename to content/de/archive.md diff --git a/content/posts/MinecraftCurrentSeason/index.md b/content/de/blog/MinecraftCurrentSeason/index.md similarity index 100% rename from content/posts/MinecraftCurrentSeason/index.md rename to content/de/blog/MinecraftCurrentSeason/index.md diff --git a/content/posts/MinecraftSeason1/index.md b/content/de/blog/MinecraftSeason1/index.md similarity index 100% rename from content/posts/MinecraftSeason1/index.md rename to content/de/blog/MinecraftSeason1/index.md diff --git a/content/posts/MinecraftServerRoleplayGuidlines/index.md b/content/de/blog/MinecraftServerRoleplayGuidlines/index.md similarity index 100% rename from content/posts/MinecraftServerRoleplayGuidlines/index.md rename to content/de/blog/MinecraftServerRoleplayGuidlines/index.md diff --git a/content/posts/MinecraftServerRules/index.md b/content/de/blog/MinecraftServerRules/index.md similarity index 100% rename from content/posts/MinecraftServerRules/index.md rename to content/de/blog/MinecraftServerRules/index.md diff --git a/content/data-protection.md b/content/de/data-protection.md similarity index 100% rename from content/data-protection.md rename to content/de/data-protection.md diff --git a/content/github.md b/content/de/github.md similarity index 100% rename from content/github.md rename to content/de/github.md diff --git a/content/honorable-mentions.md b/content/de/honorable-mentions.md similarity index 100% rename from content/honorable-mentions.md rename to content/de/honorable-mentions.md diff --git a/content/imprint.md b/content/de/imprint.md similarity index 100% rename from content/imprint.md rename to content/de/imprint.md diff --git a/content/links/index.md b/content/de/links/index.md similarity index 100% rename from content/links/index.md rename to content/de/links/index.md diff --git a/content/search.md b/content/de/search.md similarity index 100% rename from content/search.md rename to content/de/search.md diff --git a/content/about.en-us.md b/content/en/about.md similarity index 100% rename from content/about.en-us.md rename to content/en/about.md diff --git a/content/archive.en-us.md b/content/en/archive.md similarity index 100% rename from content/archive.en-us.md rename to content/en/archive.md diff --git a/content/posts/MinecraftSeason1/index.en-us.md b/content/en/blog/MinecraftSeason1/index.md similarity index 100% rename from content/posts/MinecraftSeason1/index.en-us.md rename to content/en/blog/MinecraftSeason1/index.md diff --git a/content/posts/MinecraftServerRoleplayGuidlines/index.en-us.md b/content/en/blog/MinecraftServerRoleplayGuidlines/index.md similarity index 100% rename from content/posts/MinecraftServerRoleplayGuidlines/index.en-us.md rename to content/en/blog/MinecraftServerRoleplayGuidlines/index.md diff --git a/content/posts/MinecraftServerRules/index.en-us.md b/content/en/blog/MinecraftServerRules/index.md similarity index 100% rename from content/posts/MinecraftServerRules/index.en-us.md rename to content/en/blog/MinecraftServerRules/index.md diff --git a/content/github.en-us.md b/content/en/github.md similarity index 100% rename from content/github.en-us.md rename to content/en/github.md diff --git a/content/links/index.en-us.md b/content/en/links/index.md similarity index 100% rename from content/links/index.en-us.md rename to content/en/links/index.md diff --git a/content/search.en-us.md b/content/en/search.md similarity index 100% rename from content/search.en-us.md rename to content/en/search.md diff --git a/content/posts/ArticleEncryptionTest/index.md b/content/posts/ArticleEncryptionTest/index.md deleted file mode 100644 index 7be3f31..0000000 --- a/content/posts/ArticleEncryptionTest/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "Article Encryption Test" -date: 2022-04-09T02:49:13+02:00 -slug: hugo-encrypt -draft: true -summary: "This is a test article for encryption" -tags: - - "Hugo" ---- - -## Hugo Encrypt - -> password: **2022** - -````markdown -{{%/* hugo-encrypt 2022 */%}} -![Night city](https://unsplash.it/1920/1080/?random=1) -{{%/* /hugo-encrypt */%}} -```` - -{{% hugo-encrypt 2022 %}} -![Night city](https://unsplash.it/1920/1080/?random=1) -{{% /hugo-encrypt %}} - -*** - -## Multi-block encryption - -> Default password: **123456** - -```markdown -{{%/* hugo-encrypt */%}}`Here is the test content `{{%/* /hugo-encrypt */%}} -``` - -{{% hugo-encrypt %}}`Here is the test content `{{%/ hugo-encrypt %}} - -End... \ No newline at end of file diff --git a/content/posts/FlowersGallery/1.jpg b/content/posts/FlowersGallery/1.jpg deleted file mode 100644 index 72bb65d..0000000 Binary files a/content/posts/FlowersGallery/1.jpg and /dev/null differ diff --git a/content/posts/FlowersGallery/2.jpg b/content/posts/FlowersGallery/2.jpg deleted file mode 100644 index c3bfb74..0000000 Binary files a/content/posts/FlowersGallery/2.jpg and /dev/null differ diff --git a/content/posts/FlowersGallery/3.jpg b/content/posts/FlowersGallery/3.jpg deleted file mode 100644 index 24403e1..0000000 Binary files a/content/posts/FlowersGallery/3.jpg and /dev/null differ diff --git a/content/posts/FlowersGallery/4.jpg b/content/posts/FlowersGallery/4.jpg deleted file mode 100644 index 6a31b6d..0000000 Binary files a/content/posts/FlowersGallery/4.jpg and /dev/null differ diff --git a/content/posts/FlowersGallery/5.jpg b/content/posts/FlowersGallery/5.jpg deleted file mode 100644 index 35f08d4..0000000 Binary files a/content/posts/FlowersGallery/5.jpg and /dev/null differ diff --git a/content/posts/FlowersGallery/6.jpg b/content/posts/FlowersGallery/6.jpg deleted file mode 100644 index 92a47d5..0000000 Binary files a/content/posts/FlowersGallery/6.jpg and /dev/null differ diff --git a/content/posts/FlowersGallery/7.jpg b/content/posts/FlowersGallery/7.jpg deleted file mode 100644 index 732ab7e..0000000 Binary files a/content/posts/FlowersGallery/7.jpg and /dev/null differ diff --git a/content/posts/FlowersGallery/cover.jpg b/content/posts/FlowersGallery/cover.jpg deleted file mode 100644 index 4e6dc1b..0000000 Binary files a/content/posts/FlowersGallery/cover.jpg and /dev/null differ diff --git a/content/posts/FlowersGallery/index.md b/content/posts/FlowersGallery/index.md deleted file mode 100644 index bf963ee..0000000 --- a/content/posts/FlowersGallery/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Flower Gallery -date: 2022-04-15T02:49:13+02:00 -slug: flower-gallery -featured_image: cover.jpg -summary: Some photos of flowers -layout: gallery -draft: true -tags: - - Flower -categories: - - Gallery ---- - -{{< gallery >}} -![ROSE](1.jpg) -![ROSE](2.jpg) -![ROSE](3.jpg) - -![ROSE](5.jpg) -![ROSE](4.jpg) -![ROSE](6.jpg) -{{< /gallery >}} - -## Grid Gallery - -> Spring, the sweet spring, is the year's pleasant king. - -{{< gallery-grid >}} -![some text](1.jpg) -![some text](2.jpg) -![some text](3.jpg) -![some text](4.jpg) -![some text](5.jpg) -![some text](6.jpg) -{{< /gallery-grid >}} diff --git a/content/posts/Shortcodes/1.jpg b/content/posts/Shortcodes/1.jpg deleted file mode 100644 index 72bb65d..0000000 Binary files a/content/posts/Shortcodes/1.jpg and /dev/null differ diff --git a/content/posts/Shortcodes/2.jpg b/content/posts/Shortcodes/2.jpg deleted file mode 100644 index c3bfb74..0000000 Binary files a/content/posts/Shortcodes/2.jpg and /dev/null differ diff --git a/content/posts/Shortcodes/3.jpg b/content/posts/Shortcodes/3.jpg deleted file mode 100644 index 732ab7e..0000000 Binary files a/content/posts/Shortcodes/3.jpg and /dev/null differ diff --git a/content/posts/Shortcodes/index.md b/content/posts/Shortcodes/index.md deleted file mode 100644 index b2ed5e4..0000000 --- a/content/posts/Shortcodes/index.md +++ /dev/null @@ -1,378 +0,0 @@ ---- -title: "Shortcodes" -date: 2022-05-02T13:12:47+02:00 -slug: shortcodes -draft: true -toc: true -summary: Some shortcode examples -tags: - - Shortcodes - - Hugo -categories: - - Luna ---- - -## Abbr - -```markdown -{{}} -``` - -{{< abbr "MIT" "Massachusetts Institute of Technology" >}} - -## Color text - -```markdown -{{}} -{{}} -{{}} -{{}} -{{}} -{{}} -``` - -{{< color "red" "red text" >}} -{{< color "green" "green text" >}} -{{< color "blue" "blue text" >}} -{{< color "orange" "orange text" >}} -{{< color "theme" "theme text" >}} -{{< color "#a811ff" "custom color text" >}} - -## Button - -```markdown -{{}} -{{}} -{{}} - -{{}} -{{}} -{{}} -{{}} -{{}} - -{{}} -{{}} -{{}} -{{}} -{{}} -``` - -
-{{< button content="Small" size="small" >}} -{{< button content="Normal" size="normal" >}} -{{< button content="Large" size="large" >}} - -{{< button color="theme" icon="eva eva-heart" content="Theme Button" link="https://google.com" >}} -{{< button color="red" icon="eva eva-home" content="Red Button" link="https://google.com" >}} -{{< button color="green" icon="eva eva-twitter" content="Green Button" link="https://google.com" >}} -{{< button color="blue" icon="eva eva-github" content="Blue Button" link="https://google.com" >}} -{{< button color="orange" icon="eva eva-search" content="Orange Button" link="https://google.com" >}} - -{{< button-outline color="theme" icon="eva eva-heart" content="Theme Button" link="https://google.com" >}} -{{< button-outline color="red" icon="eva eva-home" content="Red Button" link="https://google.com" >}} -{{< button-outline color="green" icon="eva eva-twitter" content="Green Button" link="https://google.com" >}} -{{< button-outline color="blue" icon="eva eva-github" content="Blue Button" link="https://google.com" >}} -{{< button-outline color="orange" icon="eva eva-search" content="Orange Button" link="https://google.com" >}} -
- -## Text layout - -```markdown -{{}} - -{{}} - -{{}} -``` - -{{< align left "Text left" >}} - -{{< align center "Text center" >}} - -{{< align right "Text right" >}} - -## GitHub - -```markdown -{{}} -``` - -{{< github name="gohugoio/hugo" link="https://github.com/gohugoio/hugo" description="The world’s fastest framework for building websites." color="#00ADD8" language="Go" >}} - -## GitHub Auto - -```markdown -{{}} -``` - -{{< github-auto name="Ice-Hazymoon/hugo-theme-luna" >}} - -## Notice - -```markdown -{{}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{}} - -{{}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{}} - -{{}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{}} - -{{}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{}} -``` - -{{< notice warn >}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{< /notice >}} - -{{< notice error >}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{< /notice >}} - -{{< notice info >}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{< /notice >}} - -{{< notice success >}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{< /notice >}} - -## Quote - -```markdown -{{}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{}} -``` - -{{< quote >}} -Let life be beautiful like summer flowers and death like autumn leaves. -{{< /quote >}} - -## Quote Center - -```markdown -{{}} -The curfew tolls the knell of parting day, -The lowing herd wind slowly o'er the lea -The ploughman homeward plods his weary way, -And leaves the world to darkness and to me. -{{}} -``` - -{{< quote-center >}} -The curfew tolls the knell of parting day, -The lowing herd wind slowly o'er the lea -The ploughman homeward plods his weary way, -And leaves the world to darkness and to me. -{{< /quote-center >}} - -## Tags - -```markdown -This is a {{}} -This is a {{}} -This is a {{}} -This is a {{}} -This is a {{}} - -This is a {{}} -This is a {{}} -This is a {{}} -This is a {{}} -This is a {{}} -``` - -This is a {{< tag theme "theme tag" >}} -This is a {{< tag red "red tag" >}} -This is a {{< tag green "green tag" >}} -This is a {{< tag blue "blue tag" >}} -This is a {{< tag orange "orange tag" >}} - -This is a {{< tag-outlined theme "theme tag" >}} -This is a {{< tag-outlined red "red tag" >}} -This is a {{< tag-outlined green "green tag" >}} -This is a {{< tag-outlined blue "blue tag" >}} -This is a {{< tag-outlined orange "orange tag" >}} - -## Progress bar - -```markdown -{{}} -{{}} -{{}} -{{}} -{{}} -``` - -{{< progress 999.99 theme "Name of progress bar" >}} -{{< progress 80 green "Name of progress bar" >}} -{{< progress 77.54 red "Name of progress bar" >}} -{{< progress 123.45 blue "Name of progress bar" >}} -{{< progress 11.11 orange "Name of progress bar" >}} - -## Accordion - -```markdown -{{}} -* Vegetables -* Fruits -* Fish -{{}} -``` - -{{< accordion "Foods" open >}} -* Vegetables -* Fruits -* Fish -{{< /accordion >}} - -## Divided Line - -```markdown -{{}} -``` - -{{< hr "some text" >}} - -## Hidden Text - -```markdown -This is a {{}} - -This is a {{}} -``` - -This is a {{< hidden-text "Hide text" blur >}} - -This is a {{< hidden-text "Hide text" >}} - - -```markdown -{{}} -> This is a hidden block -{{}} - -{{}} -* Vegetables -* Fruits -* Fish -{{}} -``` - -{{< hidden blur >}} -> This is a hidden block -{{< /hidden >}} - -{{< hidden >}} -* Vegetables -* Fruits -* Fish -{{< /hidden >}} - -## Rating - -```markdown -The paella dish I rate {{}} -``` - -The paella dish I rate {{< rating 10 6 >}} - -## Links Card - -```markdown -{{}} - -{{}} -``` - -{{< link-card name="hugo-theme-luna" desc="A simple, performance-first, SEO-friendly Hugo theme" link="https://github.com/Ice-Hazymoon/hugo-theme-luna" img="https://repository-images.githubusercontent.com/486781027/dc31a9ab-66d1-49b8-a225-4f85f2329f2e" >}} - -{{< link-card name="hugo-theme-luna" desc="A simple, performance-first, SEO-friendly Hugo theme" link="https://github.com/Ice-Hazymoon/hugo-theme-luna" >}} - -## Carousel - -```markdown -{{}} - -{{}} -``` - -{{< carousel "https://unsplash.it/1920/1080/?random=1" "https://unsplash.it/1920/1080/?random=2" "https://unsplash.it/1920/1080/?random=3" "https://unsplash.it/1920/1080/?random=4" >}} - -{{< carousel "1.jpg" "2.jpg" "3.jpg" >}} - -## Timeline - -```markdown -{{}} -``` - -{{< timeline "2018-01-01 Eat salada today" "2018-01-02 Eat paella today" "2018-01-03 Eat pizza today" >}} - -## Gallery - -```markdown -{{}} -![](1.jpg) -![](2.jpg) -![](3.jpg) - -![](2.jpg) -![](3.jpg) -![](1.jpg) -{{}} -``` - -{{< gallery >}} -![](1.jpg) -![](2.jpg) -![](3.jpg) - -![](2.jpg) -![](3.jpg) -![](1.jpg) -{{< /gallery >}} - -## Tabs - -```markdown -{{}} - -{{}} -百合花(学名:Lilium)通称百合花,是百合目百合科的一属,为多年生草本球根植物,属内物种繁多,经常作为观赏植物。主要分布在亚洲东部、欧洲、北美洲等北半球温带地区,全球已发现有至少96个品种,其中5种产于台湾。近年更有不少经过人工杂交而产生的新品种,如OT百合、东方型百合、玫瑰百合等。百合属对猫来说有剧毒。 -{{}} - -{{}} -Lilium is a genus of herbaceous flowering plants growing from bulbs, all with large prominent flowers. They are the true lilies. Lilies are a group of flowering plants which are important in culture and literature in much of the world. Most species are native to the northern hemisphere and their range is temperate climates and extends into the subtropics. Many other plants have "lily" in their common names, but do not belong to the same genus and are therefore not true lilies. -{{}} - -{{}} -Las especies de Lilium, comúnmente llamadas azucenas o lirios, constituyen un género con alrededor de 110 integrantes que se incluye dentro de la familia de las liliáceas. Los lirios son herbáceas perennes de tallos erectos con numerosas hojas alternas, lineares a lance balas. Crecen a partir de bulbos formados por capas de escamas carnosas sin túnica. -{{}} - -{{}} -``` - -{{< tab-view >}} - -{{< tab-panel name="中文" checked=true >}} -百合花(学名:Lilium)通称百合花,是百合目百合科的一属,为多年生草本球根植物,属内物种繁多,经常作为观赏植物。主要分布在亚洲东部、欧洲、北美洲等北半球温带地区,全球已发现有至少96个品种,其中5种产于台湾。近年更有不少经过人工杂交而产生的新品种,如OT百合、东方型百合、玫瑰百合等。百合属对猫来说有剧毒。 -{{< /tab-panel >}} - -{{< tab-panel name="English" >}} -Lilium is a genus of herbaceous flowering plants growing from bulbs, all with large prominent flowers. They are the true lilies. Lilies are a group of flowering plants which are important in culture and literature in much of the world. Most species are native to the northern hemisphere and their range is temperate climates and extends into the subtropics. Many other plants have "lily" in their common names, but do not belong to the same genus and are therefore not true lilies. -{{< /tab-panel >}} - -{{< tab-panel name="Español" >}} -Las especies de Lilium, comúnmente llamadas azucenas o lirios, constituyen un género con alrededor de 110 integrantes que se incluye dentro de la familia de las liliáceas. Los lirios son herbáceas perennes de tallos erectos con numerosas hojas alternas, lineares a lance balas. Crecen a partir de bulbos formados por capas de escamas carnosas sin túnica. -{{< /tab-panel >}} - -{{< /tab-view >}} diff --git a/content/posts/Typography/cover.jpg b/content/posts/Typography/cover.jpg deleted file mode 100644 index b2918d7..0000000 Binary files a/content/posts/Typography/cover.jpg and /dev/null differ diff --git a/content/posts/Typography/index.md b/content/posts/Typography/index.md deleted file mode 100644 index 2bb83fd..0000000 --- a/content/posts/Typography/index.md +++ /dev/null @@ -1,230 +0,0 @@ ---- -title: "Typography" -date: 2022-04-15T02:49:13+02:00 -slug: typography -featured_image: cover.jpg -draft: true -tags: - - English -refs: - - link: https://play.tailwindcss.com/uj1vGACRJA?layout=preview ---- - -Until now, trying to style an article, document, or blog post with Tailwind has been a tedious task that required a keen eye for typography and a lot of complex custom CSS. - - - -By default, Tailwind removes all of the default browser styling from paragraphs, headings, lists and more. This ends up being really useful for building application UIs because you spend less time undoing user-agent styles, but when you _really are_ just trying to style some content that came from a rich-text editor in a CMS or a markdown file, it can be surprising and unintuitive. - -We get lots of complaints about it actually, with people regularly asking us things like: - -> Why is Tailwind removing the default styles on my `h1` elements? How do I disable this? What do you mean I lose all the other base styles too? - -We hear you, but we're not convinced that simply disabling our base styles is what you really want. You don't want to have to remove annoying margins every time you use a `p` element in a piece of your dashboard UI. And I doubt you really want your blog posts to use the user-agent styles either — you want them to look _awesome_, not awful. - -The `@tailwindcss/typography` plugin is our attempt to give you what you _actually_ want, without any of the downsides of doing something stupid like disabling our base styles. - -It adds a new `prose` class that you can slap on any block of vanilla HTML content and turn it into a beautiful, well-formatted document: - -```html {linenos=table,hl_lines=[8,"4-6"],linenostart=199,title="index.html"} -
-

Garlic bread with cheese: What the science tells us

-

- For years parents have espoused the health benefits of eating garlic bread with cheese to their - children, with the food earning such an iconic status in our culture that kids will often dress - up as warm, cheesy loaf for Halloween. -

-

- But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases - springing up around the country. -

- -
-``` - -For more information about how to use the plugin and the features it includes, [read the documentation](https://github.com/tailwindcss/typography/blob/master/README.md). - ---- - -## What to expect from here on out - -What follows from here is just a bunch of absolute nonsense I've written to dogfood the plugin itself. It includes every sensible typographic element I could think of, like **bold text**, unordered lists, ordered lists, code blocks, block quotes, _and even italics_. - -It's important to cover all of these use cases for a few reasons: - -1. We want everything to look good out of the box. -2. Really just the first reason, that's the whole point of the plugin. -3. Here's a third pretend reason though a list with three items looks more realistic than a list with two items. - -Now we're going to try out another header style. - -### Typography should be easy - -So that's a header for you — with any luck if we've done our job correctly that will look pretty reasonable. - -Something a wise person once told me about typography is: - -> Typography is pretty important if you don't want your stuff to look like trash. Make it good then it won't be bad. - -It's probably important that images look okay here by default as well: - -![Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.](https://images.unsplash.com/photo-1556740758-90de374c12ad?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80) - -Now I'm going to show you an example of an unordered list to make sure that looks good, too: - -- So here is the first item in this list. -- In this example we're keeping the items short. -- Later, we'll use longer, more complex list items. - -And that's the end of this section. - -## What if we stack headings? - -### We should make sure that looks good, too. - -Sometimes you have headings directly underneath each other. In those cases you often have to undo the top margin on the second heading because it usually looks better for the headings to be closer together than a paragraph followed by a heading should be. - -### When a heading comes after a paragraph … - -When a heading comes after a paragraph, we need a bit more space, like I already mentioned above. Now let's see what a more complex list would look like. - -- **I often do this thing where list items have headings.** - - For some reason I think this looks cool which is unfortunate because it's pretty annoying to get the styles right. - - I often have two or three paragraphs in these list items, too, so the hard part is getting the spacing between the paragraphs, list item heading, and separate list items to all make sense. Pretty tough honestly, you could make a strong argument that you just shouldn't write this way. - -- **Since this is a list, I need at least two items.** - - I explained what I'm doing already in the previous list item, but a list wouldn't be a list if it only had one item, and we really want this to look realistic. That's why I've added this second list item so I actually have something to look at when writing the styles. - -- **It's not a bad idea to add a third item either.** - - I think it probably would've been fine to just use two items but three is definitely not worse, and since I seem to be having no trouble making up arbitrary things to type, I might as well include it. - -After this sort of list I usually have a closing statement or paragraph, because it kinda looks weird jumping right to a heading. - -## Code should look okay by default. - -I think most people are going to use [highlight.js](https://highlightjs.org/) or [Prism](https://prismjs.com/) or something if they want to style their code blocks but it wouldn't hurt to make them look _okay_ out of the box, even with no syntax highlighting. - -Here's what a default `tailwind.config.js` file looks like at the time of writing: - -```js {title="tailwind.config.js"} -module.exports = { - purge: [], - theme: { - extend: {}, - }, - variants: {}, - plugins: [], -} -``` - -Hopefully that looks good enough to you. - -### What about nested lists? - -Nested lists basically always look bad which is why editors like Medium don't even let you do it, but I guess since some of you goofballs are going to do it we have to carry the burden of at least making it work. - -1. **Nested lists are rarely a good idea.** - - You might feel like you are being really "organized" or something but you are just creating a gross shape on the screen that is hard to read. - - Nested navigation in UIs is a bad idea too, keep things as flat as possible. - - Nesting tons of folders in your source code is also not helpful. -2. **Since we need to have more items, here's another one.** - - I'm not sure if we'll bother styling more than two levels deep. - - Two is already too much, three is guaranteed to be a bad idea. - - If you nest four levels deep you belong in prison. -3. **Two items isn't really a list, three is good though.** - - Again please don't nest lists if you want people to actually read your content. - - Nobody wants to look at this. - - I'm upset that we even have to bother styling this. - -The most annoying thing about lists in Markdown is that `
  • ` elements aren't given a child `

    ` tag unless there are multiple paragraphs in the list item. That means I have to worry about styling that annoying situation too. - -- **For example, here's another nested list.** - - But this time with a second paragraph. - - - These list items won't have `

    ` tags - - Because they are only one line each - -- **But in this second top-level list item, they will.** - - This is especially annoying because of the spacing on this paragraph. - - - As you can see here, because I've added a second line, this list item now has a `

    ` tag. - - This is the second line I'm talking about by the way. - - - Finally here's another list item so it's more like a list. - -- A closing list item, but with no nested list, because why not? - -And finally a sentence to close off this section. - -## There are other elements we need to style - -I almost forgot to mention links, like [this link to the Tailwind CSS website](https://tailwindcss.com). We almost made them blue but that's so yesterday, so we went with dark gray, feels edgier. - -We even included table styles, check it out: - -| Wrestler | Origin | Finisher | -| ----------------------- | ------------ | ------------------ | -| Bret "The Hitman" Hart | Calgary, AB | Sharpshooter | -| Stone Cold Steve Austin | Austin, TX | Stone Cold Stunner | -| Randy Savage | Sarasota, FL | Elbow Drop | -| Vader | Boulder, CO | Vader Bomb | -| Razor Ramon | Chuluota, FL | Razor's Edge | - -We also need to make sure inline code looks good, like if I wanted to talk about `` elements or tell you the good news about `@tailwindcss/typography`. - -### Sometimes I even use `code` in headings - -Even though it's probably a bad idea, and historically I've had a hard time making it look good. This _"wrap the code blocks in backticks"_ trick works pretty well though really. - -Another thing I've done in the past is put a `code` tag inside of a link, like if I wanted to tell you about the [`tailwindcss/docs`](https://github.com/tailwindcss/docs) repository. I don't love that there is an underline below the backticks but it is absolutely not worth the madness it would require to avoid it. - -#### We haven't used an `h4` yet - -But now we have. Please don't use `h5` or `h6` in your content, Medium only supports two heading levels for a reason, you animals. I honestly considered using a `before` pseudo-element to scream at you if you use an `h5` or `h6`. - -We don't style them at all out of the box because `h4` elements are already so small that they are the same size as the body copy. What are we supposed to do with an `h5`, make it _smaller_ than the body copy? No thanks. - -### We still need to think about stacked headings though. - -#### Let's make sure we don't screw that up with `h4` elements, either. - -Phew, with any luck we have styled the headings above this text and they look pretty good. - -Let's add a closing paragraph here so things end with a decently sized block of text. I can't explain why I want things to end that way but I have to assume it's because I think things will look weird or unbalanced if there is a heading too close to the end of the document. - -What I've written here is probably long enough, but adding this final sentence can't hurt. - -## LaTeX - -```TeX -this is a inline katex: $ E={\sqrt {p^{2}c^{2}+m^{2}c^{4}}}=\gamma mc^{2} $ - -$ E={\sqrt {p^{2}c^{2}+m^{2}c^{4}}}=\gamma mc^{2} $ - -$$ E_{0}=mc^{2} $$ - -\\[3 < 4\\] - -\begin{align} - p(v_i=1|\mathbf{h}) & = \sigma\left(\sum_j w_{ij}h_j + b_i\right) \\ - p(h_j=1|\mathbf{v}) & = \sigma\left(\sum_i w_{ij}v_i + c_j\right) -\end{align} -``` - -this is a inline katex: $ E={\sqrt {p^{2}c^{2}+m^{2}c^{4}}}=\gamma mc^{2} $ - -$$ E_{0}=mc^{2} $$ - -\\[3 < 4\\] - -\begin{align} - \nonumber p(v_i=1|\mathbf{h}) & = \sigma\left(\sum_j w_{ij}h_j + b_i\right) \\ - p(h_j=1|\mathbf{v}) & = \sigma\left(\sum_i w_{ij}v_i + c_j\right) -\end{align} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3534012 --- /dev/null +++ b/flake.lock @@ -0,0 +1,77 @@ +{ + "nodes": { + "hugo-coder": { + "flake": false, + "locked": { + "lastModified": 1740773296, + "narHash": "sha256-ANflhqFcTh9url224SUACZoC6jGOS3HadZHSnFM2un4=", + "owner": "luizdepra", + "repo": "hugo-coder", + "rev": "6bc00595434affd85e9d55af98779460de6fb1cd", + "type": "github" + }, + "original": { + "owner": "luizdepra", + "repo": "hugo-coder", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1745507211, + "narHash": "sha256-nSEpu76pCCXnZuwB0nsPBl1Nsdw+lxiYNWT5P3tZ6bk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "db6c0e37904638908e8fef9a950b74084ca06ae6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "hugo-coder": "hugo-coder", + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8dd8054 --- /dev/null +++ b/flake.nix @@ -0,0 +1,66 @@ +{ + description = "Personal website for Chris Portela"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + utils.url = "github:numtide/flake-utils"; + hugo-coder = { + url = "github:luizdepra/hugo-coder"; + flake = false; + }; + hugo-theme-doks = { + url = "github:thuliteio/doks"; + flake = false; + }; + }; + + outputs = inputs@{ self, nixpkgs, utils, ... }: utils.lib.eachSystem [ + utils.lib.system.x86_64-darwin + utils.lib.system.x86_64-linux + utils.lib.system.aarch64-darwin + utils.lib.system.aarch64-linux + ] (system: + let + pkgs = import nixpkgs { + inherit system; + }; + in + rec { + + packages.website = pkgs.stdenv.mkDerivation { + name = "website"; + src = self; + buildInputs = with pkgs; [ + git + nodejs + nodePackages.prettier + hugo + ]; + buildPhase = '' + mkdir -p themes + ln -s ${inputs.hugo-theme-doks} themes/doks + sed -i -e 's/enableGitInfo = true/enableGitInfo = false/' config.toml + ${pkgs.hugo}/bin/hugo + ${pkgs.nodePackages.prettier}/bin/prettier -w public '!**/*.{js,css}' + ''; + installPhase = "cp -r public $out"; + }; + + defaultPackage = self.packages.${system}.website; + + apps = rec { + hugo = utils.lib.mkApp { drv = pkgs.hugo; }; + default = hugo; + }; + + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + git + nodejs + nodePackages.prettier + hugo + ]; + }; + } + ); +} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..d519ea2 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,59 @@ +{{ define "main" }} +

    +
    +
    +

    {{ .Title }}

    +
    +
    +

    {{ .Params.lead | safeHTML }}

    + {{ i18n "get_started" }} + {{ .Content }} +
    +
    +
    +{{ end }} + +{{ define "sidebar-prefooter" }} + {{ if site.Params.doks.backgroundDots -}} +
    +
    +
    + {{ end -}} + {{ if eq $.Site.Language.LanguageName "English" }} +
    +
    +
    +
    +

    Update content

    +

    Edit content/_index.md to see this page change.

    +
    +
    +

    Add new content

    +

    Add Markdown files to content to create new pages.

    +
    +
    +

    Configure your site

    +

    Edit your config in config/_default/params.toml.

    +
    +
    +

    Read the docs

    +

    Learn more in the Docs.

    +
    +
    +
    +
    + {{ end }} +{{ end }} + +{{ define "sidebar-footer" }} +{{ if site.Params.doks.sectionFooter -}} +
    +
    +
    +

    Start building with Doks today

    + {{ i18n "get-started" }} +
    +
    +
    +{{ end -}} +{{ end }} diff --git a/layouts/partials/footer/script-footer-custom.html b/layouts/partials/footer/script-footer-custom.html new file mode 100644 index 0000000..4411a70 --- /dev/null +++ b/layouts/partials/footer/script-footer-custom.html @@ -0,0 +1,13 @@ +{{/* Put your custom tags here */}} + +{{/* EXAMPLE - only load script for production +{{ if eq (hugo.Environment) "production" -}} + {{ partial "footer/esbuild" (dict "src" "js/instantpage.js" "load" "async" "transpile" false) -}} +{{ end -}} +*/}} + +{{/* EXAMPLE - only load script for a page type e.g. contact or gallery +{{ if eq .Type "gallery" -}} + {{ partial "footer/esbuild" (dict "src" "js/gallery.js" "load" "async" "transpile" false) -}} +{{ end -}} +*/}} diff --git a/layouts/partials/head/custom-head.html b/layouts/partials/head/custom-head.html new file mode 100644 index 0000000..21e7bea --- /dev/null +++ b/layouts/partials/head/custom-head.html @@ -0,0 +1 @@ + diff --git a/layouts/partials/head/script-header.html b/layouts/partials/head/script-header.html new file mode 100644 index 0000000..aba9802 --- /dev/null +++ b/layouts/partials/head/script-header.html @@ -0,0 +1 @@ + diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..fca7810 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,49 @@ +[build] + publish = "public" + functions = "functions" + +[build.environment] + NODE_VERSION = "20.11.0" + NPM_VERSION = "10.2.4" + HUGO_VERSION = "0.125.1" + +[context.production] + command = "npm run build" + +[context.deploy-preview] + command = "npm run build" + +[context.branch-deploy] + command = "npm run build" + +[context.next] + command = "npm run build" + +[context.next.environment] + HUGO_ENV = "next" + +[dev] + framework = "#custom" + command = "npm run dev" + targetPort = 1313 + port = 8888 + publish = "public" + autoLaunch = false + +# Redirects and rewrites — https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file + +# Custom headers — https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file +[[headers]] + for = "/*" + [headers.values] + Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload" + X-Content-Type-Options = "nosniff" + X-XSS-Protection = "1; mode=block" + Content-Security-Policy = "default-src 'self'; manifest-src 'self'; connect-src 'self'; font-src 'self'; img-src 'self' https://avatars.githubusercontent.com data:; script-src 'self' 'nonce-dXNlcj0iaGVsbG8iLGRvbWFpbj0iaGVua3ZlcmxpbmRlLmNvbSIsZG9jdW1lbnQud3JpdGUodXNlcisiQCIrZG9tYWluKTs=' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk='; style-src 'self'" + X-Frame-Options = "SAMEORIGIN" + Referrer-Policy = "strict-origin" + Permissions-Policy = "geolocation=(self), microphone=(), camera=()" + Cache-Control= ''' + public, + max-age=31536000''' + Access-Control-Allow-Origin = "*" diff --git a/package.json b/package.json index 34c9325..ea1674b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,29 @@ { + "name": "thulite-project", + "version": "0.0.0", + "description": "Doks theme", + "author": "Thulite", + "license": "MIT", + "scripts": { + "create": "hugo new", + "dev": "hugo server --disableFastRender --noHTTPCache", + "format": "prettier **/** -w -c", + "build": "hugo --minify --gc", + "preview": "vite preview --outDir public" + }, "dependencies": { - "postcss-cli": "^11.0.0" + "@thulite/doks-core": "^1.8.0", + "@thulite/images": "^3.3.0", + "@thulite/inline-svg": "^1.1.0", + "@thulite/seo": "^2.4.1", + "@tabler/icons": "^3.12.0", + "thulite": "^2.5.0" + }, + "devDependencies": { + "prettier": "^3.3.3", + "vite": "^5.4.2" + }, + "engines": { + "node": ">=20.11.0" } -} +} \ No newline at end of file diff --git a/static/.gitkeep b/static/.gitkeep new file mode 100644 index 0000000..e69de29