GithubHelp home page GithubHelp logo

hydephp / hyde Goto Github PK

View Code? Open in Web Editor NEW
184.0 3.0 8.0 1.28 MB

HydePHP - Static Site Generator with the power of Laravel and the simplicity of Markdown.

Home Page: https://hydephp.com

License: MIT License

PHP 65.71% JavaScript 6.94% Blade 26.05% CSS 1.30%
hyde php blog-engine static-site-generator hydephp laravel tailwind tailwindcss documentation-generator

hyde's People

Contributors

caendesilva avatar dependabot[bot] avatar stylecibot avatar ydalton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hyde's Issues

Demo/Example sites wanted!

What could make HydePHP even better? Demo sites! Lots and lots of demo sites! Why not create a HydePHP site for your side business, book club, sports team, or anything else?

This could be a fun way to contribute to Hacktoberfest! Here are some instructions to get you started. Feel free to ask me for help if you want more guidance. ๐Ÿ™‚

  1. Create a HydePHP website (see hydephp.com/docs to learn how)
  2. Host the website somewhere. You can do this for free with GitHub Pages. Please also make the website source code public on GitHub!
  3. Take a screenshot of the site, and submit a Pull Request to update hydephp.com/demos by updating this file.

directory index / sub-page

How do you make a directory with an index page?
For example, I made the folder in _pages: "courses"
and in the "courses" folder i have an index.md
however, when I go to /courses, there is nothing there, and only /courses/index works.

How to add an htaccess file?

So I want to tell Apache the name of my 404.html so it won't show Apache's default black&white 404 page. One way to do that is with an .htaccess file. Now I tried adding that to the _media folder, but the file is not copied to _site upon building. And I'd rather not put it in _site directly, because someone might decide to remove the entire contents of the folder and then call hyde build. Any advice?

Welcome to Issues!

As this is a new package I'd love to get any and all feedback. PR's are super welcome as well! Cheers!

Todo: Add default 404 page

Could also be implemented in an "opt-in" style where the default Blade page stub is published with a command

Community Feedback Thread

Hi everyone! This is Caen, creator of HydePHP! I'd love to get to know everyone interested in this project. Please leave a comment with any thoughts you have, big and small!

I also want to create a section for the HydePHP website with testimonials and news mentions. This is a great place to leave those!

I have already gotten some very kind words on Twitter, and mentions in news sites, so here's what I'm thinking: I'll collect those mentions and put them on the website. Since they were posted publicly I will assume it's okay for me to crosspost them. For the sake of privacy, I will not post full names (unless I've gotten explicit permission to do so). However, if I use your mention and you want me to remove it I will, and if you want me to link to your social media etc I will.

Frontend A11y/UX improvement: Increase clickable area of navigation menu items on mobile

Describe the bug
Currently, the default navigation menu on mobile screens has a small bounding box.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a base installation of Hyde, such as the hosted docs, using a mobile device, or by emulating one by resizing the browser window.
  2. Open the navigation menu
  3. Tap to side of a navigation menu item
  4. The link toes not work

Expected behavior
Discovered while device testing on my phone, was attempting to change page using the navigation menu and tapped the list item on the right side of the screen, expected behavior would be for the interaction to still register and lead me to the page, even if I did not technically click on the actual text.

Screenshots
The bounding boxes of the links have been highlighted in blue. The Gallery link has been set to display: block; to increase the bounding box to illustrate the expected behaviour.
image

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
All mobile devices, or narrow screens are affected.

Additional context
Add any other context about the problem here.

Frontend: Update default index page

Currently, the default index page is not very meaningful since there are no posts in a base install.
_D__Dev_Laravel_ProjectHyde_hydetemp__site_index html

Instead, I am thinking it would be neat with a page similar to the "Welcome aboard" page in Rails, with instructions on how to get started, how to publish the current default page, and links to the docs.

Bug: Front Matter parser not stripping quotes

Which causes this bug
image

We should also ensure that trailing whitespaces are removed.

And to prevent quote marks that are actually part of a title, we need to allow double quotes to protect edge cases.

Hacktoberfest 2022 - Start here!

Welcome to Hacktoberfest 2022!

This post serves as a living document for the HydePHP organization.

Open Hacktoberfest Issues

Quick Links

Here are some links to resources to get you started.

Developer Resources (excerpt)

This is an excerpt from the developer resources page, which I highly recommend you read! You'll find it here: https://hydephp.com/community.

How HydePHP is Structured

HydePHP consists of a few core components, and development is done in a monorepo.

This means that when contributing to the code, we submit the code to a single "mono" repository where the code is automatically split into separate read-only repositories for each component.

The two most important components are Hyde and Framework. We also use HydeFront for frontend assets.

Hyde/Hyde - The HydePHP Project

The Hyde package is what the end-user sees and interacts with. When creating a new HydePHP site, this is done using the Hyde project. The package contains all the necessary files to run a HydePHP site and bootstraps the entire system. Equivalent to Laravel/Laravel

Hyde/Framework - The Core Framework

The Framework package holds most of the logic of the Hyde framework. This is where all the data models, static site generators, HydeCLI commands, Blade views, and more, are stored. Having this in a package makes it much easier to version and update using Composer. Equivalent to Laravel/Framework

Hyde/HydeFront - The Frontend Assets

The HydeFront package contains stylesheets and scripts to help make HydePHP sites accessible and interactive. It also includes a pre-compiled TailwindCSS file containing all the styles needed for the built-in Blade templates.

ENOENT upon npm watch

Hi! Thanks for your wonderful HydePHP!

I'm facing an issue while Managing and Compiling Assets. When developing with npm run watch, although it runs successfully on the first time, as soon as I change something at resources/assets/app.js, it fails with:

[webpack-cli] [Error: ENOENT: no such file or directory, unlink '/path/to/hyde/_site/media/mix-manifest.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'unlink',
  path: '/path/to/hyde/_site/media/mix-manifest.json'
}

I've tried many variations to setPublicPath('_media') in webpack.mix.js with no luck. Am I missing something?

Thanks in advance for any reply.

Lighthouse report: issues to fix

A Lighthouse report made on the GitHub Pages site showed mostly green across the board.
image

Only one accessibility issue needs to be addressed, namely contrast. The indigo color on links is not sufficiently differentiated from the background. Instead of Tailwind indigo-500, we probably need 600 or 700.

For SEO we need a meta description tag.

Roadmap: Extracting the core into a separate package

#Roadmap: Extracting the core into a separate package

Abstract:

I want to extract the core source code into a separate Framework package to make it easier to maintain and update.

I think this is an important feature that needs to be done before v1.0.

However, there needs to be some work done first.

Todos:

  • We need to to make sure the proper file paths are always used. This means that when running code from a vendor directory, Hyde uses paths relative to the actual project.
  • We need to make resources publishable. This means that resources such as Blade files need to reside in the vendor/src, but if they exist (for example if they have been published by a command) in the project resources the custom files take precedence.
  • Since Laravel Zero (which Hyde is based on) has a neat feature to compile into a standalone .phar executable, we should also utilise that in releases. Seems like Zero is not really compatible with apps that make such heavy use of filesystems as Hyde does.

How to help:

If you have experience in writing code like this, please leave a comment in this issue and we can coordinate!

Update

I have now successfully managed to extract the App directory into a new package. However, I have not yet touched on resources. Adding some new todos of code that needs to be extracted.

Code to extract

Code directories:

  • tests
  • app/Commands

Resource directories: (with stuff that may need to be publishable)

  • resources/
  • src/

Other:

  • Create a facade for the main Hyde class, added in ffbdf16

Feature: Add custom links to the navigation menu in the config

We currently have a config option to reorder sidebar navigation items in the docs, we should have that in the main navigation menu too. We should also allow custom links using key value pair arrays so we can link to external sites without having to use redirect hacks.

Move app scripts into app.js/documentation.js

Currently, scripts are defined inline which decreases maintainability and testability.

For modularity's sake, I want to move the shared JS into app.js and the documentation specific to docs.js.

Feature: Add image support

A solution to this is to port the functionality from Laradocgen where we add a _media directory for images that then get copied over to the _site/media directory.

Order subfolders in the Navigation

I have a couple of dropdown navigation items (automatically created from subfolders in _pages)
How do I target them in the the config/hyde.php's navigation => order?

I have tried the following:

            'mysubdirectory/index' => 20,
            'mysubdirectory/*' => 20,
            'mysubdirectory/' => 20,
            'mysubdirectory' => 20,
            '/mysubdirectory' => 20,
            '/mysubdirectory/' => 20,

Also tried assigning a priority number to each page in the subfolder, but to no effect:

            'mysubdirectory/mypage' => 20,
            'mysubdirectory/mypage2' => 20,
            'mysubdirectory/mypage3' => 20,

1.0 Roadmap: Update documentation

Ready to implement:

  • Update documentation framework to v0.3.x
  • Update documentation content to v0.3.x

To do when approaching 1.0 release

  • Finalize docs for 1.0

Release Checklist

When tagging a new release, there are some things to keep in mind to keep the package dist clean and user friendly.

  • Make sure that the environment is set to production in config/app.php
  • Make sure that the _source directories are clean and free from test posts
  • Make sure the .gitignore does not contain the _source directories
  • Do compile the frontend assets for production so NPM is not a hard dependency.

If there is anything that should be added to this list, leave a comment!

1.0 Roadmap: Add more tests

Tests to add:

  • Full feature test for the entire build process, added in v0.4
  • Insufficient coverage for Hyde\Framework\Actions\MarkdownConverter, Torchlight integration
  • Insufficient coverage for HydeBuildStaticSiteCommand.php, clean option, purge method, NPM integrations

Edit: Removed deprecated commands

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.